﻿/* St. Xavier Inter College — site theme */
:root {
    --navy-900: #0a1c36;
    --navy-800: #102a4c;
    --navy-700: #173a66;
    --navy-100: #e6ecf5;
    --gold-500: #c99a2e;
    --gold-400: #ddb556;
    --gold-100: #f8efd9;
    --ink: #1c2330;
    --muted: #5b6475;
    --line: #e3e0d8;
    --paper: #faf8f3;
    --card: #ffffff;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(10, 28, 54, .06), 0 8px 24px rgba(10, 28, 54, .07);
    --wrap: 1180px;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-500); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy-900); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-900); color: #c8d3e3; font-size: 14px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar a { color: #c8d3e3; }
.topbar a:hover { color: var(--gold-400); }
.topbar-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.topbar-info { display: flex; gap: 20px; align-items: center; }
.topbar-info svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; fill: var(--gold-400); }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--navy-900); }
.brand:hover { color: var(--navy-900); }
.crest {
    width: 54px; height: 54px; flex: none;
    border-radius: 50% 50% 46% 46%;
    background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
    border: 2px solid var(--gold-500);
    color: var(--gold-400);
    display: grid; place-items: center;
    font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .5px;
}
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; display: block; }
.brand-sub { font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); display: block; margin-top: 2px; }

/* ---------- Navigation ---------- */
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-900); margin: 4px 0; }
.main-nav > ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.main-nav li { position: relative; }
.main-nav a, .main-nav .nav-parent {
    display: block; padding: 10px 13px; font-size: 15px; font-weight: 600; color: var(--navy-800);
    border-radius: 8px; background: none; border: 0; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.main-nav > ul > li > a:hover, .main-nav .nav-parent:hover, .main-nav li.open > .nav-parent { background: var(--navy-100); color: var(--navy-900); }
.main-nav > ul > li.active > a { color: var(--gold-500); }
.nav-parent::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; vertical-align: 1px; }
.main-nav ul ul {
    position: absolute; top: 100%; left: 0; min-width: 240px; list-style: none; margin: 6px 0 0; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
}
.main-nav ul ul::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.main-nav ul ul a { font-weight: 500; white-space: normal; padding: 8px 12px; }
.main-nav ul ul a:hover { background: var(--gold-100); color: var(--navy-900); }
.main-nav ul ul ul { top: -9px; left: 100%; margin: 0 0 0 6px; max-height: 70vh; overflow: auto; }
.main-nav ul ul .nav-parent { font-weight: 500; padding: 8px 12px; width: 100%; text-align: left; }
.main-nav ul ul .nav-parent::after { border-top-color: transparent; border-left-color: currentColor; float: right; margin-top: 8px; }
@media (min-width: 1025px) {
    .main-nav li:hover > ul, .main-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
    .main-nav > ul > li:last-child > ul, .main-nav > ul > li:nth-last-child(2) > ul { left: auto; right: 0; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 16px; border: 2px solid transparent; transition: .15s ease; }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); color: var(--navy-900); }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.link-more { font-weight: 600; font-size: 15px; color: var(--navy-700); display: inline-flex; gap: 6px; align-items: center; }
.link-more::after { content: "→"; transition: transform .15s; }
.link-more:hover::after { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 400px at 85% 10%, rgba(201, 154, 46, .22), transparent 60%),
        linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
}
.hero::after {
    content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px);
    background-size: 44px 44px;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-400); font-weight: 700; margin-bottom: 14px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 56px); font-weight: 600; margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--gold-400); font-weight: 500; }
