/* NMMEA District 7 — theme
   Palette: deep navy + burgundy + warm gold (concert hall feel, no green) */

:root {
    --navy:        #16264a;
    --navy-dark:   #0e1a36;
    --navy-light:  #233763;
    --burgundy:    #7a1e2e;
    --burgundy-lt: #9a2c3e;
    --gold:        #c9a14a;
    --gold-light:  #e6c878;
    --cream:       #f8f4ea;
    --paper:       #ffffff;
    --ink:         #1d1f25;
    --muted:       #5b6172;
    --line:        #e5e1d4;
    --shadow:      0 4px 18px rgba(14, 26, 54, 0.10);
    --radius:      8px;
    --serif:       'Georgia', 'Cambria', 'Times New Roman', serif;
    --sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-decoration: none; }
a:hover { color: var(--burgundy-lt); text-decoration: underline; }

.container { width: 92%; max-width: 1180px; margin: 0 auto; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy) 60%, var(--navy-light));
    color: #fff;
    box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 3px solid var(--gold);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { height: 64px; width: auto; }
.brand-seal {
    height: 72px !important; width: 72px !important;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--gold), 0 4px 12px rgba(0,0,0,.45);
    background: #0e1a36;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: .82rem; color: var(--gold-light); letter-spacing: 1px; text-transform: uppercase; }

.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; padding: 8px;
}
.nav-toggle span {
    display: block; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}

