/**
 * Premium home — section-specific styles (Phase 2)
 */

/* Hero opening strip — refined editorial ticker */
.premium-hero__strip-wrap {
    position: static;
    z-index: auto;
    padding: 0;
    transform: none;
    will-change: auto;
}

.premium-hero__strip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 42px;
    padding: 0.32rem 0.45rem 0.32rem 0.55rem;
    background: var(--premium-strip-bg);
    border: 1px solid var(--premium-strip-border);
    border-radius: var(--premium-radius-md);
    position: static;
    top: auto;
    box-shadow: none;
    transform: none;
    will-change: auto;
}

.premium-hero__strip-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.62rem;
    border-radius: var(--premium-radius-pill);
    background: var(--premium-strip-label-bg);
    border: 1px solid var(--premium-strip-border);
    color: var(--premium-strip-label-text);
    font-size: 0.625rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

.premium-hero__strip-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: var(--premium-accent-strong);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
    flex-shrink: 0;
}

.premium-hero__strip-divider {
    flex: 0 0 auto;
    width: 1px;
    align-self: stretch;
    min-height: 1.25rem;
    margin: 0.15rem 0;
    background: var(--premium-strip-divider);
}

.premium-hero__strip-track {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.premium-hero__strip-track.newsticker-container {
    padding: 0;
    border: 0;
    background: transparent;
}

.premium-hero__strip-track .newsticker {
    margin: 0;
    padding: 0;
    height: 1.25rem;
    overflow: hidden;
}

.premium-hero__strip-track .newsticker li {
    line-height: 1.25rem;
}

.premium-hero__strip-track .newsticker li a {
    display: block;
    color: var(--premium-strip-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--premium-duration-fast) var(--premium-ease-out);
}

.premium-hero__strip-track .newsticker li a:hover {
    color: var(--premium-strip-text);
}

.premium-hero__strip-nav {
    flex: 0 0 auto;
    padding-left: 0.1rem;
}

.premium-hero__strip-nav .nav-sm-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.premium-hero__strip-nav .nav-sm-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--premium-strip-btn-border);
    border-radius: var(--premium-radius-sm);
    background: var(--premium-strip-btn-bg);
    color: var(--premium-strip-btn-text);
    transition: color var(--premium-duration-fast), border-color var(--premium-duration-fast), background var(--premium-duration-fast);
}

.premium-hero__strip-nav .nav-sm-buttons button:hover {
    color: var(--premium-strip-text);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 767.98px) {
    .premium-hero__strip-wrap {
        padding-top: 0.65rem;
        padding-bottom: 0.5rem;
    }

    .premium-hero__strip {
        flex-wrap: wrap;
        row-gap: 0.45rem;
        min-height: 0;
        padding: 0.5rem 0.55rem;
        background: var(--premium-strip-bg);
        border-color: var(--premium-strip-border);
        box-shadow: none;
        transform: none;
    }

    .premium-hero__strip-label {
        order: 1;
        color: var(--premium-strip-label-text);
        background: var(--premium-strip-label-bg);
        border-color: var(--premium-strip-border);
    }

    .premium-hero__strip-nav {
        order: 2;
        margin-left: auto;
    }

    .premium-hero__strip-divider {
        display: none;
    }

    .premium-hero__strip-track {
        order: 3;
        flex: 1 1 100%;
        padding-top: 0.35rem;
        border-top: 1px solid var(--premium-strip-divider);
    }

    .premium-hero__strip-track .newsticker {
        height: 1.35rem;
    }

    .premium-hero__strip-track .newsticker li {
        line-height: 1.35rem;
    }

    .premium-hero__strip-track .newsticker li a {
        font-size: 0.8125rem;
        font-weight: 500;
        color: var(--premium-strip-text-muted);
        max-width: 100%;
    }

    .premium-hero__strip-track .newsticker li a:hover {
        color: var(--premium-strip-text);
    }
}

