/* MSV HS News – Frontend Styles v2.0 */
/* Rebranded with MSV Hub design system */

/* ============================================
   Astra Theme Hiding
   ============================================ */
body.msv-hs-news-page .ast-above-header,
body.msv-hs-news-page .ast-main-header-wrap,
body.msv-hs-news-page .site-header,
body.msv-hs-news-page .ast-primary-header,
body.msv-hs-news-page .ast-mobile-header-wrap,
body.msv-hs-news-page #ast-mobile-header,
body.msv-hs-news-page .main-header-bar,
body.msv-hs-news-page .ast-header-break-point .main-header-bar,
body.msv-hs-news-page .site-footer,
body.msv-hs-news-page .ast-footer,
body.msv-hs-news-page #colophon,
body.msv-hs-news-page .ast-small-footer,
body.msv-hs-news-page .site-below-footer-wrap,
body.msv-hs-news-page .ast-footer-overlay,
body.msv-hs-news-page #secondary,
body.msv-hs-news-page aside.widget-area,
body.msv-hs-news-page .sidebar,
body.msv-hs-news-page .ast-separate-container .ast-article-post,
body.msv-hs-news-page .ast-separate-container .ast-article-single,
body.msv-hs-news-page .ast-left-sidebar,
body.msv-hs-news-page .ast-right-sidebar,
body.msv-hs-news-page .main-navigation,
body.msv-hs-news-page .ast-breadcrumbs,
body.msv-hs-news-page .entry-header,
body.msv-hs-news-page .ast-archive-description {
    display: none !important;
}

body.msv-hs-news-page #primary,
body.msv-hs-news-page .site-main,
body.msv-hs-news-page .content-area,
body.msv-hs-news-page .ast-container,
body.msv-hs-news-page .site-content > .ast-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.msv-hs-news-page .entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

body.msv-hs-news-page .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.msv-hs-news-page {
    padding-top: 0 !important;
}

body.msv-hs-news-page article {
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   Hub Wrapper - Full Bleed Layout
   ============================================ */
.msv-hub {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 0;
    background: #f5f5f5;
    min-height: 100vh;
}

.msv-hub__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* MSV Brand Colors */
    --msv-hn-mint-green: #6fcf8a;
    --msv-hn-ocean-blue: #7ec8e8;
    --msv-hn-dark: #1a1a1a;
    --msv-hn-dark-alt: #2a2a2a;
    
    /* Functional Colors */
    --msv-hn-light: #f5f5f5;
    --msv-hn-text: #2D3748;
    --msv-hn-text-light: #718096;
    --msv-hn-border: #E2E8F0;
    --msv-hn-white: #FFFFFF;
    --msv-hn-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --msv-hn-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --msv-hn-radius: 8px;
    --msv-hn-radius-lg: 12px;
    --msv-hn-transition: all 0.18s ease;
}

/* ── Container ── */
.msv-hn {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--msv-hn-text);
    line-height: 1.5;
}

/* ── Header ── */
.msv-hn__header {
    background: linear-gradient(135deg, var(--msv-hn-dark) 0%, var(--msv-hn-dark-alt) 100%);
    color: #fff !important;
    padding: 32px 28px;
    border-radius: var(--msv-hn-radius-lg);
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--msv-hn-mint-green);
}

.msv-hn__header::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(111, 207, 138, 0.08);
    pointer-events: none;
}

.msv-hn__header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(111, 207, 138, 0.2);
    border: 1px solid rgba(111, 207, 138, 0.4);
    color: var(--msv-hn-mint-green);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.msv-hn__header-badge svg {
    width: 13px; height: 13px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.msv-hn__header-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: #fff !important;
    letter-spacing: -0.02em;
    line-height: 1.2 !important;
}

.msv-hn__header-sub {
    margin: 0 auto !important;
    color: rgba(255,255,255,.85) !important;
    font-size: 1rem;
    max-width: 520px;
}

@media (min-width: 768px) {
    .msv-hn__header-title { font-size: 1.85rem !important; }
}

/* ── Filters ── */
.msv-hn__filters {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--msv-hn-white);
    border-radius: var(--msv-hn-radius-lg);
    box-shadow: var(--msv-hn-shadow);
    border-left: 4px solid var(--msv-hn-mint-green);
}

.msv-hn__type-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.msv-hn__pill {
    padding: 8px 16px;
    border: 1px solid var(--msv-hn-border);
    border-radius: var(--msv-hn-radius);
    background: var(--msv-hn-white);
    font: 600 0.85rem/1 inherit;
    color: var(--msv-hn-text-light);
    cursor: pointer;
    transition: var(--msv-hn-transition);
}

.msv-hn__pill:hover {
    border-color: var(--msv-hn-mint-green);
    color: var(--msv-hn-text);
    background: var(--msv-hn-light);
}

.msv-hn__pill.is-active {
    background: var(--msv-hn-mint-green);
    border-color: var(--msv-hn-mint-green);
    color: #fff;
    box-shadow: 0 2px 8px rgba(111, 207, 138, 0.3);
}

/* ── Grid ── */
.msv-hn__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.msv-hn__grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .msv-hn__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .msv-hn__grid,
    .msv-hn__grid--2col { grid-template-columns: 1fr; }
}