.site-nav {
    background: rgba(0,0,0,.18);
    border-top: 1px solid rgba(255,255,255,.08);
}
.nav-list {
    list-style: none; margin: 0 auto; padding: 0;
    display: flex; flex-wrap: wrap; gap: 4px;
}
/* Align the first menu item flush with the seal in the header above. */
.nav-list > li:first-child > a { padding-left: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block; padding: 14px 18px;
    color: #fff; font-weight: 600; font-size: .95rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: background .2s, border-color .2s;
}
.nav-list > li > a:hover,
.nav-list > li > a.active {
    background: rgba(255,255,255,.08);
    border-bottom-color: var(--gold);
    text-decoration: none;
}
.has-sub .sub {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: #fff;
    list-style: none; padding: 8px 0; margin: 0;
    min-width: 280px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--gold);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 200;
}
.has-sub:hover .sub,
.has-sub:focus-within .sub { display: block; }
.sub li a {
    display: block; padding: 10px 18px;
    color: var(--navy); font-size: .92rem;
    border-left: 3px solid transparent;
}
.sub li a:hover {
    background: var(--cream); border-left-color: var(--burgundy);
    text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: 380px;
    background: linear-gradient(135deg, rgba(14,26,54,.85), rgba(122,30,46,.75)), url('../images/hero-music.jpg') center/cover no-repeat;
    color: #fff;
    display: flex; align-items: center;
    border-bottom: 4px solid var(--gold);
}
.hero-inner { padding: 70px 0; max-width: 760px; }
.hero h1 { color: #fff; font-size: 2.8rem; margin-bottom: .3em; }
.hero p { font-size: 1.15rem; color: #f1ecdf; margin-bottom: 1.5em; }
.hero .btn { margin-right: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 12px 24px;
    background: var(--gold); color: var(--navy-dark);
    font-weight: 700; text-transform: uppercase; letter-spacing: .8px; font-size: .85rem;
    border-radius: var(--radius); border: 2px solid var(--gold);
    cursor: pointer; transition: all .2s;
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); text-decoration: none; color: var(--navy-dark); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); }
.btn-primary { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.btn-primary:hover { background: var(--burgundy-lt); border-color: var(--burgundy-lt); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .75rem; }
.btn-danger { background: #b42a2a; border-color: #b42a2a; color: #fff; }
.btn-danger:hover { background: #d63838; border-color: #d63838; color: #fff; }

/* ---------- Sections ---------- */
.site-main { padding: 0 0 60px; }
.section { padding: 50px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { text-align: center; margin-bottom: 14px; }
.section-title:after {
    content: ''; display: block; width: 60px; height: 3px;
    background: var(--gold); margin: 12px auto 0;
}
.section-lede { text-align: center; max-width: 720px; margin: 0 auto 36px; color: var(--muted); font-size: 1.05rem; }

.page-head {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: #fff;
    padding: 50px 0 40px;
    border-bottom: 4px solid var(--gold);
}
.page-head h1 { color: #fff; }
.page-head p { color: var(--gold-light); margin: 0; }

/* ---------- Cards / grids ---------- */
.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
    background: var(--paper); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 24px;
    border-top: 4px solid var(--gold);
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(14,26,54,.14); }
.card h3 { color: var(--burgundy); margin-bottom: .35em; }
.card .icon { font-size: 1.8rem; margin-bottom: 8px; color: var(--navy); }
.card a { font-weight: 600; }

/* Officers */
.officer-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.officer {
    background: var(--paper); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 26px 24px;
    border-left: 5px solid var(--burgundy);
}
.officer .position {
    font-family: var(--serif); color: var(--navy); font-size: 1.2rem; font-weight: 700;
    margin-bottom: 4px;
}
.officer .name { font-size: 1.05rem; color: var(--burgundy); font-weight: 600; }
.officer .meta { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.officer .meta a { color: var(--navy); }

/* Festivals */
.festival {
    background: var(--paper); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 28px;
    overflow: hidden;
    display: grid; grid-template-columns: 1fr 1fr;
    border-top: 4px solid var(--gold);
}
.festival .info { padding: 26px; }
.festival h3 { color: var(--burgundy); margin-top: 0; }
.festival .date {
    display: inline-block; background: var(--navy); color: #fff;
    padding: 5px 12px; border-radius: 20px; font-size: .85rem; margin-bottom: 10px;
    font-weight: 600;
}
.festival .location { color: var(--muted); margin: 6px 0 0; }
.festival iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }
@media (max-width: 720px) { .festival { grid-template-columns: 1fr; } .festival iframe { min-height: 240px; } }

/* Calendar */
.calendar-wrap {
    background: var(--paper); padding: 18px; border-radius: var(--radius);
    box-shadow: var(--shadow); border-top: 4px solid var(--gold);
}
.calendar-wrap iframe { width: 100%; min-height: 640px; border: 0; }

/* Footer */
.site-footer {
    background: var(--navy-dark); color: #d6dbe9;
    margin-top: 0;
}
.footer-inner {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px;
    padding: 50px 0 30px;
}
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { height: 70px; }
.footer-seal { width: 70px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.footer-brand strong { color: #fff; font-family: var(--serif); font-size: 1.2rem; }
.footer-links strong, .footer-contact strong {
    display: block; color: var(--gold-light); text-transform: uppercase;
    letter-spacing: 1px; font-size: .85rem; margin-bottom: 12px;
}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a, .footer-contact a { color: #d6dbe9; }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 18px 0; font-size: .85rem; color: #8b93a8; text-align: center;
}

/* ---------- Forms / Admin ---------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--cream); }
.admin-sidebar {
    width: 250px; background: var(--navy-dark); color: #fff; padding: 30px 0;
    flex-shrink: 0;
}
.admin-sidebar .brand { padding: 0 24px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar nav { padding-top: 18px; }
.admin-sidebar nav a {
    display: block; padding: 12px 24px; color: #d6dbe9;
    border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
    background: rgba(255,255,255,.06); border-left-color: var(--gold);
    color: #fff; text-decoration: none;
}
.admin-content { flex: 1; padding: 36px 44px; max-width: 1100px; }
.admin-content h1 { margin-top: 0; }

.form-card {
    background: #fff; padding: 28px; border-radius: var(--radius);
    box-shadow: var(--shadow); border-top: 4px solid var(--gold);
    margin-bottom: 30px;
}
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-row.full { grid-template-columns: 1fr; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: .9rem; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=date], .field input[type=file], .field textarea, .field select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 6px; font-size: 1rem; font-family: inherit; background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--navy); color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--cream); }
.table .actions { display: flex; gap: 8px; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #e7f4e8; color: #1f5b29; border-left: 4px solid #2f8b3d; }
.alert-error { background: #fbeaea; color: #6f1f1f; border-left: 4px solid #b42a2a; }
.alert-info { background: #eaf0fb; color: #1f3a6f; border-left: 4px solid var(--navy); }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy-dark), var(--burgundy)); padding: 30px; }
.login-card { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: 0 14px 50px rgba(0,0,0,.3); width: 100%; max-width: 420px; border-top: 5px solid var(--gold); }
.login-card h1 { text-align: center; color: var(--navy); }
.login-card .brand-mini { text-align: center; margin-bottom: 18px; }
.login-card .brand-mini img { height: 70px; margin: 0 auto; }

/* Calendar download box */
.cal-download {
    background: var(--paper); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 22px 24px;
    border-left: 5px solid var(--burgundy);
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    margin-bottom: 26px; flex-wrap: wrap;
}
.cal-download p { margin: 0; color: var(--navy); }
.cal-download strong { font-family: var(--serif); font-size: 1.15rem; }

/* Sub-link list */
.link-list { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 0; border-top: 4px solid var(--gold); }
.link-list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 22px; border-bottom: 1px solid var(--line);
    color: var(--navy); font-weight: 600;
}
.link-list a:last-child { border-bottom: 0; }
.link-list a:hover { background: var(--cream); color: var(--burgundy); text-decoration: none; }
.link-list a span.arrow { color: var(--gold); font-size: 1.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
    .nav-toggle { display: block; }
    .site-nav { display: none; }
    .site-nav.open { display: block; }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-list > li > a { padding: 14px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .has-sub .sub { position: static; box-shadow: none; border-radius: 0; border-top: 0; background: rgba(0,0,0,.2); }
    .sub li a { color: #f1ecdf; padding: 10px 36px; }
    .sub li a:hover { background: rgba(0,0,0,.25); color: var(--gold-light); border-left-color: var(--gold); }
    .footer-inner { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-content { padding: 24px; }
}
