:root{
  --navy:#16243B; --navy-2:#1F3455; --gold:#C9A15E; --gold-2:#E4C989;
  --maroon:#6E2A2A; --parchment:#F7F2E7; --paper:#FFFFFF;
  --ink:#2A2A28; --ink-muted:#736C5C; --border:#E5DAC0;
  --shadow:0 14px 34px rgba(22,36,59,.14); --shadow-sm:0 4px 14px rgba(22,36,59,.10);
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
    font-family:'Open Sans',sans-serif;
    font-size:15px;
    line-height:1.8;
    color:#555;
    background:#f8f8f8;
}

h1,h2,h3,.serif{
    font-family:'Merriweather',serif;
    font-weight:700;
    color:#214b7b;
}

a{color:inherit; text-decoration:none;}
img{max-width:100%; display:block;}
.eyebrow{font-size:.72rem; letter-spacing:.16em; text-transform:uppercase; color:var(--maroon); font-weight:700;}
.wrap{max-width:1120px; margin:0 auto; padding:0 24px;}
button,.btn{font-family:inherit; cursor:pointer;}

.topstrip{background:var(--navy); color:#EFE7D2; font-size:.82rem; padding:7px 0;}
.topstrip .wrap{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap;}
.topstrip a{color:var(--gold-2);}

header.site-head{
    background:#ffffff;
    padding:8px 0;
    border-bottom:1px solid #e8e8e8;
}
.head-inner{
    display:flex;
    align-items:center;
    gap:18px;
    padding:10px 0;
}
.medallion{
    width:120px;
    height:120px;
    margin-right:0;
    flex-shrink:0;
}
.site-logo{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.brand h1{
    font-size:42px;
    color:#2b5d91;
    margin:0;
    line-height:1.1;
}
.brand p{
    margin-top:10px;
    font-size:14px;
    color:#777;
    letter-spacing:.5px;
}

.menu-toggle{
    display:none;
}

nav.mainnav{
    background:#2f5d95;
    border-bottom:4px solid #d98b22;
}
.nav-inner{display:flex; align-items:center; gap:2px; flex-wrap:wrap;}
.nav-inner a{
    position:relative;
    color:#fff;
    text-transform:uppercase;
    font-size:13px;
    font-weight:700;
    padding:18px 22px;
    transition:.3s;
}
.nav-inner a:hover{
    background:#254a74;
    color:#fff;
}
.nav-inner a.active{color:var(--gold-2);}
.nav-inner a.active::after{content:''; position:absolute; left:14px; right:14px; bottom:0; height:2px; background:var(--gold);}
.nav-spacer{flex:1;}
.nav-admin{opacity:.55; font-size:.78rem !important; padding:14px 16px !important;}
.nav-admin:hover{opacity:1;}

main{min-height:60vh;}

/* ===== Hero Full Width ===== */
.hero{
    background:#fff;
    padding:0;
}
.hero-frame{
    position:relative;
    width:100%;
    max-width:none;
    margin:0;
    aspect-ratio:16/7;
    overflow:hidden;
    border-radius:0;
    box-shadow:none;
}
.hero .wrap{
    max-width:none;
    padding:0;
}
@media (max-width:640px){
    .hero-frame{aspect-ratio:16/7;}
}
.hero-slide{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    opacity:0;
    transition:opacity .7s ease;
}
.hero-slide.on{opacity:1;}
.hero-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:42px;
    height:42px;
    border-radius:50%;
    background:rgba(22,36,59,.55);
    border:1px solid rgba(228,201,137,.6);
    color:var(--gold-2);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.2rem;
    z-index:5;
    backdrop-filter:blur(2px);
}
.hero-arrow:hover{background:rgba(22,36,59,.8);}
.hero-arrow.prev{left:14px;}
.hero-arrow.next{right:14px;}
.hero-dots{
    position:absolute;
    left:0;
    right:0;
    bottom:16px;
    display:flex;
    justify-content:center;
    gap:8px;
    z-index:5;
}
.hero-dots button{
    width:9px;
    height:9px;
    border-radius:50%;
    border:1px solid var(--gold-2);
    background:rgba(255,255,255,.15);
}
.hero-dots button.on{background:var(--gold);}
.hero-empty{
    color:#C9BFA0;
    text-align:center;
    padding:80px 20px;
    font-family:'Merriweather',serif;
    font-size:1.3rem;
}

.section{padding:52px 0;}
.section-head{margin-bottom:28px;}
.section-head h2{margin:6px 0 0; font-size:2rem; color:var(--navy);}

.section h2{
    font-size:34px;
    color:#2b5d91;
    margin-bottom:18px;
}

.news-card{
    display:grid;
    grid-template-columns:96px 1fr;
    gap:20px;
    background:var(--paper);
    border:1px solid var(--border);
    border-radius:4px;
    padding:20px;
    margin-bottom:18px;
    box-shadow:var(--shadow-sm);
    transition:box-shadow .15s ease, transform .15s ease;
}
.news-card:hover{box-shadow:var(--shadow); transform:translateY(-1px);}
.date-badge{
    width:96px;
    height:96px;
    border-radius:50%;
    border:2px solid var(--gold);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    background:var(--navy);
    color:var(--gold-2);
    flex:0 0 auto;
}

.date-badge .d{
    font-family:'Merriweather',serif;
    font-size:1.45rem;
    font-weight:700;
    line-height:1;
}

.date-badge .m{
    font-size:.8rem;
    letter-spacing:.1em;
    text-transform:uppercase;
    margin-top:3px;
}

.date-badge .y{
    font-size:.8rem;
    letter-spacing:.08em;
    margin-top:1px;
	font-weight:700;
}
.news-card-body{min-width:0;}
.news-card-body h3{margin:0 0 6px; font-size:1.35rem; color:var(--navy);}
.news-card-body .excerpt{color:var(--ink-muted); font-size:.94rem; line-height:1.55; margin:0 0 10px;}
.news-card-cover{margin-top:8px; border-radius:3px; overflow:hidden; max-height:220px;}
.news-card-cover img{width:100%; height:220px; object-fit:cover;}
.read-more{color:var(--maroon); font-weight:700; font-size:.85rem;}
@media (max-width:520px){
    .news-card{grid-template-columns:1fr;}
    .date-badge{width:64px; height:64px; flex-direction:row; gap:4px;}
    .date-badge .m{margin-top:0;}
}

.pagination{
    display:flex;
    justify-content:center;
    gap:8px;
    margin-top:34px;
    align-items:center;
}
.pagination a,.pagination span{
    width:38px;
    height:38px;
    border-radius:50%;
    border:1px solid var(--border);
    background:var(--paper);
    color:var(--navy);
    font-weight:600;
    display:flex;
    align-items:center;
    justify-content:center;
}
.pagination a.on,.pagination span.on{background:var(--navy); color:var(--gold-2); border-color:var(--navy);}
.pagination a.disabled{opacity:.35; pointer-events:none;}

.back-link{display:inline-block; margin-bottom:18px; font-size:.85rem; color:var(--maroon); font-weight:700;}
.detail-hero{border-radius:4px; overflow:hidden; margin-bottom:22px; box-shadow:var(--shadow-sm);}
.detail-hero img{width:100%; max-height:460px; object-fit:cover;}
.detail-title{font-size:2.1rem; color:var(--navy); margin:0 0 8px;}
.detail-date{color:var(--ink-muted); font-size:.86rem; margin-bottom:22px;}
.detail-content{
    font-size:1.05rem;
    line-height:1.8;
    color:#3A362D;
    text-align:justify;
}

.detail-content p{
    margin:0 0 24px;
    text-align:justify;
}

.detail-content p:last-child{
    margin-bottom:0;
}
.gallery-title{margin:36px 0 14px;}
.gallery-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:10px;
}
.gallery-grid img{
    width:100%;
    height:150px;
    object-fit:cover;
    border-radius:3px;
}

