/* MSV Workout Hub - Styles */
/* Version: 1.0.0 */

/* ============================================
   HIDE ASTRA THEME HEADER/NAV/FOOTER
   ============================================ */
body.msv-workout-hub-page .ast-above-header,
body.msv-workout-hub-page .ast-below-header,
body.msv-workout-hub-page .ast-main-header-wrap,
body.msv-workout-hub-page .site-header,
body.msv-workout-hub-page #masthead,
body.msv-workout-hub-page .ast-primary-header,
body.msv-workout-hub-page .ast-mobile-header-wrap,
body.msv-workout-hub-page .main-header-bar,
body.msv-workout-hub-page .ast-header-break-point,
body.msv-workout-hub-page .site-footer,
body.msv-workout-hub-page .ast-footer-overlay,
body.msv-workout-hub-page .ast-small-footer,
body.msv-workout-hub-page #colophon,
body.msv-workout-hub-page footer.site-footer {
    display: none !important;
}

body.msv-workout-hub-page,
body.msv-workout-hub-page #page,
body.msv-workout-hub-page #content,
body.msv-workout-hub-page .site-content,
body.msv-workout-hub-page .ast-container,
body.msv-workout-hub-page .site-main,
body.msv-workout-hub-page .entry-content,
body.msv-workout-hub-page article,
body.msv-workout-hub-page .ast-article-single,
body.msv-workout-hub-page .ast-separate-container .ast-article-single,
body.msv-workout-hub-page .ast-separate-container .ast-article-post,
body.msv-workout-hub-page .ast-plain-container,
body.msv-workout-hub-page .post-content,
body.msv-workout-hub-page .page-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

body.msv-workout-hub-page .ast-separate-container .ast-article-single,
body.msv-workout-hub-page .ast-separate-container #primary {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --msv-mint-green:      #6fcf8a;
    --msv-dark:            #1a1a1a;
    --msv-dark-alt:        #2a2a2a;
    --msv-thub-primary:    #002855;
    --msv-thub-secondary:  #C8102E;
    --msv-thub-gold:       #FFB81C;
    --msv-thub-light:      #F4F6F8;
    --msv-thub-dark:       #1A1A2E;
    --msv-thub-text:       #2D3748;
    --msv-thub-muted:      #718096;
    --msv-thub-border:     #E2E8F0;
    --msv-thub-white:      #FFFFFF;
    --msv-thub-shadow:     0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --msv-thub-shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --msv-thub-radius:     8px;
    --msv-thub-radius-lg:  12px;
    --msv-thub-transition: all 0.2s ease;
}

/* ============================================
   SVG containment — prevent theme from scaling icons
   ============================================ */
.msv-thub svg {
    max-width: none !important;
    max-height: none !important;
    vertical-align: middle;
    flex-shrink: 0;
}

/* The header wave and search icon are rendered as SVG inline —
   lock them to the explicit w/h set on the element */
.msv-thub__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.msv-thub__icon svg,
.msv-thub__search-icon svg,
.msv-thub__search-clear svg {
    display: block !important;
    flex-shrink: 0;
}

/* ============================================
   Base Container — Full Bleed
   ============================================ */
.msv-thub {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--msv-thub-text);
    line-height: 1.6;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 0;
    background: var(--msv-thub-light);
}

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

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

.msv-thub__header-inner { max-width: 800px; margin: 0 auto; }

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

.msv-thub__header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(111,207,138,.18);
    border: 1px solid rgba(111,207,138,.35);
    color: var(--msv-mint-green);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.msv-thub__header-badge svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.msv-thub__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -.02em;
    color: #fff !important;
}

.msv-thub__subtitle {
    color: rgba(255,255,255,.8) !important;
    font-size: .95rem;
    max-width: 600px;
    margin: 0 auto 12px;
}

.msv-thub__source {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .8rem;
    color: rgba(255,255,255,.55);
}
.msv-thub__source a { color: var(--msv-mint-green); text-decoration: none; }
.msv-thub__source a:hover { text-decoration: underline; }
.msv-thub__source svg { stroke: currentColor; fill: none; }

@media (min-width: 768px) {
    .msv-thub__header { padding: 40px 24px 32px; }
    .msv-thub__title  { font-size: 2rem; }
}

/* ============================================
   Controls: Search + Tabs
   ============================================ */
.msv-thub__controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* Search */
.msv-thub__search-wrap {
    position: relative;
    max-width: 460px;
}

.msv-thub__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--msv-thub-muted);
    display: flex;
    pointer-events: none;
}
.msv-thub__search-icon svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2; }

.msv-thub__search {
    width: 100%;
    padding: 10px 38px 10px 38px;
    border: 1px solid var(--msv-thub-border);
    border-radius: var(--msv-thub-radius-lg);
    font-size: .9rem;
    background: var(--msv-thub-white);
    color: var(--msv-thub-text);
    box-shadow: var(--msv-thub-shadow);
    outline: none;
    transition: var(--msv-thub-transition);
    font-family: inherit;
}
.msv-thub__search:focus {
    border-color: var(--msv-thub-primary);
    box-shadow: 0 0 0 3px rgba(0,40,85,.12), var(--msv-thub-shadow);
}
.msv-thub__search::placeholder { color: var(--msv-thub-muted); }

