/* ============================================================
   Redwater & District Museum — Styles (Green & Black theme)
   ============================================================ */

:root {
  --bg: #0b0d0b;
  --bg-card: #151815;
  --bg-surface: #1a1f1a;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #e9f2ea;
  --muted: #9db3a0;
  --green: #2e7d3f;
  --green-dark: #1f5a2c;
  --green-deep: #123320;
  --accent: #5ede83;
  --danger: #e0564f;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; color: #f2f7f3; }

a { color: var(--accent); }

img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #0b0d0b; }

.btn-light { background: #e9f2ea; color: #0b0d0b; }
.btn-light:hover { background: var(--accent); }

.btn-outline-light { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.btn-danger { background: var(--danger); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 0.85rem; }

.btn-block { width: 100%; }

.link-btn {
  background: none; border: none; color: inherit; text-decoration: underline;
  cursor: pointer; font-family: var(--font-body); font-size: 0.9rem;
}

.bot-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 11, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  box-shadow: 0 0 0 3px rgba(94, 222, 131, 0.25);
  position: relative; overflow: hidden;
}
.brand-mark img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; display: none;
}
.brand-mark img.loaded { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; color: #f2f7f3; }
.brand-text small { font-size: 0.75rem; color: var(--muted); }

.main-nav { display: flex; gap: 24px; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; padding: 6px 2px; position: relative; }
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width 0.2s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.nav-admin { color: var(--accent) !important; font-weight: 600 !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex; align-items: center;
  background:
    url('../img/banner.jpg') center / cover no-repeat,
    linear-gradient(160deg, #050805, #0e1f12 45%, #123320);
  color: #fff;
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(11, 13, 11, 0.7) 0%, rgba(11, 13, 11, 0.25) 45%, rgba(11, 13, 11, 0.1) 100%),
    linear-gradient(to bottom, rgba(11, 13, 11, 0.2) 0%, rgba(11, 13, 11, 0.05) 40%, rgba(11, 13, 11, 0.4) 100%);
}
.hero-content { position: relative; max-width: 720px; padding: 80px 20px; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 18px; color: #f2f7f3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.hero p {
  font-size: 1.15rem; opacity: 0.95; max-width: 560px; margin-bottom: 30px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 12px; }
.section-head p:not(.eyebrow) { color: var(--muted); }

.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: 0.78rem;
  font-weight: 600; color: var(--accent); margin-bottom: 10px;
}

/* ---------- Welcome ---------- */
.welcome { background: var(--bg-card); border-block: 1px solid var(--line); }
.welcome-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center; }
.welcome-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 18px; }
.welcome-text p { color: var(--muted); margin-bottom: 14px; }
.welcome-stats { display: grid; gap: 16px; }
.stat {
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; text-align: center;
}
.stat-num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--accent); display: block; }
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* ---------- Exhibits ---------- */
.exhibit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.exhibit-card {
  background: var(--bg-surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border-top: 6px solid var(--green);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.exhibit-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6); border-top-color: var(--accent); }
.exhibit-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.exhibit-cat {
  display: inline-block; align-self: flex-start;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(46, 125, 63, 0.2); color: var(--accent);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.exhibit-body h3 { font-size: 1.3rem; margin-bottom: 8px; }
.exhibit-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; flex: 1; }
.exhibit-year { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* ---------- Visit ---------- */
.visit { background: var(--bg-card); border-block: 1px solid var(--line); }
.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card { background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.visit-info h3 { margin-bottom: 16px; color: var(--accent); }
.hours-list { list-style: none; }
.hours-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.12); }
.hours-list li:last-child { border-bottom: none; }
.hours-list strong { font-family: var(--font-display); color: var(--ink); }
.hours-list span { color: var(--muted); }
.note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { margin-bottom: 18px; }
.about-text p { color: var(--muted); margin-bottom: 14px; }
.about-card {
  background: linear-gradient(160deg, var(--green-deep), #0a140c);
  border: 1px solid rgba(94, 222, 131, 0.25);
  color: #fff; border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow);
}
.about-card h3 { margin-bottom: 12px; color: var(--accent); }
.about-card p { margin-bottom: 20px; opacity: 0.95; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-card); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: start; }
.contact-form h3 { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem;
  background: #0e110e; color: var(--ink);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: 2px solid var(--accent); border-color: transparent;
}
.form-status { margin-top: 10px; font-size: 0.9rem; min-height: 1.2em; }
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--accent); }
.contact-details h3 { margin-bottom: 16px; color: var(--accent); }
.contact-details p { margin-bottom: 10px; color: var(--muted); }
.contact-details strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: #070907; color: var(--muted); padding: 28px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer .link-btn { color: var(--muted); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px;
  width: 100%; max-width: 420px; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal h3 { margin-bottom: 20px; color: #f2f7f3; }
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1;
}
.modal-close:hover { color: var(--accent); }

