/**
 * IVFMag Digital Magazine — Page Template Stylesheet
 * GynoLife IVF · clinicmaster-child
 * Brand: #7761DF (purple) · #ffd66b (gold) · #1a1b2e (dark)
 */

/* =========================================================
   1. Tokens
   ========================================================= */
.ivfmag-page {
    --ivf-purple: #7761DF;
    --ivf-purple-2: #5b46c4;
    --ivf-purple-3: #3a2a8c;
    --ivf-gold: #ffd66b;
    --ivf-gold-2: #f5b942;
    --ivf-dark: #1a1b2e;
    --ivf-dark-2: #0f1020;
    --ivf-ink: #14152a;
    --ivf-text: #2b2d4a;
    --ivf-muted: #6b6e8e;
    --ivf-line: rgba(119, 97, 223, 0.18);
    --ivf-glass: rgba(255, 255, 255, 0.08);
    --ivf-glass-border: rgba(255, 255, 255, 0.18);
    --ivf-radius: 18px;
    --ivf-radius-sm: 12px;
    --ivf-shadow-soft: 0 18px 50px -22px rgba(26, 27, 46, 0.45);
    --ivf-shadow-strong: 0 30px 80px -30px rgba(58, 42, 140, 0.55);
    --ivf-ease: cubic-bezier(.22, 1, .36, 1);
    --ivf-font: "Manrope", "Poppins", "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================================================
   2. Base
   ========================================================= */
.ivfmag-page {
    font-family: var(--ivf-font);
    color: var(--ivf-text);
    background: #f7f6fb;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.ivfmag-page * { box-sizing: border-box; }

.ivfmag-page .ivf-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.ivfmag-page .ivf-section {
    padding: 96px 0;
    position: relative;
}

.ivfmag-page .ivf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivf-purple);
    background: rgba(119, 97, 223, 0.08);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--ivf-line);
}

.ivfmag-page .ivf-eyebrow::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ivf-gold);
    box-shadow: 0 0 0 3px rgba(255, 214, 107, 0.25);
}

.ivfmag-page .ivf-h1,
.ivfmag-page .ivf-h2,
.ivfmag-page .ivf-h3 {
    color: var(--ivf-ink);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0;
}
.ivfmag-page .ivf-h1 { font-size: clamp(40px, 6vw, 84px); }
.ivfmag-page .ivf-h2 { font-size: clamp(28px, 3.6vw, 44px); }
.ivfmag-page .ivf-h3 { font-size: clamp(20px, 2.2vw, 26px); }

.ivfmag-page .ivf-lead {
    font-size: clamp(15px, 1.4vw, 18px);
    color: var(--ivf-muted);
    line-height: 1.65;
    max-width: 60ch;
}

/* =========================================================
   3. Hero
   ========================================================= */
.ivfmag-hero {
    position: relative;
    min-height: 720px;
    padding: 140px 0 110px;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(255, 214, 107, 0.18), transparent 60%),
        radial-gradient(900px 500px at 0% 30%, rgba(119, 97, 223, 0.4), transparent 65%),
        linear-gradient(135deg, #1a1b2e 0%, #2a1d6b 45%, #5b46c4 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.ivfmag-hero::before,
.ivfmag-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ivfmag-hero::before {
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    z-index: 0;
}

.ivfmag-hero::after {
    background: radial-gradient(circle at 20% 80%, rgba(255, 214, 107, 0.12), transparent 40%);
    z-index: 0;
}

.ivfmag-hero .ivf-container { position: relative; z-index: 2; }

.ivfmag-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.ivfmag-hero-symbol {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    opacity: 0;
    animation: ivfFadeUp 0.8s var(--ivf-ease) forwards;
    animation-delay: 0.05s;
}

.ivfmag-hero-symbol .ivf-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ivf-gold) 0%, var(--ivf-gold-2) 100%);
    display: grid;
    place-items: center;
    color: var(--ivf-ink);
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 18px 40px -10px rgba(255, 214, 107, 0.55), inset 0 1px 0 rgba(255,255,255,0.5);
}