@media (max-width: 479.98px) {
    .premium-hero__strip-label span:not(.premium-hero__strip-dot) {
        max-width: 7.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Legacy strip panel styles (unused, kept for safety) */
.premium-home-panel--strip .newsticker-container {
    padding: 0;
}

.premium-home-panel--strip .newsticker-title span {
    letter-spacing: 0.08em;
}

.premium-home-panel--hero {
    margin-bottom: 0;
}

/* Hero opening — full-width editorial block */
.premium-home-opening {
    position: relative;
    z-index: auto;
    margin-bottom: var(--premium-space-lg);
    transform: none;
    will-change: auto;
}

@media (max-width: 991.98px) {
    .premium-home-opening,
    .premium-home-panel--hero,
    .premium-home-panel--hero .premium-home-panel__surface {
        z-index: auto !important;
        transform: none !important;
        will-change: auto !important;
    }

    .premium-home-flow {
        margin-top: var(--premium-space-lg);
        padding-top: 0.15rem;
    }
}

.premium-home-panel--hero .premium-hero--opening {
    margin-bottom: 0;
}

/* Home body — main column + page sidebar from latest posts */
.premium-home-body {
    position: relative;
    z-index: 2;
    margin-top: 0;
    margin-bottom: var(--premium-space-md);
    padding-top: 0;
}

.premium-home-stack > .premium-home-body {
    margin-top: 0;
    padding-top: 0;
}

.premium-home-stack > .premium-home-panel--media + .premium-home-body,
.premium-home-stack > .premium-home-panel--media-embed + .premium-home-body {
    margin-top: calc(var(--premium-space-xl) + 0.35rem);
    padding-top: var(--premium-space-lg);
    border-top: 1px solid var(--premium-border);
}

@media (min-width: 992px) {
    .premium-home-body {
        margin-bottom: var(--premium-space-md);
    }

    .premium-home-stack > .premium-home-panel--media + .premium-home-body,
    .premium-home-stack > .premium-home-panel--media-embed + .premium-home-body {
        margin-top: calc(var(--premium-space-2xl) - 0.5rem);
        padding-top: calc(var(--premium-space-lg) + 0.25rem);
    }
}

.premium-home-body__row {
    align-items: flex-start;
    --bs-gutter-x: 1.75rem;
    margin-left: 0;
    margin-right: 0;
}

.premium-home-body__main {
    min-width: 0;
}

.premium-home-body__main > .premium-home-panel {
    margin-bottom: var(--premium-space-md);
}

.premium-home-body__main > .premium-home-panel--latest {
    margin-bottom: var(--premium-space-lg);
}

.premium-home-body__main > .premium-home-panel--latest + .premium-home-panel--media {
    margin-top: var(--premium-space-xl);
}

.premium-home-body__main > .premium-home-panel:last-child {
    margin-bottom: 0;
}

.premium-home-outside-stack > .premium-home-body.premium-home-frame {
    margin-top: 0;
    margin-bottom: 0;
}

.premium-home-body__sidebar {
    min-width: 0;
}

@media (min-width: 992px) {
    .premium-home-body__sidebar .col-sidebar.sticky-lg-top {
        top: calc(var(--premium-nav-height, 72px) + 0.75rem);
    }
}

.premium-home-sidebar__inner {
    display: flex;
    flex-direction: column;
    gap: var(--premium-space-md);
}

.premium-home-sidebar .sidebar-widget {
    padding: var(--premium-space-sm);
    border-radius: var(--premium-radius-lg);
    border: 1px solid var(--premium-border);
    background: var(--premium-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.premium-home-sidebar .sidebar-widget .widget-head {
    margin-bottom: 0;
    border-bottom: 0;
}

.premium-home-sidebar .sidebar-widget .widget-head:after {
    display: none;
}

.premium-home-sidebar .sidebar-widget:first-child {
    padding-top: 0;
}

.premium-home-sidebar .sidebar-widget:first-child .widget-head {
    display: flex;
    align-items: center;
    margin: 0 0 var(--premium-space-md);
    padding: 0 0 0.85rem;
    border-bottom: 1px solid var(--premium-border);
    min-height: calc(1.35rem + 0.85rem);
}

.premium-home-sidebar .sidebar-widget:first-child .widget-head .title {
    font-family: var(--premium-font-display);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--premium-text);
    margin: 0;
}

.premium-home-sidebar .sidebar-widget:not(:first-child) .widget-head .title {
    font-family: var(--premium-font-display);
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--premium-text);
    margin: 0 0 0.65rem;
}

/* Sidebar thumbnails — radius on wrapper, not img (legacy #fafafa bg was bleeding through corners) */
.premium-home-sidebar .post-item-small .left .image {
    background-color: var(--premium-bg-card);
    border-radius: var(--premium-radius-sm);
    overflow: hidden;
}

.premium-home-sidebar .post-item-small .left .image a {
    display: block;
    width: 100%;
    height: 100%;
}

.premium-home-sidebar .post-item-small .left .image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
}

.premium-home-sidebar .container-bn,
.premium-home-sidebar .bn-content {
    margin-left: auto;
    margin-right: auto;
}

.premium-home-flow {
    position: relative;
    z-index: 3;
    margin-top: 0;
    margin-bottom: var(--premium-space-lg);
    width: 100%;
}

.premium-home-flow .section-revista-digital {
    margin-bottom: 0;
}

.premium-home-flow .section-revista-digital > .container-xl {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Embedded revista on premium home */
.premium-home-flow .flipbook-viewer-mode-embedded .flipbook-viewer-view-wrap {
    min-height: 360px;
    height: min(520px, 58vh);
    max-height: 520px;
}

.premium-home-flow .section-revista-digital .section-title {
    margin-bottom: 1rem;
}

.premium-home-flow .section-revista-digital .section-title .title {
    font-family: var(--premium-font-display);
    font-size: var(--premium-type-h2);
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--premium-text);
}

.premium-home-body__main .premium-home-panel--latest .premium-home-panel__surface {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.premium-home-body__main .premium-home-panel--latest .premium-home-panel__inner {
    padding: 0;
}

.premium-home-latest {
    padding: 0 var(--premium-home-content-inset);
}

.premium-home-latest__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--premium-space-md);
    margin: 0 0 var(--premium-space-md);
    padding: 0 0 0.85rem;
    border-bottom: 1px solid var(--premium-border);
    min-height: calc(1.35rem + 0.85rem);
}

