/* ============================================================
   TALAS - Thai Association for Laboratory Animal Science
   Public theme
   ============================================================ */
:root {
    --navy:      #0a2a66;
    --navy-deep: #07235a;
    --navy-2:    #103a86;
    --blue:      #1f6fe0;
    --blue-soft: #3b82f6;
    --blue-link: #1d6fd8;
    --ink:       #2b3445;
    --muted:     #5a667a;
    --line:      #e3e9f2;
    --bg-soft:   #eef4fb;
    --bg-grey:   #f4f7fb;
    --white:     #ffffff;
    --radius:    14px;
    --shadow:    0 18px 40px rgba(10, 42, 102, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
    margin: 0;
    font-family: 'Poppins', 'Sarabun', system-ui, sans-serif;
    color: var(--ink);
    background: var(--white);
    line-height: 1.65;
    font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-link); text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: 'Poppins', 'Sarabun', sans-serif; color: var(--navy); line-height: 1.25; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: .2s;
}
.btn-primary { background: var(--blue-soft); color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-ghost { background: var(--navy); color: #fff; }
.btn-ghost:hover { background: var(--navy-2); }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: #fff;
    box-shadow: 0 2px 14px rgba(10,42,102,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.brand-text { font-weight: 800; font-size: 26px; letter-spacing: 1px; color: var(--navy); }
.main-nav { min-width: 0; }
.main-nav ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px 18px; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: #243049; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--blue); }
.main-nav a.nav-cta { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 2px; }

/* ---------- Nav auth dropdown (Login / Register / Account) ---------- */
.nav-auth { position: relative; }
.nav-auth-toggle {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-soft); color: var(--navy);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 9px 16px 9px 14px; font-weight: 600; font-size: 14.5px;
    cursor: pointer; transition: .2s; line-height: 1;
}
.nav-auth-toggle:hover { background: #e2ecfb; border-color: #cfe0f7; }
.nav-auth-toggle.active,
.nav-auth-toggle[aria-expanded="true"] { background: var(--blue-soft); color: #fff; border-color: var(--blue-soft); }
.nav-auth-toggle--cta {
    background: linear-gradient(135deg, var(--blue-soft), var(--blue));
    color: #fff; border-color: transparent;
    box-shadow: 0 8px 18px rgba(31,111,224,.25);
}
.nav-auth-toggle--cta:hover {
    background: linear-gradient(135deg, #2563eb, #0a2a66);
    box-shadow: 0 10px 24px rgba(10,42,102,.38);
    transform: translateY(-1px);
}
.nav-auth-caret { transition: transform .2s; flex-shrink: 0; }
.nav-auth.open .nav-auth-caret { transform: rotate(180deg); }
.nav-auth-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--blue-soft); color: #fff; font-size: 12px; font-weight: 700;
    flex-shrink: 0;
}
.nav-auth-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-auth-menu {
    position: absolute; top: calc(100% + 10px); right: 0;
    min-width: 220px; background: #fff; border-radius: 14px;
    box-shadow: 0 18px 40px rgba(10,42,102,.16); border: 1px solid var(--line);
    padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 60;
}
.nav-auth.open .nav-auth-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-auth-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 9px;
    font-weight: 500; font-size: 14.5px; color: var(--ink);
    transition: background .15s, color .15s;
}
.nav-auth-menu a svg { flex-shrink: 0; color: var(--blue); }
.nav-auth-menu a:hover, .nav-auth-menu a.active { background: var(--bg-soft); color: var(--blue); }
.nav-auth-menu a.nav-auth-primary { background: var(--blue-soft); color: #fff; margin-top: 2px; }
.nav-auth-menu a.nav-auth-primary svg { color: #fff; }
.nav-auth-menu a.nav-auth-primary:hover { background: #2563eb; }
.nav-auth-menu a.nav-auth-logout { color: #b42323; }
.nav-auth-menu a.nav-auth-logout svg { color: #b42323; }
.nav-auth-menu a.nav-auth-logout:hover { background: #fdecec; }

@media (max-width: 980px) {
    .nav-auth-menu { position: static; box-shadow: none; border: 0; opacity: 1; visibility: visible; transform: none; padding: 6px 0 0; display: none; }
    .nav-auth.open .nav-auth-menu { display: block; }
    .nav-auth-toggle { width: 100%; justify-content: space-between; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--navy-deep);
    color: #fff;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}
/* full-bleed background photo */
.hero-media { position: absolute; inset: 0; z-index: 1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; display: block; }
/* faint blue ring crescent (slightly larger ellipse, sits under the navy panel) */
.hero-ring {
    position: absolute; inset: 0; z-index: 2;
    background: rgba(120,170,255,.55);
    -webkit-clip-path: ellipse(61% 132% at -6% 50%);
    clip-path: ellipse(61% 132% at -6% 50%);
}
/* navy curved panel over the photo */
.hero-panel {
    position: absolute; inset: 0; z-index: 3;
    background: linear-gradient(135deg, #07235a 0%, #0c2f72 58%, #103a86 100%);
    -webkit-clip-path: ellipse(60.4% 130% at -6% 50%);
    clip-path: ellipse(60.4% 130% at -6% 50%);
}
.hero-glow {
    position: absolute; left: 22%; top: -25%;
    width: 50%; height: 150%;
    background: radial-gradient(circle, rgba(86,146,255,.30), transparent 62%);
    z-index: 4; pointer-events: none;
}
.hero-inner { position: relative; z-index: 5; width: 100%; }
.hero-text { max-width: 560px; }
.hero-text .eyebrow { color: #cfe0ff; font-size: 23px; font-weight: 700; letter-spacing: .2px; margin-bottom: 14px; line-height: 1.3; }
.hero-text h1 { color: #fff; font-size: 58px; font-weight: 800; margin: 0 0 16px; letter-spacing: 1px; line-height: 1.05; }
.hero-text p.sub { font-size: 17px; font-weight: 500; color: #e3ecfb; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn { padding: 14px 28px; border-radius: 6px; font-size: 15px; }
.hero-actions .btn-outline { border-color: #fff; background: #fff; color: var(--blue); }
.hero-actions .btn-outline:hover { background: #eef4fb; }

/* ---------- Section scaffolding ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-soft); }
.section-eyebrow { color: var(--blue); font-weight: 600; font-size: 14px; letter-spacing: .5px; text-align: center; }
.section-title { font-size: 34px; font-weight: 800; text-align: center; margin: 6px 0 40px; }
.section-title.left, .section-eyebrow.left { text-align: left; }

/* ---------- News / cards ---------- */
.news-carousel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.poster-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: .25s;
}
.poster-card:hover { transform: translateY(-6px); }
.poster-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 50px; align-items: center; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-photos img { border-radius: 12px; box-shadow: var(--shadow); height: 100%; object-fit: cover; }
.about-photos .span-2 { grid-column: span 2; }
.about-text h2 { font-size: 30px; margin: 6px 0 18px; }
.about-text p { color: var(--muted); margin: 0 0 16px; }

/* ---------- Mission ---------- */
.mission-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; }
.mission-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mission-photos img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; }
.numbered-list { list-style: none; margin: 0; padding: 0; }
.numbered-list li { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.numbered-list .num { color: var(--blue); font-weight: 800; font-size: 22px; min-width: 28px; }
.numbered-list .txt { color: var(--ink); font-weight: 500; }

/* ---------- Aims (dark) ---------- */
.aims {
    background: linear-gradient(120deg, var(--navy-deep), var(--navy-2));
    color: #fff; position: relative; overflow: hidden;
}
.aims .section-title { color: #fff; }
.aims-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.aims-list { list-style: none; margin: 0; padding: 0; }
.aims-list li { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.aims-list .num { color: #8fb6ff; font-weight: 800; font-size: 20px; min-width: 26px; }
.aims-list .txt { color: #dbe6fb; }
.aims-media img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- History block on home ---------- */
.history-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; }
.history-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.history-photos .big { grid-column: span 2; }
.history-photos img { border-radius: 12px; object-fit: cover; width: 100%; }
.history-stats { display: flex; gap: 36px; margin-top: 22px; flex-wrap: wrap; }
.history-stats .stat .big-num { color: var(--blue); font-size: 34px; font-weight: 800; }
.history-stats .stat span { display: block; color: var(--muted); font-size: 13px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 0; padding-left: 40px; }
.timeline::before { content:""; position:absolute; left:8px; top:6px; bottom:6px; width:2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content:""; position:absolute; left:-40px; top:2px; width:16px; height:16px;
    border-radius:50%; background: var(--blue); border:3px solid #fff; box-shadow: 0 0 0 2px var(--blue);
}
.timeline-year { color: var(--blue); font-weight:800; font-size:19px; margin-bottom:4px; }
.timeline-item h4 { margin: 0 0 6px; font-size:17px; color: var(--ink); }
.timeline-item p { margin:0; color: var(--muted); }

/* ---------- Page banner ---------- */
.page-banner {
    background: linear-gradient(115deg, var(--navy-deep), var(--navy-2));
    color: #fff; padding: 64px 0; position: relative; overflow: hidden;
}
.page-banner::after {
    content:""; position:absolute; right:-5%; top:-40%; width:50%; height:180%;
    background: radial-gradient(circle at 40% 50%, rgba(31,111,224,.4), transparent 60%); transform: rotate(-6deg);
}
.page-banner h1 { color: #fff; font-size: 40px; margin: 0; position: relative; z-index: 2; }

/* ---------- Bylaws ---------- */
.bylaw-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; margin-bottom: 48px; }
.bylaw-grid:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.bylaw-grid:nth-child(even) > .bylaw-text { order: 2; }
.bylaw-grid:nth-child(even) > .bylaw-media { order: 1; }
.bylaw-badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-soft), var(--blue)); color: #fff; font-weight: 900; font-size: 22px; margin-bottom: 14px; }
.bylaw-grid h3 { font-size: 24px; font-weight: 700; margin: 0 0 16px; color: var(--navy); }
.bylaw-grid p { color: var(--muted); margin: 0 0 14px; font-size: 16px; line-height: 1.6; }
.bylaw-grid p:last-child { margin-bottom: 0; }
.bylaw-media { position: relative; overflow: hidden; height: 420px; }
.bylaw-media img { border-radius: 12px; box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; display: block; }
.bylaw-media .cap { font-size: 13px; color: var(--muted); margin-top: 12px; font-style: italic; }

/* ---------- Article list ---------- */
.article-list { display: flex; flex-direction: column; gap: 40px; }
.article-row { display: grid; grid-template-columns: 360px 1fr; gap: 36px; align-items: center; }
.article-row .thumb { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.article-row .thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.badge { background: var(--blue); color: #fff; font-size: 12px; padding: 3px 12px; border-radius: 4px; font-weight: 600; }
.article-row h3 { font-size: 26px; margin: 0 0 12px; }
.article-row p { color: var(--muted); margin: 0 0 14px; }
.read-link { font-weight: 700; color: var(--blue); }
.list-count { font-weight: 700; color: var(--navy); border-left: 4px solid var(--blue); padding-left: 12px; margin-bottom: 8px; }
.divider { height: 1px; background: var(--line); margin: 18px 0 36px; }

/* ---------- Page search bar ---------- */
.page-search { display: flex; gap: 10px; margin-bottom: 28px; }
.page-search input[type="text"] {
    flex: 1; padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px;
    font-size: 15px; background: #fff;
}
.page-search input[type="text"]:focus { border-color: var(--blue-soft); }
.page-search button, .page-search .btn { padding: 13px 22px; white-space: nowrap; }
@media (max-width: 560px) {
    .page-search { flex-wrap: wrap; }
    .page-search input[type="text"] { flex: 1 1 100%; }
}

/* ---------- Single article ---------- */
.article-single { max-width: 820px; margin: 0 auto; }
.article-single h1 { font-size: 36px; margin: 14px 0 18px; }
.article-single .cover { border-radius: var(--radius); margin: 18px 0 28px; box-shadow: var(--shadow); }
.article-body { font-size: 17px; color: #36404f; overflow-wrap: break-word; word-break: break-word; }
.article-body p { margin: 0 0 18px; }
.article-body img { max-width: 100%; height: auto; display: block; border-radius: 8px; margin: 8px 0 18px; }
.article-body a { word-break: break-all; }

.event-documents { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.event-documents h3 { margin: 0 0 14px; font-size: 19px; }
.document-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.document-list a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; background: #f4f7fb; border-radius: 10px; color: var(--blue); font-weight: 600; text-decoration: none; }
.document-list a:hover { background: #e9eef7; }
.document-meta { font-weight: 400; color: var(--muted); font-size: 13.5px; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.pw-field { position: relative; display: block; }
.pw-field input { padding-right: 44px; width: 100%; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; background: none; border: 0; padding: 4px; cursor: pointer; color: #8a96aa; }
.pw-toggle:hover { color: var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 46px; align-items: start; }
.event-detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 46px; align-items: start; }
.event-detail-grid > * { min-width: 0; }
.contact-grid > * { min-width: 0; }
.article-row > * { min-width: 0; }
.account-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 36px; align-items: start; }
.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #2b3445; }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=number], select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid #cdd7e6; border-radius: 8px;
    font: inherit; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,224,.15); }
textarea { min-height: 130px; resize: vertical; }
.help { font-size: 13px; color: var(--muted); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 15px; }
.alert-success { background: #e7f7ed; color: #1d7a43; border: 1px solid #b8e6c9; }
.alert-error { background: #fdeaea; color: #b42323; border: 1px solid #f3c4c4; }
.alert-info { background: #e8f1fd; color: #1d5bb0; border: 1px solid #c3dcf7; }

.closed-contact { margin-top: 4px; }
.closed-contact p { color: var(--muted); margin: 0 0 14px; font-size: 14.5px; }
.closed-contact-detail { font-size: 14px; margin-top: 14px !important; }
.closed-contact-detail a { color: var(--blue); font-weight: 600; }

/* ---------- Event cards ---------- */
.event-card { display: grid; grid-template-columns: 280px 1fr; gap: 28px; background:#fff; border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); margin-bottom: 28px; }
.event-card .ev-img img { width: 100%; height: 100%; object-fit: cover; }
.event-card .ev-body { padding: 26px 28px; overflow-wrap: break-word; word-break: break-word; min-width: 0; }
.event-card h3 { font-size: 24px; margin: 0 0 8px; }
.event-card .ev-theme { color: var(--blue); font-weight: 600; margin-bottom: 12px; }
.event-meta { list-style: none; padding: 0; margin: 0 0 16px; color: var(--muted); }
.event-meta li { margin-bottom: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-grey); color: #44506a; margin-top: 40px; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .8fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-about .brand-text { color: var(--navy); }
.footer-about h4 { margin: 16px 0 12px; font-size: 18px; }
.footer-about p { margin: 4px 0; font-size: 14px; color: #55617a; }
.footer-links h5 { font-size: 16px; margin: 0 0 16px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #55617a; }
.footer-links a:hover { color: var(--blue); }
.search-box { display: flex; border: 1px solid #cdd7e6; border-radius: 8px; overflow: hidden; background:#fff; max-width: 280px; }
.search-box input { border: 0; box-shadow: none; }
.search-box button { border: 0; background: transparent; padding: 0 14px; cursor: pointer; font-size: 16px; }
.social { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-top: 18px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; font-size: 13px; color: #7a869c; }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Article body: prevent rich-content overflow ---------- */
.article-body table { display: block; overflow-x: auto; max-width: 100%; }
.article-body pre  { overflow-x: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about-grid, .mission-grid, .aims-grid, .history-grid, .contact-grid, .event-detail-grid, .account-grid { grid-template-columns: 1fr; }
    .form-card { padding: 24px; }
    .page-banner { padding: 44px 0; }
    .page-banner h1 { font-size: 30px; }
    .hero { min-height: 0; padding: 64px 0; background: linear-gradient(120deg, var(--navy-deep), var(--navy-2)); }
    .hero-media, .hero-ring, .hero-panel, .hero-glow { display: none; }
    .hero-text { max-width: none; }
    .hero-text h1 { font-size: 42px; }
    .news-carousel { grid-template-columns: 1fr 1fr; }
    .article-row, .event-card, .bylaw-grid { grid-template-columns: 1fr; }
    .bylaw-grid:nth-child(even) { grid-template-columns: 1fr; }
    .bylaw-grid:nth-child(even) > .bylaw-text { order: auto; }
    .bylaw-grid:nth-child(even) > .bylaw-media { order: auto; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
    .nav-toggle { display: flex; }
    .main-nav { display: none; width: 100%; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px 0; }
    .header-inner { flex-wrap: wrap; }
    /* show full image on mobile — no crop */
    .event-card .ev-img img { width: 100%; height: auto; object-fit: fill; }
    /* single event detail cover image — show full on mobile */
    .event-detail-grid img.cover { width: 100%; height: auto; object-fit: fill; }
    /* article-row thumb becomes full-width banner */
    .article-row .thumb { border-radius: 10px; }
    .article-row .thumb img { aspect-ratio: 16/7; }
}
@media (max-width: 560px) {
    .news-carousel, .mission-photos { grid-template-columns: 1fr; }
    /* tighter section headings */
    .section-title { font-size: 26px; }
    .hero-text h1 { font-size: 32px; }
    .hero-text .eyebrow { font-size: 18px; }
    /* page banner */
    .page-banner { padding: 32px 0; }
    .page-banner h1 { font-size: 22px; }
    /* event card body on small phones */
    .event-card .ev-body { padding: 18px 16px; }
    .event-card h3 { font-size: 20px; }
    .event-card .ev-img img { height: auto; }
    /* event detail cover — full image on phones */
    .event-detail-grid img.cover { height: auto; }
    /* article */
    .article-single h1 { font-size: 26px; }
    /* footer single column on phones */
    .footer-grid { grid-template-columns: 1fr; }
    /* document links full-width */
    .document-list a { display: flex; }
}

/* ---------- Scroll to top ---------- */
#scrollTopBtn {
    position: fixed; right: 24px; bottom: 24px; z-index: 60;
    width: 46px; height: 46px; border-radius: 50%; border: 0;
    background: var(--blue-soft); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 22px rgba(31,111,224,.35);
    cursor: pointer; opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s, transform .25s, background .2s, visibility .25s;
}
#scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }
#scrollTopBtn:hover { background: var(--blue); }
@media (max-width: 560px) {
    #scrollTopBtn { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
