/* =============================================================================
   style.css — Dr. Chen's Biology Academy
   Deep green + white + gold academic theme
   ============================================================================= */

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

:root {
  --green-dark:  #0f2d1a;   /* Very dark green — hero background */
  --green:       #1a4731;   /* Deep forest green — nav, footer, accents */
  --green-mid:   #1e5c3a;   /* Mid green — hover states */
  --green-light: #2d7a52;   /* Lighter green — borders */
  --green-pale:  #e8f5ee;   /* Very pale green — section backgrounds */
  --gold:        #c9a84c;   /* Gold — primary accent */
  --gold-light:  #e8c97a;   /* Light gold — hover */
  --white:       #ffffff;
  --ink:         #0d1f0f;   /* Near-black with green tint */
  --slate:       #4a6353;   /* Muted green-grey for body text */
  --mist:        #f4f9f6;   /* Off-white with green tint */
  --shadow:      0 4px 24px rgba(15,45,26,0.12);
  --shadow-lg:   0 12px 48px rgba(15,45,26,0.2);
  --radius:      12px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--ink); background: var(--white); line-height: 1.65; }

/* ── Flash ── */
.flash-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; }
.flash-msg { padding: 14px 24px; text-align: center; font-weight: 500; font-size: 0.93rem; }
.flash-msg.success { background: #dcfce7; color: #166534; }
.flash-msg.error   { background: #fee2e2; color: #991b1b; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 5%;
  background: rgba(15,45,26,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--gold); text-decoration: none;
}
.nav-logo span { color: rgba(255,255,255,0.6); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--gold); }
.nav-cta { background: var(--gold); color: var(--ink); padding: 9px 20px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 0.85rem; transition: all 0.2s; }
.nav-cta:hover { background: var(--gold-light); transform: translateY(-1px); }

/* ── HERO — Split Layout ── */
/* ── HERO — Stats Style ── */
#hero {
  min-height: 100vh;
  background: var(--green-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 5% 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Dot grid texture */
#hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 700px;
  animation: fadeUp 0.6s ease both;
}

/* Gold pill badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold); padding: 7px 18px; border-radius: 30px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 24px;
}

.hero-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -1px;
  color: var(--white); margin-bottom: 20px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.62); font-weight: 300;
  line-height: 1.75; margin-bottom: 36px;
  max-width: 540px; margin-left: auto; margin-right: auto;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s 0.3s ease both;
  margin-bottom: 0;
}

/* Buttons */
.btn-primary { background: var(--gold); color: var(--ink); padding: 14px 32px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 0.93rem; box-shadow: 0 4px 20px rgba(201,168,76,0.35); transition: all 0.2s; }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-outline { border: 1.5px solid rgba(255,255,255,0.25); color: var(--white); padding: 14px 32px; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: 0.93rem; transition: all 0.2s; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── STATS STRIP ── */
/* Full-width bar that anchors to the bottom of the hero */
.hero-stats-strip {
  position: relative; z-index: 1;
  width: 100%;
  display: flex; align-items: stretch; justify-content: center;
  margin-top: 64px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  animation: fadeUp 0.6s 0.4s ease both;
}

.hero-stat {
  flex: 1; max-width: 200px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 28px 20px;
  transition: background 0.2s;
}
.hero-stat:hover { background: rgba(255,255,255,0.04); }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem; font-weight: 900; line-height: 1;
  color: var(--gold); display: block; margin-bottom: 6px;
}

.stat-label {
  font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* Thin vertical divider between stats */
.stat-divider {
  width: 1px;
  background: rgba(255,255,255,0.08);
  align-self: stretch;
  margin: 16px 0;
}

/* Unused trust styles kept for safety */
.hero-trust { display: none; }
.trust-item, .trust-divider { display: none; }

@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  #hero { padding: 100px 5% 48px; }
  .hero-news-row { margin-top: 32px; }
  .hero-trust { gap: 8px; }
  .trust-divider { display: none; }
}

/* ── SECTION UTILITIES ── */
section { padding: 88px 5%; }
.section-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-light); margin-bottom: 10px; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; color: var(--ink); line-height: 1.2; margin-bottom: 14px; }
.section-title.light { color: var(--white); }
.section-sub { font-size: 1rem; color: var(--slate); max-width: 540px; }
.section-sub.light { color: rgba(255,255,255,0.6); }
.section-body { font-size: 1rem; color: var(--slate); line-height: 1.8; max-width: 600px; }
.section-header { margin-bottom: 52px; }
.center { text-align: center; }
.center .section-sub { margin: 0 auto; }

/* ── ABOUT ── */
#about { background: var(--mist); }
.about-layout { display: grid; grid-template-columns: 200px 1fr 500px; gap: 56px; align-items: stretch; }
.about-visual {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 20px;
  width: 200px;
  height: 200px;        /* fixed size — no longer expands */
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.about-text {
  padding-left: 24px;
}
.about-text .section-label { color: var(--green-light); }
.about-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}
/* Third column: news panel wrapper — stretches to match bio height */
.about-news {
  display: flex;
  flex-direction: column;
}
.about-news .news-panel {
  flex: 1;                  /* fill the full height of the about section */
  background: var(--green-pale);
  border-color: rgba(26,71,49,0.15);
}
.about-news .news-panel-header {
  background: rgba(26,71,49,0.08);
  border-color: rgba(26,71,49,0.12);
}
.about-news .news-list {
  max-height: 260px;        /* capped at about section height, scrolls if more */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(26,71,49,0.3) transparent;
}
.about-news .news-list::-webkit-scrollbar { width: 4px; }
.about-news .news-list::-webkit-scrollbar-track { background: transparent; }
.about-news .news-list::-webkit-scrollbar-thumb { background: rgba(26,71,49,0.3); border-radius: 4px; }
.about-news .news-list::-webkit-scrollbar-thumb:hover { background: rgba(26,71,49,0.6); }