/* ---------- Photo Viewer ---------- */
.modal-photo { max-width: 760px; }
.photo-stage { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.photo-frame {
  flex: 1; background: #0a0d0a; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.photo-frame img { max-width: 100%; max-height: 62vh; width: auto; height: auto; }
.photo-caption { padding: 12px 16px; color: var(--muted); font-size: 0.92rem; text-align: center; font-style: italic; }
.photo-nav {
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease; flex-shrink: 0;
}
.photo-nav:hover { background: var(--green); color: #fff; }
.photo-nav:disabled { opacity: 0.3; cursor: default; }
.photo-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-counter { color: var(--muted); font-size: 0.88rem; }
.photo-placeholder { color: var(--muted); padding: 60px 0; text-align: center; }

/* Exhibit card button */
.exhibit-cta {
  margin-top: 6px; align-self: flex-start;
  background: none; border: 1px solid var(--green); color: var(--accent);
  padding: 8px 18px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.exhibit-cta:hover { background: var(--green); color: #fff; }

/* ---------- Announcements ---------- */
.announcements-list { display: grid; gap: 18px; max-width: 760px; margin: 0 auto; }
.announcement-item {
  background: var(--bg-surface); border: 1px solid var(--line);
  border-left: 4px solid var(--green); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow);
  transition: border-left-color 0.2s ease;
}
.announcement-item:hover { border-left-color: var(--accent); }
.announcement-date {
  display: inline-block; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.announcement-item h3 { font-size: 1.2rem; margin-bottom: 6px; }
.announcement-item p { color: var(--muted); font-size: 0.95rem; white-space: pre-wrap; }

.check-label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; color: var(--ink); }
.check-label input { width: auto; flex-shrink: 0; }

.banner-preview { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #0e110e; }
.banner-preview img { width: 100%; height: auto; display: block; }

/* ---------- Calendar ---------- */
.calendar-section { background: var(--bg); border-top: 1px solid var(--line); }
.calendar-layout { display: grid; grid-template-columns: 1fr 380px; gap: 26px; align-items: start; }
.calendar { padding: 22px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.calendar-head h3 { font-size: 1.2rem; color: #f2f7f3; margin: 0; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 8px; }
.calendar-weekdays span { text-align: center; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 48px; border: 1px solid transparent; border-radius: 10px;
  background: #0e110e; color: var(--ink); cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; padding: 4px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.calendar-day.empty { background: transparent; cursor: default; }
.calendar-day:hover { background: var(--bg-surface); border-color: var(--line); }
.calendar-day.today { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.calendar-day.has-events { background: rgba(46, 125, 63, 0.18); color: #fff; }
.calendar-day.selected { background: var(--green); color: #fff; }
.calendar-day-num { line-height: 1; }
.calendar-day-dots { display: flex; gap: 3px; }
.calendar-day-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: block; }
.calendar-day.selected .calendar-day-dots i { background: #fff; }

.calendar-upcoming { padding: 24px; }
.calendar-upcoming h3 { margin-bottom: 16px; color: var(--accent); }
.calendar-event-list { display: grid; gap: 14px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.calendar-event {
  display: flex; gap: 14px; background: #0e110e; border: 1px solid var(--line);
  border-left: 4px solid var(--green); border-radius: 10px; padding: 14px 16px;
}
.calendar-event:hover { border-left-color: var(--accent); }
.calendar-event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px; background: rgba(46, 125, 63, 0.15); border-radius: 8px; padding: 6px 8px; flex-shrink: 0;
}
.calendar-event-month { font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.calendar-event-day { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1.1; }
.calendar-event-body { min-width: 0; }
.calendar-event-body h4 { font-size: 1.05rem; margin-bottom: 4px; color: #f2f7f3; }
.calendar-event-body p { color: var(--muted); font-size: 0.88rem; }
.calendar-event-loc { color: var(--accent); font-size: 0.82rem; }
.calendar-event-desc { margin-top: 6px; font-size: 0.85rem; }

/* ---------- Nearby Museums ---------- */
.nearby { background: var(--bg-card); border-block: 1px solid var(--line); }
.museum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.museum-card {
  background: var(--bg-surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border-left: 4px solid var(--green);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-left-color 0.2s ease;
  padding: 24px;
}
.museum-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6); border-left-color: var(--accent); }
.museum-loc {
  display: inline-block; align-self: flex-start;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(46, 125, 63, 0.2); color: var(--accent);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.museum-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.museum-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; flex: 1; }
.museum-card .btn { align-self: flex-start; }

/* ---------- Donations ---------- */
.donations { background: var(--bg); border-top: 1px solid var(--line); }
.donations .section-head h2 { color: var(--accent); }
.donations .section-head p { color: var(--ink); }
.donations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.donation-card {
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-left-color 0.15s ease;
  border-left: 4px solid var(--accent);
}
.donation-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  border-left-color: #fff;
}
.donation-card h3 { font-size: 1.2rem; color: var(--accent); margin: 0; }
.donation-card .donation-meta { color: var(--muted); font-size: 0.9rem; }
.donation-card .donation-link {
  margin-top: auto; display: inline-block; padding: 10px 22px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.donation-card .donation-link:hover { background: #fff; color: var(--bg); }
.donation-card .donation-desc { color: var(--ink); font-size: 0.92rem; }
.admin-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw);
  background: var(--bg-surface); box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 90; overflow-y: auto; padding: 24px;
  border-left: 4px solid var(--accent);
  animation: slideIn 0.25s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.admin-header h3 { color: var(--accent); }
.admin-toolbar { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.admin-table td { color: var(--ink); }
.admin-table td small { color: var(--muted); }
.admin-actions { display: flex; gap: 6px; }
.admin-actions button {
  border: none; background: none; cursor: pointer; font-size: 0.95rem;
  color: var(--accent); padding: 4px;
}
.admin-actions .del { color: var(--danger); }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.empty-state { color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; padding: 12px 22px; border-radius: 999px;
  z-index: 200; font-size: 0.9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .welcome-grid, .about-inner, .contact-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: 260px;
    background: var(--bg-surface); flex-direction: column; padding: 80px 30px 30px;
    transform: translateX(100%); transition: transform 0.25s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
  }
  .main-nav.open { transform: translateX(0); }
  .form-row { grid-template-columns: 1fr; }
  .calendar-layout { grid-template-columns: 1fr; }
  .admin-panel { width: 100vw; }
}
