/* ============================================
   ROOT COLORS — Medical Premium Palette
============================================ */
:root {
    --med-bg: #F5F7FA;
    --med-white: #FFFFFF;
    --med-blue: #2A4C6B;
    --med-blue-light: #EDF3FA;
    --med-blue-light-2: #E6EEF7;
    --med-border: #E3E8EF;
    --med-graphite: #1C1F24;
    --med-turquoise-light: #3BB7C4;
    --med-turquoise-dark: #2FA5B2;
    --med-turquoise-shadow: #278F9A;
    --med-turquoise-shadow-hover: #1F7C86;
}

/* ============================================
   GLOBAL
============================================ */
body {
    background: var(--med-bg);
    color: var(--med-graphite);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3 {
    color: var(--med-blue);
}

.hero {
    background: var(--med-white);
    padding: 80px 20px;
    border-bottom: 1px solid var(--med-border);
}

.card {
    border: 1px solid var(--med-border);
    border-radius: 12px;
    background: var(--med-white);
}

#toc a {
    text-decoration: none;
    color: var(--med-blue);
}

#toc a:hover {
    text-decoration: underline;
}

/* ============================================
   ICONS
============================================ */
.benefit-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    fill: var(--med-turquoise-light);
    opacity: 0.95;
}

/* ============================================
   BADGES — Multi‑Color Attention Set
============================================ */
.badge {
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin: 6px;
}

.badge-green {
    background: #D9F4E6;
    color: #0F4D2C;
}

.badge-blue {
    background: #DDEBFF;
    color: #1A3F6B;
}

.badge-purple {
    background: #EFE3FF;
    color: #3A2A7A;
}

.badge-orange {
    background: #FFE7D1;
    color: #7A3A00;
}

/* ============================================
   CTA BUTTON — Medical Premium Turquoise
============================================ */
.cta-btn {
    background: linear-gradient(to bottom, var(--med-turquoise-light) 0%, var(--med-turquoise-dark) 100%);
    color: var(--med-graphite);
    padding: 20px 48px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 1.35rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 0 var(--med-turquoise-shadow);
    transition: 0.2s ease;
}

.cta-btn:hover {
    background: linear-gradient(to bottom, var(--med-turquoise-dark) 0%, var(--med-turquoise-shadow) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 3px 0 var(--med-turquoise-shadow-hover);
    transform: translateY(1px);
}

/* CTA animations */
@keyframes ctaPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(59, 183, 196, 0);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 18px rgba(59, 183, 196, 0.45);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(59, 183, 196, 0);
    }
}

.cta-pulse {
    animation: ctaPulse 6s ease-in-out infinite;
}

@keyframes ctaShake {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-2px);
    }
    50% {
        transform: translateX(2px);
    }
    75% {
        transform: translateX(-1px);
    }
    100% {
        transform: translateX(0);
    }
}

.cta-btn-hover:hover {
    animation: ctaShake 0.25s ease;
}

.cta-animated {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.cta-animated.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CTA BOX — Saturated Premium Block
============================================ */
.cta-box {
    background: linear-gradient(to bottom, #3A6EA5 0%, #2F5C8A 100%);
    border-radius: 18px;
    padding: 48px 36px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    color: #fff;
    margin-top: 20px;
}

.cta-box-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 24px;
}

.cta-box-text {
    font-size: 1.15rem;
    color: #F0F4F8;
    margin: 28px 0;
    line-height: 1.6;
}

/* ============================================
   FAQ — Apple‑Style Accordion
============================================ */
.faq-section {
    background: var(--med-bg);
}

.faq-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--med-blue);
    margin-bottom: 32px;
}

.faq-item {
    border: 1px solid var(--med-border);
    border-radius: 14px;
    background: var(--med-white);
    margin-bottom: 22px;
    overflow: hidden;
    transition: box-shadow 0.35s ease;
}

.faq-item.open {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.faq-question {
    width: 100%;
    background: var(--med-blue-light);
    color: var(--med-blue);
    font-weight: 600;
    font-size: 1.15rem;
    padding: 22px 26px;
    border: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.25s ease, padding 0.25s ease;
}

.faq-item.open .faq-question {
    background: var(--med-blue-light-2);
    padding: 24px 26px;
}

.faq-icon {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--med-turquoise-light);
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1.4);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    background: var(--med-white);
    color: var(--med-graphite);
    font-size: 1rem;
    line-height: 1.55;
    padding: 0 26px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.55s cubic-bezier(0.25, 0.1, 0.25, 1.4),
    padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 20px 26px 26px;
}

.faq-answer p {
    margin: 0;
}

/* ============================================
   Sticky CTA
============================================ */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ecececdd;
    backdrop-filter: blur(6px);
    border-top: 1px solid #cfdedb;
    padding: 16px 20px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sticky-cta.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

@media (max-width: 420px) {
    .sticky-cta {
        padding: 12px;
    }

    .sticky-cta .cta-btn {
        padding: 16px 28px;
        font-size: 1.1rem;
    }
}

/* ============================
   TOC — Medical Premium
============================ */
.toc-section {
}

.toc-card {
    border: 1px solid var(--med-border);
    border-radius: 14px;
}

.toc-toggle {
    cursor: pointer;
    color: var(--med-blue);
    user-select: none;
}

.toc-content {
    display: none;
}

.toc-content ul li a {
    color: var(--med-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-content ul li a:hover {
    text-decoration: underline;
}

/* ============================================
   RELATED PAGES — Medical Premium Tile Grid
============================================ */
.related-section {
}

.related-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--med-blue);
    margin-bottom: 32px;
}

/* Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* Tile */
.related-tile {
    background: var(--med-white);
    border: 1px solid var(--med-border);
    border-radius: 14px;
    padding: 24px 22px;
    text-decoration: none;
    display: block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.related-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* Tile Title */
.related-tile-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--med-blue);
    margin-bottom: 8px;
}

/* Tile Text */
.related-tile-text {
    font-size: 0.95rem;
    color: var(--med-graphite);
    line-height: 1.45;
}

.trust-footer-badge {
    background: #eef3ff; /* мягкий медицинский голубой */
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: inline-block;
}

.trust-footer-badge:nth-child(2) {
    background: #f3f7ff; /* светлый клинический */
}

.trust-footer-badge:nth-child(3) {
    background: #f7faff; /* почти белый, но не сливается */
}

.trust-footer-badge:nth-child(4) {
    background: #eef8ff; /* мягкий голубой с оттенком */
}

.trust-footer-badge:nth-child(5) {
    background: #f5f9ff; /* нейтральный медицинский */
}

.trust-footer-badge:nth-child(6) {
    background: #eaf2ff; /* самый насыщенный из мягких */
}

.trust-footer-badge:nth-child(7) {
    background: #f2f6ff; /* клинический серо‑голубой */
}

.trust-footer-badge a {
    color: #2c3e50;
    font-weight: 500;
}

/* Desktop: картинка справа */
.page-img {
    max-width: 360px;
}

/* Mobile: картинка сверху */
@media (max-width: 768px) {
    .page-img {
        float: none !important;
        display: block !important;
        margin: 0 auto 24px auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}