.msv-thub__search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--msv-thub-muted);
    padding: 3px;
    display: flex;
    border-radius: 4px;
    transition: var(--msv-thub-transition);
}
.msv-thub__search-clear:hover { color: var(--msv-thub-secondary); background: rgba(200,16,46,.08); }
.msv-thub__search-clear svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2.5; }

/* Tabs */
.msv-thub__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.msv-thub__tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--msv-thub-border);
    background: var(--msv-thub-white);
    color: var(--msv-thub-muted);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--msv-thub-transition);
    font-family: inherit;
    white-space: nowrap;
}
.msv-thub__tab:hover {
    border-color: var(--msv-thub-primary);
    color: var(--msv-thub-primary);
    background: #EBF0F8;
}
.msv-thub__tab.is-active {
    background: var(--msv-thub-primary);
    border-color: var(--msv-thub-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,40,85,.25);
}

/* Status bar */
.msv-thub__status {
    font-size: .82rem;
    color: var(--msv-thub-muted);
    margin-bottom: 8px;
    min-height: 1.4em;
}

/* ============================================
   Article Grid
   ============================================ */
.msv-thub__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 600px) {
    .msv-thub__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .msv-thub__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
    .msv-thub__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   Article Card
   ============================================ */
.msv-thub__card {
    background: var(--msv-thub-white);
    border-radius: var(--msv-thub-radius-lg);
    border: 1px solid var(--msv-thub-border);
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
    animation: msv-thub-fade-in .3s ease forwards;
    opacity: 0;
}

.msv-thub__card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

.msv-thub__card[hidden] { display: none; }

/* Thumbnail */
.msv-thub__card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--msv-thub-light);
    flex-shrink: 0;
    text-decoration: none;
}

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

.msv-thub__card:hover .msv-thub__card-thumb img {
    transform: scale(1.04);
}

.msv-thub__card-thumb--placeholder {
    background: linear-gradient(135deg, #1a1a2e 0%, #002855 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wave icon for text-only posts */
.msv-thub__card-thumb--placeholder::after {
    content: '';
    display: block;
    width: 48px;
    height: 32px;
    opacity: 0.2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M0 8c1.5-2 3-2 4.5 0s3 2 4.5 0 3-2 4.5 0 3 2 4.5 0'/%3E%3Cpath d='M0 14c1.5-2 3-2 4.5 0s3 2 4.5 0 3-2 4.5 0 3 2 4.5 0'/%3E%3Cpath d='M0 2c1.5-2 3-2 4.5 0s3 2 4.5 0 3-2 4.5 0 3 2 4.5 0'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Body */
.msv-thub__card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

/* Meta row: source · date */
.msv-thub__card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--msv-thub-muted);
    flex-wrap: wrap;
}

.msv-thub__card-source {
    color: var(--msv-thub-primary);
}

/* Feed label badge (Progression Drills, Drill of the Month, Training Intel) */
.msv-thub__card-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--msv-thub-primary);
    white-space: nowrap;
}

.msv-thub__card-sep { opacity: .4; font-weight: 400; }

.msv-thub__card-date { color: var(--msv-thub-muted); }

/* Title */
.msv-thub__card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--msv-thub-dark);
}

.msv-thub__card-title a {
    color: inherit;
    text-decoration: none;
}

.msv-thub__card-title a:hover {
    color: var(--msv-thub-primary);
}

/* Excerpt */
.msv-thub__card-desc {
    font-size: .85rem;
    color: var(--msv-thub-muted);
    line-height: 1.55;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read Article link */
.msv-thub__card-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--msv-thub-text);
    text-decoration: none;
    margin-top: 4px;
    transition: color .15s ease;
}

.msv-thub__card-link:hover {
    color: var(--msv-thub-primary);
}

.msv-thub__card-link-arrow {
    font-size: 1.1rem;
    line-height: 1;
    margin-left: 1px;
}

/* Staggered fade-in */
@keyframes msv-thub-fade-in {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ============================================
   Empty / No Results States
   ============================================ */
.msv-thub__empty,
.msv-thub__no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--msv-thub-muted);
}
.msv-thub__empty svg,
.msv-thub__no-results svg {
    width: 40px; height: 40px;
    stroke: var(--msv-thub-border);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 12px;
}
.msv-thub__empty p,
.msv-thub__no-results p { font-size: .9rem; margin: 0; }
.msv-thub__empty a,
.msv-thub__no-results a,
.msv-thub__reset-link {
    color: var(--msv-thub-primary);
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}

/* ============================================
   Footer attribution
   ============================================ */
.msv-thub__footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--msv-thub-border);
    text-align: center;
    font-size: .8rem;
    color: var(--msv-thub-muted);
}
.msv-thub__footer a { color: var(--msv-thub-primary); }

/* ============================================
   Print
   ============================================ */
@media print {
    .msv-thub__controls { display: none; }
    .msv-thub__card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
    .msv-thub__card:hover { transform: none; }
}