.hero p.lead { font-size: 19px; color: #d3dcea; max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(4px); }
.stat b { display: block; font-family: var(--serif); font-size: 36px; color: var(--gold-400); font-weight: 600; line-height: 1.1; }
.stat span { font-size: 15px; color: #d3dcea; }

/* ---------- News ticker ---------- */
.ticker { background: var(--gold-500); color: var(--navy-900); }
.ticker .wrap { display: flex; align-items: center; gap: 18px; min-height: 52px; }
.ticker-label { font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; font-size: 14px; white-space: nowrap; background: var(--navy-900); color: var(--gold-400); padding: 6px 14px; border-radius: 999px; }
.ticker-track { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; font-weight: 600; }
.ticker-track span { display: inline-block; padding-left: 100%; animation: ticker 28s linear infinite; }
.ticker-track:hover span { animation-play-state: paused; }
.ticker a { color: var(--navy-900); font-weight: 700; white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin: 0; }
.section-head .eyebrow { color: var(--gold-500); margin-bottom: 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------- News & events ---------- */
.panel { padding: 26px 28px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h3 { font-size: 22px; margin: 0; }

.news-list #intro { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; }
.news-list #intro li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.news-list #intro li:last-child { border-bottom: 0; }
.news-list .ns_Notice { grid-column: 1 / -1; height: auto; width: auto; float: none; margin: 0; font: 600 13px var(--sans); color: var(--gold-500); text-transform: uppercase; letter-spacing: .8px; display: flex; align-items: center; gap: 4px; }
.news-list .ns_Notice img { display: none; }
.news-list .ns_Notice b { color: var(--gold-500) !important; font-size: 13px !important; margin: 0 !important; font-weight: 700; }
.news-list .ns_Notice sup { font-size: 9px; }
.news-list .ns-right { float: none; width: auto; height: auto; margin: 0 !important; color: var(--ink); font: 600 17px/1.4 var(--sans); }
.news-list .moreNews { float: none; margin: 0; align-self: center; }
.news-list .read-news { font-size: 14px; font-weight: 700; color: var(--navy-700); background: var(--navy-100); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.news-list .read-news:hover { background: var(--gold-100); color: var(--navy-900); }

.events-list { list-style: none; margin: 0; padding: 0; }
.events-list li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.events-list li:last-child { border-bottom: 0; }
.event-date { flex: none; width: 72px; text-align: center; background: var(--navy-900); color: #fff; border-radius: 10px; padding: 8px 4px; font-size: 13px; font-weight: 700; line-height: 1.25; height: fit-content; }
.event-date span { display: block; }
.event-body h4 { font-size: 17px; margin: 0 0 2px; }
.event-body p { font-size: 15px; color: var(--muted); margin: 0; }

.empty-state { color: var(--muted); font-size: 15px; padding: 26px 0; text-align: center; }
.news-list #intro:empty::before, .news-list:empty::before { content: "No news or notices at the moment."; display: block; color: var(--muted); font-size: 15px; padding: 26px 0; text-align: center; }
.events-list:empty::before { content: "No upcoming events listed."; display: block; color: var(--muted); font-size: 15px; padding: 26px 0; text-align: center; }

/* ---------- Messages ---------- */
.message-card { padding: 34px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.avatar { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font: 600 28px var(--serif); color: var(--gold-400); background: linear-gradient(160deg, var(--navy-700), var(--navy-900)); border: 3px solid var(--gold-100); }
.message-card blockquote { margin: 0 0 16px; font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--navy-900); }
.message-card blockquote::before { content: "\201C"; color: var(--gold-500); font-size: 56px; line-height: 0; vertical-align: -22px; margin-right: 4px; }
.byline { font-weight: 700; color: var(--navy-900); }
.byline small { display: block; font-weight: 600; color: var(--gold-500); text-transform: uppercase; letter-spacing: 1.4px; font-size: 12px; }
.message-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Toppers ---------- */
.tabs { display: inline-flex; background: var(--navy-100); padding: 4px; border-radius: 999px; gap: 4px; }
.tabs button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font: 700 15px var(--sans); color: var(--navy-700); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy-900); color: #fff; }
.toppers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.toppers[hidden] { display: none; }
.topper { padding: 20px 16px; text-align: center; transition: transform .15s, box-shadow .15s; }
.topper:hover { transform: translateY(-3px); }
.topper .avatar { width: 68px; height: 68px; font-size: 22px; margin: 0 auto 12px; }
.topper .name { font-weight: 700; color: var(--navy-900); line-height: 1.3; }
.topper .score { font-family: var(--serif); font-size: 26px; color: var(--gold-500); font-weight: 600; }
.topper .rank { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

/* ---------- Quote ---------- */
.quote-band { background: var(--navy-900); color: #fff; text-align: center; padding: 64px 0; position: relative; overflow: hidden; }
.quote-band .quote { font-family: var(--serif); font-size: clamp(22px, 3vw, 32px); line-height: 1.4; max-width: 820px; margin: 0 auto 14px; font-style: italic; min-height: 2.8em; transition: opacity .4s; }
.quote-band cite { color: var(--gold-400); font-style: normal; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; font-size: 14px; }

/* ---------- Achievements / gallery ---------- */
.photo-card { overflow: hidden; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s; }
.photo-card:hover img { transform: scale(1.04); }
.photo-card figcaption { padding: 14px 18px; font-weight: 700; color: var(--navy-900); }
.photo-card { margin: 0; }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gallery-grid li { border-radius: 12px; overflow: hidden; background: var(--navy-100); }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .35s; }
.gallery-grid li:hover img { transform: scale(1.05); }
.gallery-grid:empty { display: none; }

/* ---------- Quick links ---------- */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-link { display: flex; gap: 14px; align-items: center; padding: 20px; color: var(--navy-900); font-weight: 700; transition: border-color .15s, transform .15s; }
.quick-link:hover { border-color: var(--gold-500); color: var(--navy-900); transform: translateY(-2px); }
.quick-link .ic { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--gold-100); display: grid; place-items: center; }
.quick-link .ic svg { width: 22px; height: 22px; fill: none; stroke: var(--navy-700); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quick-link small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; }

/* ---------- Inner page ---------- */
.page-hero { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 44px 0; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin: 0; }
.crumbs { font-size: 14px; color: #b9c6da; margin-bottom: 6px; }
.crumbs a { color: var(--gold-400); }
.page-body { padding: 48px 0 72px; }
.page-content { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; overflow-x: auto; }
.page-content table { max-width: 100%; }
.page-content #intro { list-style: none; padding: 0; margin: 0; }
.page-content #intro li { padding: 14px 0; border-bottom: 1px dashed var(--line); overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c6da; font-size: 15px; }
.site-footer .wrap.cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-top: 56px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 17px; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b9c6da; }
.site-footer a:hover { color: var(--gold-400); }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand-sub { color: #8fa0b8; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: 14px; color: #8fa0b8; }

/* ---------- Flyer modal ---------- */
.flyer-modal { position: fixed; inset: 0; background: rgba(6, 16, 32, .78); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.flyer-modal.show { display: flex; }
.flyer-inner { position: relative; max-width: 760px; max-height: 90vh; overflow: auto; background: #fff; border-radius: var(--radius); padding: 12px; }
.flyer-inner img { margin: 0 auto 10px; }
.flyer-close { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--navy-900); color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .nav-toggle { display: block; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; max-height: calc(100vh - 84px); overflow-y: auto; }
    .main-nav.open { display: block; }
    .main-nav > ul { flex-direction: column; padding: 10px 16px 16px; }
    .main-nav a, .main-nav .nav-parent { width: 100%; text-align: left; }
    .main-nav ul ul, .main-nav ul ul ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; margin: 0 0 0 14px; padding: 0 0 0 10px; border-left: 2px solid var(--gold-100); border-radius: 0; display: none; max-height: none; min-width: 0; }
    .main-nav li.open > ul { display: block; }
    .hero .wrap, .grid-2 { grid-template-columns: 1fr; }
    .grid-3, .quick-links { grid-template-columns: repeat(2, 1fr); }
    .site-footer .wrap.cols { grid-template-columns: 1fr 1fr; }
    .topbar-links { display: none; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .brand-name { font-size: 18px; }
    .brand-sub { font-size: 11px; letter-spacing: 1px; }
    .crest { width: 46px; height: 46px; font-size: 17px; }
    .site-header .wrap { min-height: 72px; }
    .hero .wrap { padding-top: 48px; padding-bottom: 48px; gap: 28px; }
    .section { padding: 52px 0; }
    .grid-3, .quick-links, .site-footer .wrap.cols { grid-template-columns: 1fr; }
    .message-card { grid-template-columns: 1fr; padding: 24px; }
    .panel { padding: 22px 18px; }
    .section-head { flex-direction: column; align-items: start; }
    .page-content { padding: 20px; }
    .topbar-info .hide-sm { display: none; }
    .toppers { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track span { animation: none; padding-left: 0; }
    * { transition: none !important; }
}

/* Let grid/flex children shrink on small screens */
.grid-2 > *, .grid-3 > *, .hero .wrap > *, .quick-links > *, .site-footer .wrap.cols > * { min-width: 0; }
html, body { overflow-x: hidden; }
@media (max-width: 640px) {
    .ticker .wrap > a { display: none; }
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 16px; }
    .stat b { font-size: 26px; }
    .message-card blockquote { font-size: 18px; }
}

/* ---------- Gallery pages (GalleryAlbum/gallery.aspx, photogallerymain.aspx) ---------- */
/* The gallery sits directly on the page background instead of inside the white content box */
.page-content:has(> .gallery-page) { background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; }
.gallery-page [hidden] { display: none !important; }
.gallery-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.gallery-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 22px; }
.gallery-lede { font-family: var(--serif); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.4; color: var(--navy-900); margin: 0; max-width: 620px; }
.gallery-stats { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.gallery-stats li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-size: 15px; color: var(--muted); white-space: nowrap; }
.gallery-stats b { font-family: var(--serif); font-size: 19px; color: var(--navy-900); font-weight: 600; margin-right: 2px; }

.gallery-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 0 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.gallery-search { position: relative; flex: 0 1 340px; min-width: 220px; }
.gallery-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.gallery-search .input { height: 44px; padding-left: 42px; font-size: 16px; border-radius: 999px; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: #fff; color: var(--navy-700); font: 600 14px var(--sans); padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--navy-700); }
.chip[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.chip:focus-visible, .album-card-link:focus-visible, .photo-tile:focus-visible, .gallery-page .btn:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; }

/* Album cards */
.album-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.album-card { min-width: 0; }
.album-card-link { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: 0 1px 2px rgba(10, 28, 54, .05); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.album-card-link:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d8d2c4; }
.album-card-cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--navy-100); overflow: hidden; }
.album-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.album-card-link:hover .album-card-cover img { transform: scale(1.05); }
.album-card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 28, 54, 0) 55%, rgba(10, 28, 54, .45)); pointer-events: none; }
.album-card-noimage { position: absolute; inset: 0; display: grid; place-items: center; color: var(--navy-700); background: linear-gradient(135deg, var(--navy-100), var(--gold-100)); }
.album-card-noimage svg { width: 46px; height: 46px; opacity: .55; }
.album-badge { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; background: rgba(10, 28, 54, .78); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.album-badge svg { width: 14px; height: 14px; }
.album-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 20px; flex: 1; min-width: 0; }
.album-card-eyebrow { display: none; }
.album-card-date { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-500); }
.album-card-title { font-size: 20px; margin: 0; color: var(--navy-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.album-card-text { font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.album-card-text:empty { display: none; }
.album-card-more { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 15px; color: var(--navy-700); }
.album-card-more::after { content: "\2192"; display: inline-block; margin-left: 6px; transition: transform .15s; }
.album-card-link:hover .album-card-more { color: var(--gold-500); }
.album-card-link:hover .album-card-more::after { transform: translateX(3px); }

/* Newest album is featured (not while searching / filtering) */
@media (min-width: 761px) {
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child { grid-column: 1 / -1; }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-link { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-cover { aspect-ratio: auto; min-height: 340px; }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-body { justify-content: center; padding: 36px 40px; gap: 10px; }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-title { font-size: clamp(24px, 2.6vw, 32px); -webkit-line-clamp: 3; }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-text { font-size: 17px; -webkit-line-clamp: 4; }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-more { margin-top: 8px; align-self: flex-start; background: var(--gold-500); color: var(--navy-900); padding: 11px 22px; border-radius: 999px; }
    .album-grid:not(.is-filtered):not(.album-grid-compact) > .album-card:first-child .album-card-link:hover .album-card-more { background: var(--gold-400); color: var(--navy-900); }
}

.gallery-empty { text-align: center; padding: 56px 24px; background: #fff; border: 1px dashed #d6d2c7; border-radius: var(--radius); color: var(--muted); }
.gallery-empty h2 { font-size: 24px; margin-bottom: 6px; }
.gallery-empty p { margin: 0 0 16px; }
.gallery-empty p:last-child { margin-bottom: 0; }
.gallery-empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gold-100); color: var(--navy-700); margin-bottom: 14px; }
.gallery-empty-icon svg { width: 28px; height: 28px; }
.btn-outline { border-color: var(--navy-700); color: var(--navy-700); background: #fff; cursor: pointer; font-family: var(--sans); }
.btn-outline:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* Album page */
.link-back { font-weight: 600; font-size: 15px; }
.link-back::before { content: "\2190  "; }
.album-back { display: inline-block; margin-bottom: 18px; }
.album-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.album-head-text { flex: 1 1 520px; min-width: 0; }
.album-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; font-weight: 700; font-size: 15px; color: var(--navy-700); }
.album-facts li { display: inline-flex; align-items: center; gap: 8px; }
.album-facts svg { width: 18px; height: 18px; color: var(--gold-500); }
.album-head-desc { margin: 12px 0 0; font-size: 18px; color: var(--muted); max-width: 760px; overflow-wrap: anywhere; }
.album-play { cursor: pointer; font-family: var(--sans); }
.gallery-page .album-play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }

.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.photo-tile { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--navy-100); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.photo-tile::after { content: ""; position: absolute; inset: 0; background: rgba(10, 28, 54, 0); transition: background .2s; }
.photo-tile:hover img { transform: scale(1.06); }
.photo-tile:hover::after { background: rgba(10, 28, 54, .32); }
.photo-tile-zoom { position: absolute; z-index: 1; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--navy-900); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s; }
.photo-tile-zoom svg { width: 22px; height: 22px; }
.photo-tile:hover .photo-tile-zoom, .photo-tile:focus-visible .photo-tile-zoom { opacity: 1; transform: scale(1); }

.more-albums { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }
.more-albums-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.more-albums-head h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 0; }
.album-grid-compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.album-grid-compact .album-card-body { padding: 14px 16px 16px; gap: 4px; }
.album-grid-compact .album-card-title { font-size: 18px; }

/* Lightbox (created by js/gallery.js) */
html.lightbox-open, html.lightbox-open body { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(6, 14, 28, .96); color: #fff; }
.lightbox[hidden] { display: none; }
.lightbox svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox svg .fill { fill: currentColor; stroke: none; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 22px; }
.lightbox-count { font-weight: 700; font-size: 15px; letter-spacing: 1px; color: #c8d3e3; }
.lightbox-actions { display: flex; gap: 6px; }
.lightbox-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background .15s; }
.lightbox-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.lightbox-btn:focus-visible, .lightbox-nav:focus-visible, .lightbox-thumb:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 76px; min-height: 0; }
.lightbox-figure { margin: 0; height: 100%; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; pointer-events: none; }
.lightbox-figure img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transition: opacity .2s; pointer-events: auto; }
.lightbox.is-loading .lightbox-figure img { opacity: .35; }
.lightbox-nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background .15s; }
.lightbox-nav:hover { background: var(--gold-500); color: var(--navy-900); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-strip { display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; padding: 12px 16px 16px; scrollbar-width: thin; }
.lightbox-thumb { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #1b2a40; cursor: pointer; opacity: .55; transition: opacity .15s, border-color .15s; }
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox-thumb:hover { opacity: .9; }
.lightbox-thumb[aria-current="true"] { opacity: 1; border-color: var(--gold-400); }
.lightbox.is-single .lightbox-nav, .lightbox.is-single .lightbox-strip, .lightbox.is-single [data-lb="play"] { display: none; }
.lightbox.is-playing .lightbox-count::after { content: " \00B7  Slideshow"; color: var(--gold-400); }

@media (max-width: 760px) {
    .gallery-intro { flex-direction: column; align-items: flex-start; }
    .gallery-search { flex: 1 1 100%; }
    .album-grid { grid-template-columns: 1fr; gap: 18px; }
    .album-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .album-grid-compact .album-card-body { padding: 10px 12px 12px; }
    .album-grid-compact .album-card-title { font-size: 15px; }
    .album-grid-compact .album-card-date { font-size: 11px; }
    .album-play { justify-content: center; width: 100%; }
    .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .photo-tile-zoom { display: none; }
    .lightbox-stage { padding: 0 8px 60px; }
    .lightbox-nav { top: auto; bottom: 6px; width: 44px; height: 44px; margin-top: 0; background: rgba(255, 255, 255, .14); }
    .lightbox-prev { left: calc(50% - 56px); }
    .lightbox-next { right: calc(50% - 56px); }
    .lightbox-thumb { width: 56px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .album-card-link:hover, .album-card-link:hover .album-card-cover img, .photo-tile:hover img { transform: none; }
}

/* ---------- Download page ---------- */
.download-missing { text-align: center; padding: 24px 0; }
.download-missing h2 { font-size: 26px; }
.download-missing p { color: var(--muted); }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; background: var(--paper); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; }
.login-aside {
    position: relative; overflow: hidden; color: #d3dcea; padding: 40px 48px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    background:
        radial-gradient(700px 360px at 90% 0%, rgba(201, 154, 46, .25), transparent 60%),
        linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
}
.login-aside::after {
    content: ""; position: absolute; inset: 0; opacity: .06; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px);
    background-size: 44px 44px;
}
.login-aside > * { position: relative; z-index: 1; }
.login-aside .brand, .login-aside .brand:hover { color: #fff; }
.login-aside .brand-sub { color: #9fb0c8; }
.login-aside h1 { color: #fff; font-size: clamp(30px, 3.2vw, 44px); margin-bottom: 22px; }
.login-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.login-features li { display: flex; gap: 12px; align-items: center; font-size: 17px; }
.login-features li::before { content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%; background: rgba(221, 181, 86, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ddb556' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat; }
.login-aside-foot { font-size: 14px; color: #8fa0b8; margin: 0; }

.login-main { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .link-back { display: inline-block; margin-bottom: 28px; }
.login-card h2 { font-size: 34px; margin-bottom: 6px; }
.login-sub { color: var(--muted); margin-bottom: 26px; }

.login-alert { border-radius: 10px; padding: 12px 14px; font-size: 15px; margin-bottom: 18px; border: 1px solid; }
.login-alert-error { background: #fdf0ee; border-color: #f1c7bf; color: #8f2a17; }
.login-alert-info { background: var(--gold-100); border-color: #ecd9a8; color: #6b4e0e; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 15px; color: var(--navy-900); margin-bottom: 6px; }
.input {
    width: 100%; height: 48px; padding: 0 14px; font: 500 17px var(--sans); color: var(--ink);
    background: #fff; border: 1.5px solid #d6d2c7; border-radius: 10px; transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #bdb7a8; }
.input:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(23, 58, 102, .12); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 72px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: 600 14px var(--sans); color: var(--navy-700); cursor: pointer; }
.pw-toggle:hover { background: var(--navy-100); }
.field-error { display: block; color: #a8321c; font-size: 14px; margin-top: 6px; }

.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); margin: 4px 0 22px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy-700); margin: 0; }
.btn-block { width: 100%; justify-content: center; height: 50px; font-size: 17px; cursor: pointer; font-family: var(--sans); }
.btn-gold:focus-visible, .pw-toggle:focus-visible { outline: 3px solid var(--navy-700); outline-offset: 2px; }
.login-help { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .login-aside { padding: 22px 20px; gap: 0; }
    .login-aside-copy, .login-aside-foot { display: none; }
    .login-main { place-items: start center; padding: 32px 16px 48px; }
    .login-card h2 { font-size: 28px; }
}
/* ASP.NET injects hidden-field wrappers into the form; keep them out of the grid */
.login-shell > .aspNetHidden { display: none; }
.login-aside { grid-area: 1 / 1; }
.login-main { grid-area: 1 / 2; }
@media (max-width: 900px) {
    .login-main { grid-area: 2 / 1; }
}
.login-shell { grid-template-rows: minmax(100vh, auto); grid-auto-rows: 0; }
@media (max-width: 900px) {
    .login-shell { grid-template-rows: auto minmax(calc(100vh - 100px), auto); }
}

/* ---------- CMS pages (Admin -> Manage Pages) ---------- */
.cms-content { font-size: 17px; line-height: 1.75; color: var(--ink); overflow-wrap: break-word; }
.cms-content > :first-child { margin-top: 0; }
.cms-content h1, .cms-content h2, .cms-content h3, .cms-content h4 { margin: 1.4em 0 .5em; }
.cms-content h2 { font-size: 28px; }
.cms-content h3 { font-size: 22px; }
.cms-content p, .cms-content ul, .cms-content ol, .cms-content blockquote, .cms-content table, .cms-content pre { margin: 0 0 1.1em; }
.cms-content ul, .cms-content ol { padding-left: 1.4em; }
.cms-content li { margin-bottom: .35em; }
.cms-content a:not(.cms-btn) { text-decoration: underline; text-underline-offset: 3px; }
.cms-content img { height: auto; border-radius: 10px; }
.cms-content .cms-img-full { width: 100%; }
.cms-content .cms-img-left { float: left; max-width: 45%; margin: 4px 20px 12px 0; }
.cms-content .cms-img-right { float: right; max-width: 45%; margin: 4px 0 12px 20px; }
.cms-content blockquote { border-left: 4px solid var(--gold-500); padding: 6px 0 6px 18px; font-family: var(--serif); font-size: 19px; color: var(--navy-900); }
.cms-content table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.cms-content th, .cms-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.cms-content th { background: var(--navy-100); color: var(--navy-900); }
.cms-content pre, .cms-content code { background: #f3f1ec; border-radius: 6px; font-size: 15px; }
.cms-content pre { padding: 14px; overflow-x: auto; }
.cms-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.cms-content::after { content: ""; display: table; clear: both; }
.cms-btn, .cms-btn-outline { display: inline-flex; align-items: center; padding: 11px 22px; border-radius: 999px; font-weight: 700; text-decoration: none !important; border: 2px solid var(--gold-500); }
.cms-btn { background: var(--gold-500); color: var(--navy-900); }
.cms-btn:hover { background: var(--gold-400); border-color: var(--gold-400); color: var(--navy-900); }
.cms-btn-outline { background: transparent; color: var(--navy-900); }
.cms-btn-outline:hover { background: var(--gold-100); color: var(--navy-900); }
.cms-lead { font-size: 20px; color: var(--navy-800); }
.cms-note { background: var(--gold-100); border-radius: 10px; padding: 14px 18px; }
.cms-center { text-align: center; }
.cms-right { text-align: right; }
.preview-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 24px; padding: 12px 16px; border-radius: 10px; background: var(--gold-100); border: 1px solid #ecd9a8; color: #6b4e0e; font-size: 15px; }
.preview-banner strong { text-transform: uppercase; letter-spacing: 1px; font-size: 13px; background: var(--navy-900); color: var(--gold-400); padding: 3px 10px; border-radius: 999px; }
.preview-banner .link-more { margin-left: auto; }
@media (max-width: 640px) {
    .cms-content .cms-img-left, .cms-content .cms-img-right { float: none; max-width: 100%; margin: 0 0 12px; }
}

/* Header copes with any number of menu items (CMS pages can add more):
   the brand never shrinks and the menu wraps onto its own row when it does not fit */
@media (min-width: 1025px) {
    .site-header .wrap { flex-wrap: wrap; row-gap: 0; padding-top: 8px; padding-bottom: 8px; }
    .site-header .brand { flex: none; }
    .site-header .brand-name { white-space: nowrap; }
    .main-nav { margin-left: auto; }
    .main-nav > ul { flex-wrap: wrap; justify-content: flex-end; }
}
@media (min-width: 1025px) and (max-width: 1240px) {
    .main-nav a, .main-nav .nav-parent { padding: 10px 9px; font-size: 14px; }
}

/* CMS menu entries: sub menus of sub menus open to the side on desktop */
@media (min-width: 1025px) {
    .main-nav ul ul .cms-menu-item > ul { top: -9px; left: 100%; margin: 0 0 0 6px; }
    .main-nav > ul > li.cms-menu-item:nth-last-child(-n+3) ul ul { left: auto; right: 100%; margin: 0 6px 0 0; }
}