.premium-home-latest__title {
    font-family: var(--premium-font-display);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--premium-text);
    line-height: 1.1;
}

.premium-home-latest__link {
    color: var(--premium-accent);
    font-size: var(--premium-type-small);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.premium-home-latest__link:hover {
    color: var(--premium-text);
}

.premium-home-latest__content {
    padding: 0;
}

.premium-home-latest__more {
    display: flex;
    justify-content: center;
    margin-top: var(--premium-space-md);
}

.premium-home-body__sidebar .premium-home-sidebar {
    height: 100%;
}

.premium-home-body__sidebar .premium-home-sidebar__inner {
    padding-top: 0;
    padding-left: 0;
    padding-right: var(--premium-home-content-inset);
}

@media (min-width: 992px) {
    .premium-home-body__sidebar .premium-home-sidebar__inner {
        padding-left: calc(var(--bs-gutter-x) * 0.45);
    }
}

@media (min-width: 992px) {
    .premium-home-body__sidebar .col-sidebar.sticky-lg-top {
        top: calc(var(--premium-nav-height, 72px) + 0.75rem);
    }

    .premium-home-body__sidebar .premium-home-sidebar {
        padding-left: 0;
        border-left: 1px solid var(--premium-border);
    }
}

/* Latest posts panel */
.premium-home-panel--latest .premium-section__head {
    padding: 0 0 var(--premium-space-md);
    margin-bottom: 0;
}

.premium-home-panel--latest .premium-latest-grid {
    padding: 0;
}

/* Media library home */
.premium-ml-home-grid {
    row-gap: var(--premium-space-lg);
}

.premium-card--media .premium-card__media {
    aspect-ratio: 16 / 9;
}

.premium-card--media .premium-card__play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    color: #fff;
}

.premium-card--media .premium-card__duration {
    position: absolute;
    z-index: 3;
    right: 12px;
    bottom: 12px;
    padding: 0.25rem 0.55rem;
    border-radius: var(--premium-radius-pill);
    background: rgba(0, 0, 0, 0.65);
    font-size: 0.75rem;
    color: #fff;
}

.premium-ml-embed-shell {
    border-radius: var(--premium-radius-lg);
    overflow: hidden;
    border: 1px solid var(--premium-border);
    background: #000;
    box-shadow: var(--premium-shadow-card);
}

.premium-ml-embed-shell .plyr,
.premium-ml-embed-shell iframe,
.premium-ml-embed-shell video {
    width: 100%;
}

.premium-ml-embed-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--premium-space-sm);
    margin-top: var(--premium-space-md);
    flex-wrap: wrap;
}

