:root {
  --gold: #B8862B;
  --gold-dark: #8C6420;
  --maroon: #6E1F2A;
  --ink: #211C16;
  --paper: #FBF7EF;
  --paper-dim: #F1E9D8;
  --line: #E2D6B8;
  --muted: #6B6255;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* NAV */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand img.logo-mark { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.brand-text { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1rem; line-height: 1.25; color: var(--ink); }
.brand-text small { display: block; font-family: 'Inter', sans-serif; font-weight: 400; font-size: 0.7rem; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; margin-top: 1px; }

nav.links { display: flex; align-items: center; gap: 1.4rem; }
nav.links a.nav-link { text-decoration: none; font-size: 0.87rem; font-weight: 500; color: var(--ink); opacity: 0.7; padding-bottom: 3px; border-bottom: 2px solid transparent; }
nav.links a.nav-link:hover { opacity: 1; }
nav.links a.nav-link.active { opacity: 1; border-bottom-color: var(--gold); }

.directions-group { display: flex; gap: 0.5rem; }
.dir-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; text-decoration: none; padding: 0.42rem 0.75rem; border-radius: 6px; border: 1px solid var(--line); color: var(--ink); white-space: nowrap; background: #fff; }
.dir-btn:hover { border-color: var(--gold); }

@media (max-width: 860px) {
  nav.links a.nav-link { display: none; }
  .dir-btn span.dir-label { display: none; }
  .dir-btn { padding: 0.5rem; }
}

/* HERO */
.hero { position: relative; min-height: 56vh; display: flex; align-items: flex-end; background-size: cover; background-position: center 65%; background-image: linear-gradient(180deg, rgba(20,14,8,0.15) 0%, rgba(20,14,8,0.35) 55%, rgba(15,10,6,0.88) 100%), var(--hero-img); }
.hero-content { position: relative; max-width: 760px; padding: 3.2rem 1.5rem 2.6rem; color: #fff; }
.hero-eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #E8D9AE; margin-bottom: 0.8rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.08; margin-bottom: 0.9rem; }
.hero p.tagline { font-size: 1rem; font-weight: 400; max-width: 520px; color: #EFE7D4; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.page-hero { padding: 3rem 1.5rem 2.4rem; background: var(--paper-dim); border-bottom: 1px solid var(--line); }
.page-hero-inner { max-width: 1040px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--ink); }
.page-hero p { color: var(--muted); margin-top: 0.6rem; max-width: 60ch; }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; font-weight: 600; text-decoration: none; padding: 0.7rem 1.15rem; border-radius: 6px; border: none; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--gold); color: #221600; }
.btn-outline { border: 1px solid rgba(255,255,255,0.55); color: #fff; background: transparent; }
.btn-outline-dark { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.btn-danger { background: #9c3b3b; color: #fff; }
.btn-small { font-size: 0.78rem; padding: 0.45rem 0.8rem; }

/* SECTIONS */
section { max-width: 1040px; margin: 0 auto; padding: 4.5rem 1.5rem; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.6rem; }
h2.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--ink); margin-bottom: 1.8rem; max-width: 30ch; }

.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: start; }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p, .prose p { color: #46403A; margin-bottom: 1.05rem; font-size: 0.98rem; white-space: pre-line; }
.about-grid p:last-child { margin-bottom: 0; }
.about-photo { border-radius: 4px; overflow: hidden; }
.about-photo img { width: 100%; height: 340px; object-fit: cover; }
.about-photo figcaption { font-size: 0.78rem; color: var(--muted); padding-top: 0.6rem; }

.gallery-section { background: var(--paper-dim); }
.gallery-grid { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 0.9rem; height: 420px; overflow: hidden; }
.gallery-grid img { display: block; width: 100%; height: 100%; min-height: 0; min-width: 0; object-fit: cover; border-radius: 4px; }
.gallery-grid .g-main { grid-column: 1; grid-row: 1 / 3; min-height: 0; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; } .gallery-grid .g-main { grid-row: auto; } .gallery-grid img { height: 230px; } }

.full-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.full-gallery-grid figure { border-radius: 4px; overflow: hidden; background: var(--paper-dim); }
.full-gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.full-gallery-grid figcaption { font-size: 0.78rem; color: var(--muted); padding: 0.5rem 0.1rem 0; }
@media (max-width: 760px) { .full-gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.location-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.location-header .addr { font-size: 0.95rem; color: #46403A; max-width: 46ch; }
.location-header .addr strong { color: var(--ink); }
.map-box { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.map-box iframe { width: 100%; height: 460px; border: 0; display: block; }
.map-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.fb-section { background: var(--paper-dim); }
.fb-wrap { display: flex; justify-content: center; }
.fb-frame-container { width: 100%; max-width: 560px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.fb-fallback { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }
.fb-fallback a { color: var(--maroon); font-weight: 600; }

.committee-section { background: var(--paper); }
.officer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 1.3rem; margin-bottom: 3rem; }
.officer-photo { border-radius: 4px; overflow: hidden; aspect-ratio: 3/4; background: var(--paper-dim); }
.officer-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.officer-role { margin-top: 0.85rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-dark); }
.officer-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.08rem; color: var(--ink); margin-top: 0.2rem; }
.officer-name span { font-family: 'Inter', sans-serif; font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.members-heading { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.15rem; color: var(--ink); margin-bottom: 1.3rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.members-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
.member-photo { border-radius: 4px; overflow: hidden; aspect-ratio: 3/4; background: var(--paper-dim); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-name { margin-top: 0.6rem; font-size: 0.85rem; font-weight: 500; color: var(--ink); }
@media (max-width: 760px) { .officer-grid { grid-template-columns: repeat(2, 1fr); } .members-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; } }

/* PROGRAMS */
.program-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem; }
.program-card { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; padding: 1.3rem 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.program-card > div:first-child { flex: 1 1 auto; min-width: 0; }
.program-card h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 0.35rem; }
.program-card p { font-size: 0.9rem; color: var(--muted); max-width: 55ch; }
.program-schedule { font-size: 0.82rem; font-weight: 600; color: var(--gold-dark); text-align: right; flex: 0 0 auto; width: 15rem; }
@media (max-width: 640px) { .program-card { flex-wrap: wrap; } .program-schedule { width: auto; text-align: left; } }
.registration-box { margin-top: 3rem; padding: 1.6rem; background: var(--paper-dim); border-radius: 8px; border: 1px solid var(--line); }
.registration-box h3 { font-size: 1rem; margin-bottom: 0.6rem; color: var(--ink); }
.registration-box p { font-size: 0.85rem; color: var(--muted); }
.registration-box strong { color: var(--ink); }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.contact-card h3 { font-size: 0.95rem; margin-bottom: 0.8rem; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 1px; font-family: 'Inter', sans-serif; font-weight: 600; }
.contact-card p { font-size: 0.95rem; margin-bottom: 0.4rem; }
.contact-card a { color: var(--maroon); font-weight: 600; text-decoration: none; }

/* FOOTER */
footer { background: var(--ink); color: #C9C1B2; padding: 2.6rem 1.5rem 1.8rem; text-align: center; font-size: 0.85rem; }
footer img.footer-logo { height: 44px; width: 44px; border-radius: 50%; margin: 0 auto 0.9rem; display: block; }
footer .footer-name { color: #fff; font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.05rem; margin-bottom: 0.3rem; }
footer .footer-links { margin-top: 0.8rem; display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
footer .footer-links a { color: #E8D9AE; text-decoration: none; font-weight: 500; font-size: 0.82rem; }
footer .note { max-width: 560px; margin: 1.6rem auto 0; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.74rem; color: #837C6E; line-height: 1.6; }

/* ============================= ADMIN ==================================== */
.admin-body { background: #F4F1EA; min-height: 100vh; }
.admin-bar { background: var(--ink); color: #fff; padding: 0.8rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.admin-bar a { color: #E8D9AE; text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.admin-bar .admin-bar-title { font-family: 'Fraunces', serif; font-weight: 600; }
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.admin-nav { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.admin-nav a { text-decoration: none; font-size: 0.85rem; font-weight: 600; padding: 0.5rem 0.9rem; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.admin-nav a.active { background: var(--gold); border-color: var(--gold); color: #221600; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; margin-bottom: 1.5rem; }
.admin-card h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.admin-login-wrap { max-width: 380px; margin: 4rem auto; padding: 2rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.admin-login-wrap h1 { font-size: 1.3rem; margin-bottom: 1.4rem; text-align: center; }

.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--ink); }
.form-row .hint { font-size: 0.76rem; color: var(--muted); margin-top: 0.3rem; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=number], .form-row input[type=email], .form-row textarea, .form-row select {
  width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 0.92rem; background: #fff; color: var(--ink);
}
.form-row textarea { min-height: 110px; resize: vertical; }
.form-row input[type=file] { font-size: 0.85rem; }
.form-actions { display: flex; gap: 0.7rem; margin-top: 1.4rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--paper-dim); font-size: 0.88rem; vertical-align: middle; }
.admin-table img.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.admin-table .row-actions { display: flex; gap: 0.5rem; white-space: nowrap; }
.admin-table .row-actions a, .admin-table .row-actions button { font-size: 0.78rem; }
.inline-form { display: inline; }

.flash-success { background: #E6F0E2; border: 1px solid #B9D6AE; color: #33562A; padding: 0.7rem 1rem; border-radius: 6px; font-size: 0.85rem; margin-bottom: 1.2rem; }
.flash-error { background: #F6E3E3; border: 1px solid #E3B4B4; color: #7A2626; padding: 0.7rem 1rem; border-radius: 6px; font-size: 0.85rem; margin-bottom: 1.2rem; }

.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.gallery-admin-item { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gallery-admin-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-admin-item .gi-body { padding: 0.6rem 0.7rem 0.8rem; }
.gallery-admin-item .gi-body input { font-size: 0.78rem; margin-bottom: 0.4rem; }
