:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #64748b;
  --brand: #111827;
  --accent: #b7791f;
  --accent-dark: #8a5a16;
  --line: #d9c9ad;
  --danger: #b91c1c;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(31, 41, 51, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(183, 121, 31, 0.16), transparent 32rem),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 42%, #ffffff 100%);
}

a { color: inherit; }

img { max-width: 100%; }

.site-hero,
.page-header {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.55)),
    url('logo2.png') center / cover;
}

.site-hero { min-height: 640px; padding: 24px; }
.page-header { padding: 24px 24px 82px; }
.page-header.compact { min-height: 360px; }

.top-nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 999px;
  color: rgba(255,255,255,0.9);
}
.nav-links a:hover { background: rgba(255,255,255,0.15); }

.hero-content,
.page-title {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content { padding: 120px 0 70px; }
.page-title { padding-top: 72px; }

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f7d894;
}

.hero-content h1,
.page-title h1 {
  margin: 0 auto 20px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.95;
  max-width: 920px;
}

.page-title h1 { font-size: clamp(2.3rem, 5vw, 4.5rem); }

.hero-content p:not(.eyebrow),
.page-title p:not(.eyebrow) {
  max-width: 720px;
  margin: 0 auto 28px;
  font-size: 1.18rem;
  color: rgba(255,255,255,0.86);
}

.hero-actions,
.feature-grid,
.page-shell { max-width: 1180px; margin: 0 auto; }

.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover,
button:hover { transform: translateY(-1px); }

.primary { background: var(--accent); color: #fff; box-shadow: 0 12px 24px rgba(183, 121, 31, 0.28); }
.secondary { background: #fff; color: var(--brand); }
.danger { background: var(--danger); color: #fff; }
.small { padding: 8px 12px; font-size: 0.9rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 52px 24px;
}

.feature-card,
.panel,
.empty-state {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(217, 201, 173, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card { padding: 30px; }
.feature-icon { font-size: 2rem; }
.feature-card h2 { margin: 18px 0 10px; font-size: 1.6rem; }
.feature-card p,
.muted { color: var(--muted); line-height: 1.65; }
.feature-card a { color: var(--accent-dark); font-weight: 700; text-decoration: none; }

.page-shell { width: 100%; padding: 54px 24px 72px; }
.timeline-year { margin-bottom: 54px; }
.timeline-year > h2 { font-size: 2.4rem; text-align: center; margin: 0 0 30px; }

.timeline-list {
  position: relative;
  display: grid;
  gap: 28px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(var(--line), rgba(217,201,173,0.1));
}

.event-card {
  position: relative;
  width: min(520px, calc(50% - 44px));
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.event-card:nth-child(odd) { justify-self: start; }
.event-card:nth-child(even) { justify-self: end; }

.event-card::after {
  content: '';
  position: absolute;
  top: 36px;
  width: 16px;
  height: 16px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(183,121,31,0.2);
}

.event-card:nth-child(odd)::after { right: -53px; }
.event-card:nth-child(even)::after { left: -53px; }

.date-badge {
  min-height: 76px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #374151);
  border-radius: 18px;
  font-size: 1.35rem;
  font-weight: 800;
}

.event-meta {
  margin: 4px 0 8px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-body h3 { margin: 0 0 10px; font-size: 1.45rem; line-height: 1.15; }
.event-body p { line-height: 1.55; color: var(--muted); }
.event-body img {
  display: block;
  width: 100%;
  height: clamp(180px, 24vw, 260px);
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  margin-top: 14px;
  padding: 10px;
  background: linear-gradient(135deg, #fffaf2, #f3eadc);
  border: 1px solid #eadbc3;
}

.empty-state { padding: 44px; text-align: center; }

.admin-shell { max-width: 1180px; }
.admin-layout { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
.panel { padding: 26px; }
.hidden { display: none !important; }
.form-grid { display: grid; gap: 16px; }
.form-grid label { display: grid; gap: 7px; font-weight: 700; }
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  border: 1px solid #d8d0c2;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
.form-grid textarea { min-height: 110px; resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.message { color: var(--danger); font-weight: 700; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.admin-event-list { display: grid; gap: 12px; }
.admin-event {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #eee1cb;
  border-radius: 18px;
  background: #fffaf2;
}
.admin-event h3 { margin: 6px 0; }
.admin-event p { margin: 0; color: var(--muted); }

.calendar-card { max-width: 680px; margin: 0 auto; }

footer {
  margin-top: auto;
  text-align: center;
  padding: 24px;
  background: #111827;
  color: rgba(255,255,255,0.72);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .feature-grid,
  .admin-layout { grid-template-columns: 1fr; }

  .page-header { padding: 18px 16px 58px; }
  .page-header.compact { min-height: 320px; }
  .page-title { padding-top: 48px; }

  .timeline-year { margin-bottom: 42px; }
  .timeline-year > h2 {
    font-size: clamp(2rem, 9vw, 2.6rem);
    margin-bottom: 22px;
  }

  .timeline-list {
    gap: 20px;
    padding-left: 28px;
  }

  .timeline-list::before {
    left: 10px;
    width: 3px;
  }

  .event-card,
  .event-card:nth-child(odd),
  .event-card:nth-child(even) {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    margin: 0;
    grid-template-columns: 82px 1fr;
    gap: 14px;
    padding: 16px;
  }

  .event-card:nth-child(odd)::after,
  .event-card:nth-child(even)::after {
    left: -25px;
    right: auto;
    top: 28px;
    width: 14px;
    height: 14px;
  }

  .event-body h3 { font-size: 1.28rem; }
}

@media (max-width: 640px) {
  body { background: linear-gradient(180deg, #fffaf0 0%, var(--bg) 55%, #ffffff 100%); }
  .site-hero { min-height: 580px; padding: 16px; }
  .top-nav { align-items: flex-start; border-radius: 24px; flex-direction: column; padding: 14px; }
  .nav-links { width: 100%; justify-content: flex-start; gap: 6px; }
  .nav-links a { padding: 8px 10px; font-size: 0.95rem; }
  .hero-content { padding-top: 74px; }
  .feature-grid { padding: 32px 16px; }
  .page-shell { padding: 34px 14px 54px; }

  .timeline-list {
    padding-left: 20px;
    gap: 18px;
  }

  .timeline-list::before { left: 7px; }

  .event-card,
  .event-card:nth-child(odd),
  .event-card:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(31, 41, 51, 0.11);
  }

  .event-card:nth-child(odd)::after,
  .event-card:nth-child(even)::after {
    left: -20px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-width: 3px;
  }

  .date-badge {
    min-height: auto;
    width: fit-content;
    place-items: start;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 1rem;
  }

  .event-meta {
    font-size: 0.78rem;
    line-height: 1.45;
    letter-spacing: 0.045em;
  }

  .event-body h3 {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  .event-body p { font-size: 0.98rem; }

  .event-body img {
    height: clamp(160px, 54vw, 220px);
    padding: 8px;
    border-radius: 16px;
    margin-top: 10px;
  }

  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .page-title h1 { font-size: 2.25rem; }
  .page-title p:not(.eyebrow) { font-size: 1rem; }
  .page-shell { padding-inline: 10px; }
  .timeline-list { padding-left: 16px; }
  .event-card,
  .event-card:nth-child(odd),
  .event-card:nth-child(even) { padding: 12px; }
  .event-card:nth-child(odd)::after,
  .event-card:nth-child(even)::after { left: -17px; }
}

.admin-event-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .admin-event {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-event-actions {
    justify-content: flex-start;
  }
}