.ivfmag-hero-symbol .ivf-mark-label {
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.ivfmag-hero h1.ivf-hero-title {
    font-size: clamp(56px, 9vw, 132px);
    line-height: 0.92;
    letter-spacing: -0.04em;
    font-weight: 900;
    margin: 0 0 18px;
    color: #fff;
    background: linear-gradient(180deg, #fff 0%, #fff 55%, rgba(255,214,107,0.85) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: ivfFadeUp 0.9s var(--ivf-ease) forwards;
    animation-delay: 0.15s;
}

.ivfmag-hero p.ivf-hero-sub {
    font-size: clamp(16px, 1.4vw, 19px);
    color: rgba(255,255,255,0.85);
    max-width: 52ch;
    line-height: 1.65;
    margin: 0 0 28px;
    opacity: 0;
    animation: ivfFadeUp 0.9s var(--ivf-ease) forwards;
    animation-delay: 0.3s;
}

.ivfmag-hero-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.4s var(--ivf-ease), background 0.4s var(--ivf-ease), border-color 0.4s var(--ivf-ease);
    opacity: 0;
    animation: ivfFadeUp 0.9s var(--ivf-ease) forwards;
    animation-delay: 0.45s;
}

.ivfmag-hero-cta-badge:hover {
    background: rgba(255, 214, 107, 0.18);
    border-color: rgba(255, 214, 107, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.ivfmag-hero-cta-badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ivf-gold);
    box-shadow: 0 0 0 4px rgba(255, 214, 107, 0.25);
    animation: ivfPulse 1.8s ease-in-out infinite;
}

/* Hero side: 3D book mockup */
.ivfmag-hero-book {
    position: relative;
    perspective: 1600px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: ivfFadeUp 1s var(--ivf-ease) forwards;
    animation-delay: 0.4s;
}

.ivfmag-book {
    position: relative;
    width: clamp(220px, 26vw, 320px);
    aspect-ratio: 3 / 4.2;
    border-radius: 6px 14px 14px 6px;
    transform: rotateY(-22deg) rotateX(6deg);
    transform-style: preserve-3d;
    transition: transform 0.6s var(--ivf-ease);
    background:
        linear-gradient(135deg, #2a1d6b 0%, #5b46c4 55%, #1a1b2e 100%);
    box-shadow:
        0 50px 100px -20px rgba(0,0,0,0.5),
        0 30px 60px -30px rgba(255, 214, 107, 0.3),
        inset -2px 0 0 rgba(255,255,255,0.08);
    overflow: hidden;
}

.ivfmag-book::before {
    /* spine */
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0,0,0,0.45), transparent);
    z-index: 2;
}

.ivfmag-book::after {
    /* gloss */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.ivfmag-book:hover {
    transform: rotateY(-12deg) rotateX(2deg) translateY(-4px);
}

.ivfmag-book-inner {
    position: relative;
    z-index: 1;
    padding: 28px 22px 22px 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.ivfmag-book-brand {
    font-size: 11px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 8px;
}

.ivfmag-book-title {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
    background: linear-gradient(180deg, #fff, #ffd66b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ivfmag-book-issue {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.06em;
}

.ivfmag-book-divider {
    height: 2px;
    width: 40px;
    background: var(--ivf-gold);
    margin: 18px 0 14px;
    border-radius: 2px;
}

.ivfmag-book-tagline {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    line-height: 1.4;
}

.ivfmag-book-foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.7;
}

.ivfmag-book-foot strong { color: var(--ivf-gold); font-weight: 800; }

/* =========================================================
   4. Issue Showcase
   ========================================================= */
.ivfmag-showcase {
    background: #fff;
    padding-top: 120px;
}

.ivfmag-showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.ivfmag-showcase-cover {
    perspective: 1400px;
    display: flex;
    justify-content: center;
}

.ivfmag-showcase-cover .ivfmag-book {
    width: clamp(260px, 30vw, 380px);
    transform: rotateY(-18deg) rotateX(4deg);
}

.ivfmag-showcase-info .ivf-eyebrow { margin-bottom: 18px; }

.ivfmag-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 28px 0 32px;
}

.ivfmag-meta-item {
    background: linear-gradient(180deg, #faf9ff 0%, #f1eefb 100%);
    border: 1px solid var(--ivf-line);
    border-radius: var(--ivf-radius-sm);
    padding: 16px 14px;
    text-align: left;
}

.ivfmag-meta-item .label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivf-muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.ivfmag-meta-item .value {
    display: block;
    font-size: 18px;
    color: var(--ivf-ink);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ivfmag-toc {
    list-style: none;
    padding: 0; margin: 0 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 18px;
}

.ivfmag-toc li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    color: var(--ivf-text);
    line-height: 1.55;
}

.ivfmag-toc li::before {
    content: "";
    position: absolute;
    left: 0; top: 8px;
    width: 12px; height: 12px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--ivf-purple), var(--ivf-gold));
    opacity: 0.85;
}