/* ===== Gallery Thumbnail ===== */
.gallery-thumb{
    cursor:pointer;
    transition:transform .2s ease, opacity .2s ease;
}
.gallery-thumb:hover{
    transform:scale(1.03);
    opacity:.9;
}

/* ===== Gallery Lightbox / Swipe Viewer ===== */
.gallery-lightbox{
    display:none;
    position:fixed;
    inset:0;
    z-index:9999;
    background:rgba(0,0,0,.92);
    align-items:center;
    justify-content:center;
    padding:30px;
}
.gallery-lightbox.show{
    display:flex;
}
.lightbox-content{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.lightbox-content img{
    max-width:90vw;
    max-height:88vh;
    width:auto;
    height:auto;
    object-fit:contain;
    border-radius:4px;
    box-shadow:0 10px 40px rgba(0,0,0,.5);
    user-select:none;
    -webkit-user-drag:none;
}
.lightbox-close{
    position:absolute;
    top:18px;
    right:25px;
    width:46px;
    height:46px;
    border:0;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    color:#fff;
    font-size:34px;
    line-height:40px;
    cursor:pointer;
    z-index:10001;
}
.lightbox-close:hover{
    background:rgba(255,255,255,.30);
}
.lightbox-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:52px;
    height:70px;
    border:0;
    border-radius:6px;
    background:rgba(22,36,59,.55);
    color:#fff;
    font-size:52px;
    line-height:60px;
    cursor:pointer;
    z-index:10001;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.2s ease;
}
.lightbox-arrow:hover{
    background:rgba(22,36,59,.85);
}
.lightbox-prev{left:20px;}
.lightbox-next{right:20px;}
.lightbox-counter{
    position:absolute;
    bottom:20px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0,0,0,.55);
    color:#fff;
    padding:5px 14px;
    border-radius:20px;
    font-size:.82rem;
    letter-spacing:.5px;
    z-index:10001;
}

