/* ================================
   БАЗОВІ СТИЛІ СТОРІНКИ
   ================================ */

/* Основний фон та типографіка */
body {
    background: #eef4f7; /* дуже світлий медичний блакитно-сірий */
    color: #1a1a1a; /* темний текст для читабельності */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Заголовки */
h1, h2, h3 {
    color: #1f4e5f; /* глибокий медичний синьо-графітовий */
}

/* HERO-блок */
.hero {
    background: #f7fbfd; /* стерильний світлий медичний фон */
    padding: 80px 20px;
    border-bottom: 1px solid #d3e3ea; /* тонка холодна лінія */
}

/* ================================
   CTA-КНОПКА (медична, стримана)
   ================================ */

.cta-btn {
    background: #2c6e8f; /* холодний насичений медичний синій */
    color: #ffffff;
    padding: 20px 48px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.35rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 0 #1f5168; /* темніша синя тінь */
    transition: 0.2s ease;
}

/* Ховер-ефект CTA */
.cta-btn:hover {
    background: #255d78; /* темніший синій */
    box-shadow: 0 3px 0 #1a4558;
    transform: translateY(1px);
    color: #ffffff;
}

/* ================================
   КАРТКИ
   ================================ */

.card {
    border: 1px solid #d3e3ea; /* холодний медичний бордер */
    border-radius: 12px;
}

/* Однакова висота карток */
.equal-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

/* ================================
   TOC (Зміст)
   ================================ */

#toc a {
    text-decoration: none;
    color: #2c6e8f; /* синій акцент */
}

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

/* ================================
   АНІМАЦІЇ CTA (адаптовані під синій)
   ================================ */

/* Пульсація */
@keyframes ctaPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(44, 110, 143, 0.0);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 18px rgba(44, 110, 143, 0.45);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(44, 110, 143, 0.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 */
.cta-animated {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ================================
   СОРТУВАННЯ В ТАБЛИЦЯХ
   ================================ */

.sort-indicator {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-left: 4px;
}

th.asc .sort-indicator,
th.desc .sort-indicator {
    opacity: 1;
}

th.active-sort,
td.active-sort {
    background: #e6f1f5 !important; /* дуже світлий медичний синій */
    transition: background 0.25s ease;
}

/* ================================
   SVG-ІКОНКИ
   ================================ */

.benefit-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    fill: #1f4e5f; /* як заголовки */
    opacity: 0.9;
}

/* ================================
   ПЛИТКИ RELATED-LINKS
   ================================ */

#related-links .tile {
    background: #ffffff;
    border: 1px solid #d3e3ea;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

#related-links .tile h5 {
    color: #1f4e5f;
    font-weight: 700;
    margin-bottom: 8px;
}

#related-links .tile p {
    color: #3a4f54; /* холодний нейтральний текст */
    margin: 0;
}

#related-links .tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(31, 78, 95, 0.18);
    border-color: #2c6e8f;
}

#related-links .tile-link {
    text-decoration: none;
    color: inherit;
}