.ivfmag-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.ivfmag-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.35s var(--ivf-ease), box-shadow 0.35s var(--ivf-ease), background 0.35s var(--ivf-ease);
    line-height: 1;
    font-family: inherit;
}

.ivfmag-btn-primary {
    background: linear-gradient(135deg, var(--ivf-purple) 0%, var(--ivf-purple-2) 100%);
    color: #fff;
    box-shadow: 0 18px 40px -14px rgba(119, 97, 223, 0.6);
}

.ivfmag-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px -16px rgba(119, 97, 223, 0.75);
    color: #fff;
}

.ivfmag-btn-ghost {
    background: transparent;
    color: var(--ivf-purple);
    border: 1.5px solid var(--ivf-line);
}

.ivfmag-btn-ghost:hover {
    background: rgba(119, 97, 223, 0.08);
    border-color: var(--ivf-purple);
    color: var(--ivf-purple);
}

.ivfmag-btn .arrow {
    width: 18px; height: 18px;
    display: inline-grid; place-items: center;
    transition: transform 0.35s var(--ivf-ease);
}
.ivfmag-btn:hover .arrow { transform: translateX(4px); }

/* =========================================================
   5. PDF Viewer
   ========================================================= */
.ivfmag-viewer-section {
    background: linear-gradient(180deg, #0f1020 0%, #1a1b2e 100%);
    color: #fff;
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}

.ivfmag-viewer-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 400px at 20% 0%, rgba(119, 97, 223, 0.25), transparent 60%),
        radial-gradient(600px 300px at 100% 100%, rgba(255, 214, 107, 0.08), transparent 60%);
    pointer-events: none;
}

.ivfmag-viewer-section .ivf-container { position: relative; z-index: 1; }

.ivfmag-viewer-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}

.ivfmag-viewer-head h2 { color: #fff; }
.ivfmag-viewer-head .ivf-eyebrow {
    color: var(--ivf-gold);
    background: rgba(255, 214, 107, 0.1);
    border-color: rgba(255, 214, 107, 0.25);
}
.ivfmag-viewer-head .ivf-eyebrow::before { background: var(--ivf-gold); }

.ivfmag-viewer-head .ivf-lead { color: rgba(255,255,255,0.72); }

.ivfmag-viewer-shell {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
}

.ivfmag-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 6px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
}

.ivfmag-tool-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
}

.ivfmag-tool-btn {
    width: 38px; height: 38px;
    border-radius: 999px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    transition: background 0.25s var(--ivf-ease), color 0.25s var(--ivf-ease), transform 0.25s var(--ivf-ease);
    font-size: 15px;
}

.ivfmag-tool-btn:hover:not(:disabled) {
    background: var(--ivf-purple);
    color: #fff;
    transform: translateY(-1px);
}

.ivfmag-tool-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.ivfmag-tool-btn svg { width: 16px; height: 16px; }

.ivfmag-page-indicator {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    padding: 0 12px;
    letter-spacing: 0.04em;
    min-width: 60px;
    text-align: center;
}

.ivfmag-page-indicator strong { color: var(--ivf-gold); }

.ivfmag-tool-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 13px; font-weight: 600;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    transition: background 0.25s var(--ivf-ease), color 0.25s var(--ivf-ease);
}
.ivfmag-tool-link:hover {
    background: var(--ivf-gold);
    color: var(--ivf-ink);
    border-color: var(--ivf-gold);
}