/* ── Card ── */
.msv-hn__card {
    background: var(--msv-hn-white);
    border: 1px solid var(--msv-hn-border);
    border-radius: var(--msv-hn-radius-lg);
    overflow: hidden;
    box-shadow: var(--msv-hn-shadow);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--msv-hn-transition);
    animation: msv-hn-fade-in 0.35s ease forwards;
    opacity: 0;
}

.msv-hn__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--msv-hn-shadow-lg);
    border-color: var(--msv-hn-mint-green);
}

.msv-hn__card.is-hidden { display: none; }

@keyframes msv-hn-fade-in {
    from { opacity:0; transform:translateY(10px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Card image */
.msv-hn__card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--msv-hn-light);
}

.msv-hn__card-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.msv-hn__card:hover .msv-hn__card-img {
    transform: scale(1.03);
}

/* Placeholder when no image */
.msv-hn__card-img-wrap--no-img {
    background: linear-gradient(135deg, #e8edf4 0%, #d0daea 100%);
}

.msv-hn__card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
}

.msv-hn__card-img-placeholder svg {
    width: 40px; height: 40px;
    stroke: #a0aec0;
}

/* Category badges overlay */
.msv-hn__card-badges {
    position: absolute;
    bottom: 8px; left: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.msv-hn__card-cat {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--msv-hn-dark);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    white-space: nowrap;
}

/* Per-category accent colours */
.msv-hn__card-cat[data-slug="meet-recaps"]            { background: #1d4ed8; }
.msv-hn__card-cat[data-slug="section-previews"]       { background: #7c3aed; }
.msv-hn__card-cat[data-slug="meet-previews"]          { background: #0891b2; }
.msv-hn__card-cat[data-slug="performances-of-the-week"] { background: #b45309; }
.msv-hn__card-cat[data-slug="meets-of-the-week"]      { background: #065f46; }
.msv-hn__card-cat--rss                                { background: #6b7280; }

/* Card body */
.msv-hn__card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.msv-hn__card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.msv-hn__card-source {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--msv-hn-mint-green);
}

.msv-hn__card-date {
    font-size: 0.72rem;
    color: var(--msv-hn-text-light);
    white-space: nowrap;
}

.msv-hn__card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--msv-hn-dark);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.msv-hn__card-excerpt {
    font-size: 0.82rem;
    color: var(--msv-hn-text-light);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.msv-hn__card-read {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    background: none;
    border: none;
    padding: 0;
    font: 600 0.8rem/1 inherit;
    color: var(--msv-hn-mint-green);
    cursor: pointer;
    text-decoration: none;
    transition: var(--msv-hn-transition);
}

.msv-hn__card-read:hover { 
    gap: 8px; 
    color: var(--msv-hn-mint-green); 
    text-decoration: none; 
}

.msv-hn__card-read svg { flex-shrink: 0; }

/* ── No results ── */
.msv-hn__no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 24px;
    color: var(--msv-hn-text-light);
    text-align: center;
}

.msv-hn__no-results svg { opacity: .35; }
.msv-hn__no-results p   { margin: 0; font-size: 0.95rem; }

/* ══════════════════════════════════════
   MODAL
   ══════════════════════════════════════ */
.msv-hn-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.msv-hn-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 40, 0.65);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.msv-hn-modal__box {
    position: relative;
    background: var(--msv-hn-white);
    border-radius: var(--msv-hn-radius-lg);
    box-shadow: var(--msv-hn-shadow-lg);
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: msv-hn-modal-in 0.22s ease;
}

@keyframes msv-hn-modal-in {
    from { opacity:0; transform:translateY(16px) scale(.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

.msv-hn-modal__close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px 0 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--msv-hn-dark);
    transition: var(--msv-hn-transition);
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.msv-hn-modal__close:hover { 
    background: var(--msv-hn-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.msv-hn-modal__img-wrap {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border-radius: var(--msv-hn-radius-lg) var(--msv-hn-radius-lg) 0 0;
    margin-top: -46px;
}

.msv-hn-modal__img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.msv-hn-modal__body {
    padding: 20px 24px 28px;
}

.msv-hn-modal__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.msv-hn-modal__source {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--msv-hn-mint-green);
}

.msv-hn-modal__date {
    display: block;
    font-size: 0.75rem;
    color: var(--msv-hn-text-light);
}

.msv-hn-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--msv-hn-dark);
    line-height: 1.3;
    margin: 0 0 14px;
}

.msv-hn-modal__content {
    font-size: 0.9rem;
    color: var(--msv-hn-text);
    line-height: 1.65;
    margin-bottom: 20px;
}

.msv-hn-modal__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--msv-hn-mint-green);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--msv-hn-radius);
    font: 600 0.875rem/1 inherit;
    transition: var(--msv-hn-transition);
    box-shadow: 0 2px 8px rgba(111, 207, 138, 0.3);
}

.msv-hn-modal__link:hover {
    background: #5cbd78;
    box-shadow: 0 4px 12px rgba(111, 207, 138, 0.4);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* Mobile modal */
@media (max-width: 540px) {
    .msv-hn-modal { padding: 0; align-items: flex-end; }
    .msv-hn-modal__box {
        border-radius: var(--msv-hn-radius-lg) var(--msv-hn-radius-lg) 0 0;
        max-height: 92vh;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .msv-hub__content {
        padding: 16px 12px 32px;
    }
    
    .msv-hn__header {
        padding: 24px 16px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .msv-hub {
        width: 100%;
        margin: 0;
    }
    
    .msv-hn__card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .msv-hn__card:hover {
        transform: none;
    }
}