/* Category blocks premium (block-1 vertical, block-2 grid) */
.premium-cat-block__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--premium-space-md);
    margin-bottom: var(--premium-space-lg);
    padding: 0;
}

.premium-cat-block__title {
    font-family: var(--premium-font-display);
    font-size: var(--premium-type-h2);
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0;
}

.premium-cat-block__title a {
    color: var(--premium-text);
}

.premium-cat-vr-grid {
    row-gap: var(--premium-space-lg);
}

.premium-card--vertical .premium-card__media {
    aspect-ratio: 3 / 4;
}

.premium-legacy-zone {
    position: relative;
    z-index: 1;
    margin: var(--premium-space-xl) 0;
    width: 100%;
}

.premium-legacy-zone .section {
    opacity: 0.88;
}

.premium-home-outside-stack {
    position: relative;
    z-index: 2;
    padding: var(--premium-space-sm) 0 var(--premium-space-xl);
    width: 100%;
    margin-top: 0;
    border-top: 1px solid var(--premium-border);
}

#premium-home > .premium-home-stack + .premium-home-outside-stack {
    margin-top: var(--premium-space-sm);
    padding-top: var(--premium-space-xs);
}

@media (min-width: 992px) {
    .premium-home-outside-stack {
        padding-bottom: var(--premium-space-xl);
    }

    #premium-home > .premium-home-stack + .premium-home-outside-stack {
        margin-top: var(--premium-space-md);
        padding-top: var(--premium-space-sm);
    }
}

.premium-home-outside-stack > .premium-home-panel--media:first-child,
.premium-home-outside-stack > .premium-home-generated-block:first-child,
.premium-home-outside-stack > .corp-home-promo:first-child {
    margin-top: 0;
}

.premium-home-outside-stack > .premium-home-panel--media {
    margin-top: var(--premium-space-lg);
}

.premium-home-outside-stack > .premium-home-panel--media:first-child {
    margin-top: 0;
}

.premium-home-generated-block,
.premium-home-outside-stack .section-home-page-block {
    padding: var(--premium-space-lg) 0;
    margin: var(--premium-space-md) 0 0;
}

.premium-home-outside-stack .premium-home-generated-block:first-of-type,
.premium-home-outside-stack .section-home-page-block:first-of-type {
    margin-top: 0;
    padding-top: var(--premium-space-xs);
}

.premium-home-stack > .premium-home-body:last-child {
    margin-bottom: var(--premium-space-xs);
}

.premium-home-outside-stack .page-block-content {
    border-radius: var(--premium-radius-md);
    overflow: hidden;
}

.premium-home-outside-stack .corp-home-promo {
    margin-top: var(--premium-space-lg);
}

.premium-home-outside-stack .corp-home-promo:first-child {
    margin-top: 0;
}

#premium-home > .premium-home-stack {
    margin-bottom: 0;
}

/* Category block tabs */
.premium-cat-block .nav-category-block {
    border: 0;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.premium-cat-block .nav-category-block .nav-link {
    border: 1px solid transparent;
    border-radius: var(--premium-radius-pill);
    color: var(--premium-text-muted);
    font-size: 0.8125rem;
    padding: 0.35rem 0.85rem;
    background: transparent;
}

.premium-cat-block .nav-category-block .nav-link.active,
.premium-cat-block .nav-category-block .nav-link:hover {
    color: var(--premium-text);
    border-color: var(--premium-border);
    background: rgba(255, 255, 255, 0.04);
}

.premium-cat-compact-grid .post-item-small {
    padding: var(--premium-space-sm);
    border-radius: var(--premium-radius-md);
    border: 1px solid var(--premium-border);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--premium-duration-fast), background var(--premium-duration-fast);
}

.premium-cat-compact-grid .post-item-small:hover {
    border-color: rgba(167, 139, 250, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.premium-cat-compact-grid .post-item-small .title a {
    color: var(--premium-text);
    font-family: var(--premium-font-display);
    font-size: 0.95rem;
}

.premium-cat-compact-grid .post-item-small .small-post-meta,
.premium-cat-compact-grid .post-item-small .post-meta {
    color: var(--premium-text-subtle);
}

.premium-ml-embed-empty {
    padding: var(--premium-space-2xl);
    text-align: center;
    color: var(--premium-text-muted);
}

.premium-ml-embed-caption {
    margin: 0;
    color: var(--premium-text-muted);
    max-width: 52ch;
}