.ivfmag-viewer-stage {
    position: relative;
    background: #0a0a18;
    border-radius: 16px;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ivfmag-viewer-stage.loading::after {
    content: "";
    position: absolute;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: var(--ivf-gold);
    animation: ivfSpin 0.9s linear infinite;
}

#ivfmagPdfCanvasWrap {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px;
}

#ivfmagPdfCanvas {
    background: #fff;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.55);
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

#ivfmagFallbackFrame {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    border: 0;
    border-radius: 12px;
    background: #fff;
}

.ivfmag-fallback-note {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 10px;
    text-align: center;
}

.ivfmag-viewer-shell.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    border-radius: 0;
    padding: 14px;
    background: #0a0a18;
}
.ivfmag-viewer-shell.fullscreen .ivfmag-viewer-stage { min-height: calc(100vh - 130px); }
.ivfmag-viewer-shell.fullscreen #ivfmagFallbackFrame { height: calc(100vh - 130px); }

/* =========================================================
   6. Past Issues
   ========================================================= */
.ivfmag-past {
    padding: 110px 0;
    background: #f7f6fb;
}

.ivfmag-past-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 56px;
    gap: 14px;
}

.ivfmag-past-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.ivfmag-issue-card {
    position: relative;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--ivf-line);
    border-radius: var(--ivf-radius);
    padding: 28px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.45s var(--ivf-ease), box-shadow 0.45s var(--ivf-ease), border-color 0.45s var(--ivf-ease);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.ivfmag-issue-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(119,97,223,0.05), rgba(255,214,107,0.05));
    opacity: 0;
    transition: opacity 0.45s var(--ivf-ease);
    pointer-events: none;
}

.ivfmag-issue-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ivf-shadow-strong);
    border-color: rgba(119, 97, 223, 0.4);
    color: inherit;
}

.ivfmag-issue-card:hover::before { opacity: 1; }

.ivfmag-issue-card .mini-cover {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a1d6b 0%, #5b46c4 60%, #1a1b2e 100%);
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 50px -20px rgba(26,27,46,0.5);
}

.ivfmag-issue-card .mini-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0) 65%);
}

.ivfmag-issue-card .mini-cover .mc-brand {
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    opacity: 0.7;
}

.ivfmag-issue-card .mini-cover .mc-title {
    font-size: 22px; font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
    background: linear-gradient(180deg, #fff, #ffd66b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ivfmag-issue-card .mini-cover .mc-issue {
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.04em;
}

.ivfmag-issue-card .mc-divider { height: 2px; width: 30px; background: var(--ivf-gold); border-radius: 2px; margin-top: 8px; }

.ivfmag-issue-card .meta-line {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ivf-muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.ivfmag-issue-card .issue-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ivf-ink);
    margin-bottom: 6px;
}

.ivfmag-issue-card .issue-desc {
    font-size: 13px;
    color: var(--ivf-muted);
    line-height: 1.55;
}

.ivfmag-issue-card .issue-foot {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--ivf-purple);
}

.ivfmag-issue-card.is-current { border-color: rgba(119, 97, 223, 0.45); }
.ivfmag-issue-card.is-current .badge,
.ivfmag-issue-card.is-soon .badge {
    position: absolute;
    top: 18px; right: 18px;
    z-index: 2;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
}
.ivfmag-issue-card.is-current .badge {
    background: var(--ivf-gold);
    color: var(--ivf-ink);
    box-shadow: 0 8px 20px -6px rgba(255, 214, 107, 0.6);
}
.ivfmag-issue-card.is-soon .badge {
    background: rgba(119, 97, 223, 0.15);
    color: var(--ivf-purple);
}

.ivfmag-issue-card.is-soon { opacity: 0.75; }
.ivfmag-issue-card.is-soon:hover { transform: translateY(-3px); opacity: 1; }

/* =========================================================
   7. Subscription CTA
   ========================================================= */
