/* ================================
   GLOBAL BASE
================================ */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #222;
    font-size: 18px; /* Senior-friendly baseline */
}

html, body {
    height: auto;
    min-height: 100vh;
}

/* ================================
   HEADER
================================ */

header {
    background: white;
    padding: 20px 10px;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
    transition: padding 0.25s ease, box-shadow 0.25s ease;
}

header.shrink {
    padding: 20px 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
}

header p {
    margin-top: 10px;
    font-size: 1.1rem;
    color: #555;
}

/* ================================
   SEARCH BAR (Header)
================================ */

.site-search {
    margin: 20px auto 6px;
    text-align: center;
}

.site-search input[type="text"] {
    width: 260px;
    max-width: 80%;
    padding: 6px 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}

.site-search input[type="text"]:focus {
    border-color: #888;
}

.site-search button {
    padding: 6px 10px;
    margin-left: 8px;
    font-size: 1rem;
    background: #005a8d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.site-search button:hover {
    background: #003f63;
}

/* ================================
   NAVIGATION (Unified — Updated)
================================ */

header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 22px;
    margin-top: 25px;
    padding: 10px 0;
    white-space: normal;
    overflow-x: visible;
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

header.shrink nav {
    margin-top: 10px;
}

header nav a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

header nav a:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 0.8rem;
    pointer-events: none;
}

header nav a:hover {
    background: #f0f0f0;
    color: #000;
}

@media (max-width: 600px) {
    header nav {
        white-space: normal;
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px 0;
    }

    header nav a {
        font-size: 1.1rem;
        padding: 10px 14px;
    }

    header nav a::after {
        display: none;
    }
}

/* ================================
   GLOBAL LAYOUT
================================ */

.page-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.article-page {
    box-shadow: 0 0 0 1px #e0e0e0;
    max-width: 800px;
    margin: 20px auto 40px;
    padding: 30px 40px;
    background: #ffffff;
    border-radius: 6px;
}

/* ================================
   VIDEO EMBEDS (Added)
================================ */

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 25px 0;
    border-radius: 6px; /* Matches your article box corners */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ================================
   SIMILAR ARTICLES
================================ */

.similar-articles,
.related-articles {
    margin-top: 40px;
    padding: 22px 28px;
    background: #fafafa;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
}

.similar-articles h3,
.related-articles h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.3rem;
    color: #333;
}

.similar-articles ul,
.related-articles ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.similar-articles li,
.related-articles li {
    margin: 8px 0;
}

.similar-articles a,
.related-articles a {
    color: #005a8d;
    text-decoration: none;
    font-weight: 600;
}

.similar-articles a:hover,
.related-articles a:hover {
    text-decoration: underline;
    color: #003f63;
}

/* ================================
   FOOTER
================================ */

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #666;
    font-size: 0.9rem;
}

footer .disclosure-box,
footer .medical-disclaimer,
footer .copyright-line {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.25;
    margin: 4px 0;
    max-width: 700px;
}

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

.disclosure-box {
    background: none;
    border: none;
    padding: 10px 0;
    margin: 30px 0 10px;
    font-size: 0.85rem;
    color: #777;
    text-align: center;
}

.disclosure-box strong {
    color: #666;
    font-weight: 600;
}

.medical-disclaimer {
    font-size: 0.8rem;
    color: #777;
    text-align: center;
    margin: 20px 0 10px;
    line-height: 1.4;
}

/* ================================
   CATEGORY PAGE CONTAINER
================================ */

.category-page {
    max-width: 800px;
    margin: 20px auto 40px;
    padding: 32px 36px;
    background: #ffffff;
    border-radius: 6px;
    text-align: center;
}

/* LEFT‑ALIGN article list + return links */
.category-page .article-list,
.category-page .article-card,
.category-page .category-return-links {
    text-align: left;
}

/* ================================
   CATEGORY PAGES — FINAL TUNING
================================ */

.category-page h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-page .category-description {
    font-size: 1.0rem;
    line-height: 1.55;
    color: #444;
    margin-bottom: 26px;
}

.category-page .category-return-links {
    font-size: 0.95rem;
    margin-top: 40px;
}

/* ================================
   CATEGORY ARTICLE LIST LAYOUT (HYBRID)
================================ */

.article-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Tighter, cleaner spacing */
.article-card {
    margin-bottom: 4px;      /* was 6px */
    padding-bottom: 2px;     /* was 4px */
    border-bottom: 1px solid #e0e0e0;
}

/* Title spacing */
.article-card h3 {
    margin: 0;
    padding: 0;
    line-height: 1.25;
}

/* Hybrid: clean + underlined + slightly larger */
.article-card h3 a {
    font-size: 0.95rem;      /* slightly larger for readability */
    font-weight: 600;
    color: #005a8d;
    text-decoration: underline;  /* matches All Articles */
}

.article-card h3 a:hover {
    text-decoration: underline;
    color: #003f63;
}