.static-page{text-align:center;}
.static-frame{
    display:inline-block;
    padding:10px;
    background:var(--paper);
    border:1px solid var(--gold);
    box-shadow:var(--shadow);
    border-radius:4px;
    max-width:100%;
}
.static-frame img{max-width:100%; height:auto; border-radius:2px;}

.empty-state{text-align:center; padding:60px 20px; color:var(--ink-muted);}
.empty-state .serif{font-size:1.4rem; color:var(--navy); display:block; margin-bottom:6px;}

footer{
    background:#1f3e63;
    color:#fff;
    padding:40px 0;
    font-size:14px;
}
footer .wrap{
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
    font-size:.82rem;
}
footer a{color:var(--gold-2);}

/* ===== Admin ===== */
.admin-body{background:#FBF8F1; min-height:100vh;}
.admin-topbar{background:var(--navy); color:#EFE7D2; padding:14px 0;}
.admin-topbar .wrap{display:flex; align-items:center; justify-content:space-between;}
.admin-topbar .brand-mini{display:flex; align-items:center; gap:10px; font-family:'Merriweather',serif; font-size:1.2rem; font-weight:700;}
.admin-topbar .who{font-size:.82rem; color:var(--gold-2); display:flex; align-items:center; gap:12px;}
.admin-topbar a.logout{border:1px solid var(--gold); padding:6px 14px; border-radius:3px; font-size:.8rem; font-weight:600; color:var(--gold-2);}
.admin-topbar a.logout:hover{background:var(--gold); color:var(--navy);}
.admin-shell{
    display:grid;
    grid-template-columns:200px 1fr;
    gap:0;
    background:var(--paper);
    border:1px solid var(--border);
    border-radius:4px;
    overflow:hidden;
    box-shadow:var(--shadow-sm);
    margin:26px auto;
    max-width:1120px;
}
.admin-side{background:#FBF8F1; border-right:1px solid var(--border); padding:18px 0;}
.admin-side a{display:block; padding:11px 20px; font-size:.88rem; font-weight:600; color:var(--ink-muted);}
.admin-side a.on{color:var(--navy); background:var(--paper); border-right:3px solid var(--gold);}
.admin-main{padding:26px 28px;}
.admin-main h3{margin-top:0; color:var(--navy);}
.field{margin-bottom:14px;}
.field label{display:block; font-size:.8rem; font-weight:600; color:var(--ink-muted); margin-bottom:5px;}
.field input[type=text],.field input[type=password],.field input[type=date],.field input[type=file],.field textarea,.field select{
    width:100%;
    padding:9px 11px;
    border:1px solid var(--border);
    border-radius:3px;
    font-family:inherit;
    font-size:.92rem;
    background:#fff;
}
.field textarea{min-height:110px; resize:vertical;}
.btn{
    background:#2f5d95;
    color:#fff;
    border:none;
    padding:12px 28px;
    border-radius:3px;
    font-weight:700;
    transition:.25s;
}
.btn:hover{background:#24496f;}
.btn.secondary{background:none; color:var(--navy);}
.btn.danger{background:var(--maroon); border-color:var(--maroon);}
.row{display:flex; gap:10px; flex-wrap:wrap;}
table.admin-table{width:100%; border-collapse:collapse; font-size:.88rem;}
table.admin-table th{
    text-align:left;
    padding:9px 8px;
    border-bottom:2px solid var(--border);
    color:var(--ink-muted);
    font-size:.78rem;
    text-transform:uppercase;
}
table.admin-table td{padding:9px 8px; border-bottom:1px solid var(--border); vertical-align:middle;}
.pill{display:inline-block; padding:2px 9px; border-radius:10px; font-size:.72rem; font-weight:700;}
.pill.on{background:#E3F0E2; color:#2E6B2A;}
.pill.off{background:#F0E2E2; color:#8A2E2E;}
.thumb-sm{width:240px; height:105px; object-fit:cover; border-radius:2px; border:1px solid var(--border);}
.flash{padding:11px 16px; border-radius:3px; margin-bottom:18px; font-size:.88rem; border-left:3px solid var(--gold); background:#FBF3DF; color:#5A4A20;}
.flash.error{border-left-color:var(--maroon); background:#F6E7E5; color:#6E2A2A;}
.lock-box{max-width:360px; margin:70px auto; text-align:center; background:var(--paper); padding:34px 30px; border-radius:6px; box-shadow:var(--shadow); border:1px solid var(--border);}
.note{font-size:.78rem; color:var(--ink-muted); margin-top:6px;}
.gallery-admin-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; margin:10px 0 18px;}
.gallery-admin-grid figure{margin:0; position:relative;}
.gallery-admin-grid img{width:100%; height:80px; object-fit:cover; border-radius:3px; border:1px solid var(--border);}
.gallery-admin-grid .del-x{
    position:absolute;
    top:4px;
    right:4px;
    background:var(--maroon);
    color:#fff;
    border:none;
    border-radius:50%;
    width:20px;
    height:20px;
    font-size:.7rem;
    line-height:1;
}

@media(max-width:768px){
    .head-inner{
        flex-direction:column;
        text-align:center;
    }
    .medallion{
        margin:0 auto 20px;
    }
    .brand h1{
        font-size:30px;
    }
    .nav-inner{
        display:none;
        flex-direction:column;
        width:100%;
    }
    .nav-inner.show{
        display:flex;
    }
    .nav-inner a{
        width:100%;
        text-align:center;
        border-top:1px solid rgba(255,255,255,.15);
    }
    .menu-toggle{
        display:block;
        width:100%;
        background:#2f5d95;
        color:#fff;
        font-size:22px;
        border:none;
        padding:15px;
    }
    .menu-toggle .label{
        margin-left:8px;
        font-size:14px;
        font-weight:700;
        letter-spacing:.8px;
    }
}

@media(max-width:640px){
    .gallery-lightbox{
        padding:10px;
    }
    .lightbox-content img{
        max-width:94vw;
        max-height:82vh;
    }
    .lightbox-arrow{
        width:42px;
        height:58px;
        font-size:42px;
    }
    .lightbox-prev{left:5px;}
    .lightbox-next{right:5px;}
    .lightbox-close{
        top:8px;
        right:8px;
        width:42px;
        height:42px;
        font-size:30px;
    }
}