.ivfmag-subscribe {
    padding: 110px 0;
    background:
        radial-gradient(800px 400px at 80% 100%, rgba(255, 214, 107, 0.12), transparent 60%),
        linear-gradient(135deg, #1a1b2e 0%, #2a1d6b 60%, #5b46c4 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ivfmag-subscribe::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.ivfmag-subscribe .ivf-container { position: relative; z-index: 1; }
.ivfmag-subscribe h2 { color: #fff; max-width: 22ch; margin: 14px auto 16px; }
.ivfmag-subscribe .ivf-lead { color: rgba(255,255,255,0.78); margin: 0 auto 36px; }
.ivfmag-subscribe .ivf-eyebrow {
    color: var(--ivf-gold);
    background: rgba(255, 214, 107, 0.12);
    border-color: rgba(255, 214, 107, 0.3);
}
.ivfmag-subscribe .ivf-eyebrow::before { background: var(--ivf-gold); }

.ivfmag-subscribe-form {
    display: flex;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 8px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ivfmag-subscribe-form input[type="email"] {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    padding: 12px 22px;
    outline: none;
    font-family: inherit;
}
.ivfmag-subscribe-form input::placeholder { color: rgba(255,255,255,0.55); }

.ivfmag-subscribe-form button {
    background: var(--ivf-gold);
    color: var(--ivf-ink);
    border: none;
    border-radius: 999px;
    padding: 12px 26px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.3s var(--ivf-ease), box-shadow 0.3s var(--ivf-ease);
    font-family: inherit;
}
.ivfmag-subscribe-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px rgba(255, 214, 107, 0.65);
}

.ivfmag-subscribe-fine {
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.04em;
}

/* =========================================================
   8. Animations
   ========================================================= */
@keyframes ivfFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ivfPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 214, 107, 0.25); }
    50%      { box-shadow: 0 0 0 8px rgba(255, 214, 107, 0); }
}
@keyframes ivfSpin {
    to { transform: rotate(360deg); }
}

.ivf-reveal { opacity: 0; animation: ivfFadeUp 0.9s var(--ivf-ease) forwards; }
.ivf-reveal[data-delay="1"] { animation-delay: 0.1s; }
.ivf-reveal[data-delay="2"] { animation-delay: 0.2s; }
.ivf-reveal[data-delay="3"] { animation-delay: 0.3s; }
.ivf-reveal[data-delay="4"] { animation-delay: 0.4s; }
.ivf-reveal[data-delay="5"] { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    .ivfmag-page *,
    .ivfmag-page *::before,
    .ivfmag-page *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
}

/* =========================================================
   9. Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .ivfmag-hero { min-height: auto; padding: 110px 0 80px; }
    .ivfmag-hero-grid { grid-template-columns: 1fr; gap: 50px; }
    .ivfmag-hero-book { order: -1; }
    .ivfmag-showcase-grid { grid-template-columns: 1fr; gap: 50px; }
    .ivfmag-showcase-cover { order: -1; }
    .ivfmag-toc { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .ivfmag-page .ivf-section,
    .ivfmag-past,
    .ivfmag-subscribe,
    .ivfmag-viewer-section { padding: 70px 0; }
    .ivfmag-page .ivf-container { padding: 0 18px; }
    .ivfmag-meta { grid-template-columns: 1fr 1fr; }
    .ivfmag-viewer-shell { padding: 12px; }
    .ivfmag-viewer-stage { min-height: 70vh; }
    #ivfmagPdfCanvasWrap { padding: 12px; }
    #ivfmagFallbackFrame { height: 70vh; min-height: 480px; }
    .ivfmag-subscribe-form {
        flex-direction: column;
        border-radius: 18px;
        padding: 10px;
    }
    .ivfmag-subscribe-form input[type="email"] { padding: 14px 18px; text-align: center; }
    .ivfmag-subscribe-form button { width: 100%; padding: 14px; border-radius: 14px; }
    .ivfmag-cta-row .ivfmag-btn { width: 100%; justify-content: center; }
    .ivfmag-tool-link { padding: 8px 12px; font-size: 12px; }
    .ivfmag-tool-btn { width: 34px; height: 34px; }
}

@media (max-width: 420px) {
    .ivfmag-meta { grid-template-columns: 1fr; }
    .ivfmag-viewer-toolbar { justify-content: center; }
}

/* Print: do not print magazine page itself */
@media print {
    .ivfmag-page { display: none !important; }
}