/* ── CLASSES ── */
#classes { background: var(--white); }
.classes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.class-card {
  border: 1.5px solid #d4e6da; border-radius: var(--radius);
  overflow: hidden; transition: all 0.25s;
  display: flex; flex-direction: column;  /* stack header + body */
  height: 320px;                          /* fixed card height */
}
.class-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-light); }
.class-header {
  background: var(--green); padding: 20px 24px;
}
.class-header h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--white); }
.class-body {
  padding: 22px 24px;
  flex: 1;               /* fill remaining height after header */
  overflow-y: auto;      /* scroll if content overflows */
  scrollbar-width: thin;
  scrollbar-color: rgba(26,71,49,0.3) transparent;
}
.class-body::-webkit-scrollbar { width: 4px; }
.class-body::-webkit-scrollbar-track { background: transparent; }
.class-body::-webkit-scrollbar-thumb { background: rgba(26,71,49,0.3); border-radius: 4px; }
.class-body::-webkit-scrollbar-thumb:hover { background: rgba(26,71,49,0.6); }
.class-meta { display: flex; gap: 20px; margin-bottom: 14px; flex-wrap: wrap; }
.class-meta-item { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; color: var(--slate); }
.meta-icon { font-size: 0.9rem; }
.class-desc { font-size: 0.9rem; color: var(--slate); line-height: 1.65; margin-bottom: 18px; }
.class-cta { font-size: 0.82rem; font-weight: 600; color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(26,71,49,0.2); padding-bottom: 2px; transition: all 0.2s; }
.class-cta:hover { color: var(--green-light); border-color: var(--green-light); }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--slate); }
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state a { color: var(--green); font-weight: 600; }

/* ── AWARDS ── */
#awards { background: var(--green-pale); }
.awards-year-group { margin-bottom: 52px; }
.year-divider {
  display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
}
.year-divider::before, .year-divider::after {
  content: ''; flex: 1; height: 1px; background: #c5dece;
}
.year-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--green); padding: 0 8px;
}
.awards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.award-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: all 0.25s;
}
.award-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.award-photo { height: 200px; overflow: hidden; background: var(--green-pale); }
.award-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.award-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; background: linear-gradient(135deg, var(--green-pale), #d4e6da);
}
.award-body { padding: 18px 20px; }
.award-level {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
/* Medal color coding */
.award-level.gold-medal     { background: rgba(201,168,76,0.15); color: #8a6f20; }
.award-level.silver-medal   { background: rgba(148,163,184,0.2); color: #475569; }
.award-level.bronze-medal   { background: rgba(180,120,80,0.15); color: #7c4a1e; }
.award-level.honorable-mention { background: rgba(26,71,49,0.1); color: var(--green); }
/* Fallback for any other award level */
[class*="award-level"] { background: rgba(26,71,49,0.1); color: var(--green); }
.award-name { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.award-competition { font-size: 0.8rem; color: var(--slate); margin-bottom: 10px; }
.award-desc { font-size: 0.85rem; color: var(--slate); line-height: 1.6; margin-bottom: 12px; }
.award-link { font-size: 0.8rem; font-weight: 600; color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(26,71,49,0.2); padding-bottom: 1px; transition: all 0.2s; }
.award-link:hover { color: var(--green-mid); }

/* ── CONTACT ── */
#contact { background: var(--green-dark); }
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; }
.info-items { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-icon { font-size: 1.1rem; margin-top: 2px; }
.info-label { font-size: 0.7rem; color: rgba(255,255,255,0.4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }
.info-val { font-size: 0.92rem; color: var(--white); }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 0.77rem; font-weight: 600; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.06em; }
.form-group input, .form-group textarea { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: var(--white); border-radius: 6px; padding: 12px 15px; font-family: 'Inter', sans-serif; font-size: 0.91rem; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 110px; }
.btn-submit { background: var(--gold); color: var(--ink); border: none; cursor: pointer; padding: 14px 30px; border-radius: 6px; font-weight: 600; font-size: 0.93rem; font-family: 'Inter', sans-serif; transition: all 0.2s; align-self: flex-start; box-shadow: 0 4px 16px rgba(201,168,76,0.3); }
.btn-submit:hover { background: var(--gold-light); transform: translateY(-2px); }

/* ── FOOTER ── */
footer { background: #080f09; border-top: 1px solid rgba(201,168,76,0.1); padding: 32px 5%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--gold); }
.footer-tagline { font-size: 0.8rem; color: rgba(255,255,255,0.3); font-style: italic; margin-top: 3px; }
footer p { font-size: 0.77rem; color: rgba(255,255,255,0.22); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .about-layout { grid-template-columns: 1fr; }
  .about-visual { display: none; }
  .about-news { display: none; }
  .contact-layout, .form-row { grid-template-columns: 1fr; }
  footer { justify-content: center; text-align: center; }
}
