/* ==========================================================================
   Sunflower Association – shared site theme
   Loaded after each page's inline <style>, so these rules refine the
   existing layout (same structure, same images) with a consistent look.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

:root {
  --gold: #d9b45f;
  --gold-bright: #f0cf7c;
  --gold-deep: #a9853a;
  --gold-soft: rgba(217, 180, 95, 0.14);
  --bg-dark: #121110;
  --bg-section: #1a1917;
  --surface: #22201d;
  --surface-hover: #292622;
  --border: rgba(255, 255, 255, 0.07);
  --border-gold: rgba(217, 180, 95, 0.38);
  --text-white: #f7f3ea;
  --text-gray: #a7a196;
  --text-light: #d8d2c6;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.65);
  --shadow-lift: 0 22px 44px -16px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border-gold);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 5vw, 60px);
  --content-pad: var(--pad);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-dark);
  color: var(--text-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: #1a1408; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── HEADER / NAV ─────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  background:
    radial-gradient(ellipse 55% 85% at 80% 60%, rgba(217, 180, 95, 0.13), transparent 70%),
    radial-gradient(ellipse 40% 60% at 5% 0%, rgba(217, 180, 95, 0.05), transparent 70%),
    var(--bg-dark);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.top-nav {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.nav-logo img { transition: transform 0.4s var(--ease); }
.nav-logo:hover img { transform: rotate(-8deg) scale(1.06); }

.nav-links { gap: clamp(4px, 1vw, 10px); }

.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px clamp(10px, 1.4vw, 16px);
  border-radius: 999px;
  color: var(--text-light);
  opacity: 1;
  letter-spacing: 0.01em;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-links a.active { color: var(--gold-bright); background: var(--gold-soft); }
.nav-home-icon { fill: currentColor; }

/* ── HERO ─────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(40px, 5.5vw, 72px); }

.hero-info h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #fffaf0 30%, #e9d9b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-info h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-info p { color: var(--text-gray); line-height: 1.8; }

.hero-social { margin-top: 22px; }
.social-icon {
  width: 42px; height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.social-icon:hover {
  background: var(--gold-soft);
  border-color: var(--border-gold);
  transform: translateY(-2px);
}
.social-icon svg { width: 18px; height: 18px; }

.hero-logo img {
  filter: drop-shadow(0 14px 40px rgba(217, 180, 95, 0.22));
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── CONTENT ──────────────────────────────────────────────────────────── */
.content-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 240px),
    var(--bg-section);
  padding-top: clamp(44px, 5vw, 72px);
  padding-bottom: clamp(56px, 6vw, 88px);
}

.section-title,
.team-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  position: relative;
  padding-left: 18px;
}
.section-title::before,
.team-section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em; bottom: 0.18em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
}
.team-section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 10px; }

/* text blocks */
.about-text, .team-bio { color: var(--text-light); }
.team-subtitle { color: var(--gold); font-weight: 700; padding-left: 18px; }

.programs-intro {
  color: var(--text-light);
  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.4vw, 26px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── EVENT CARDS ──────────────────────────────────────────────────────── */
.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding-bottom: 16px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s;
}
.event-card:hover {
  transform: translateY(-5px);
  background: var(--surface-hover);
  box-shadow: var(--shadow-lift);
}
.event-thumb {
  border-radius: 0;
  margin-bottom: 14px;
  background: #2a2724;
  position: relative;
}
.event-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.35));
  opacity: 0;
  transition: opacity 0.35s;
}
.event-card:hover .event-thumb::after { opacity: 1; }
.event-thumb img { transition: transform 0.6s var(--ease); }
.event-card:hover .event-thumb img { transform: scale(1.06); }

.event-date {
  padding: 0 16px;
  color: var(--gold);
  font-size: clamp(11px, 1.2vw, 12.5px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.event-name { padding: 0 16px; font-size: clamp(15px, 1.6vw, 17px); line-height: 1.35; }

/* ── BUTTONS ──────────────────────────────────────────────────────────── */
.btn-outline,
.btn-back {
  border: 1.5px solid var(--border-gold);
  border-radius: 999px;
  color: var(--gold-bright);
  padding: 11px 24px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn-back { padding: 9px 20px; }
.btn-outline:hover,
.btn-back:hover {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border-color: transparent;
  color: #1a1408;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(217, 180, 95, 0.6);
}

/* ── PAGINATION ───────────────────────────────────────────────────────── */
.pagination { gap: 8px; }
.page-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  font-size: 14px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.page-btn:hover { background: var(--surface-hover); border-color: var(--border-gold); color: var(--gold-bright); transform: translateY(-1px); font-weight: 400; }
.page-btn.active,
.page-btn.active:hover {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border-color: transparent;
  color: #1a1408;
  font-weight: 700;
}

/* ── NEWS ─────────────────────────────────────────────────────────────── */
.news-section { margin-top: clamp(48px, 5vw, 72px); }

.news-card {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  max-width: 860px;
  padding: clamp(14px, 1.8vw, 20px);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(217, 180, 95, 0.09), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.news-poster {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
}
.news-poster img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease);
}
.news-poster:hover img { transform: scale(1.03); }

.news-body { padding-right: clamp(4px, 1.5vw, 16px); }
.news-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.news-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  margin-bottom: 12px;
}
.news-text {
  color: var(--text-light);
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.75;
  margin-bottom: 22px;
}

/* ── PHOTO CLUSTER / GALLERIES ────────────────────────────────────────── */
.cluster-section { margin-top: clamp(48px, 5vw, 72px); }
.photo-cluster { gap: clamp(8px, 1.2vw, 14px); }
.photo-cluster img {
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), filter 0.3s;
  filter: saturate(0.95);
}
.photo-cluster img:hover {
  opacity: 1;
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lift);
  filter: saturate(1.08);
}

.about-certs,
.team-certs,
.programs-grid img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.programs-grid img { transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.programs-grid img:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.team-photo {
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px var(--border-gold);
}

/* ── INSTAGRAM ────────────────────────────────────────────────────────── */
.instagram-section { margin-top: clamp(48px, 5vw, 72px); }
.ig-card,
.instagram-media {
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ── LIGHTBOX ─────────────────────────────────────────────────────────── */
.lightbox {
  background: rgba(8, 7, 6, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lightbox.open { animation: fade-in 0.25s ease both; }
.lightbox.open .lightbox-inner { animation: zoom-in 0.35s var(--ease) both; }
.lightbox-inner img { border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); }
.lightbox-close {
  top: -48px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); transform: rotate(90deg); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* ── FOOTER ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 28px var(--pad);
  color: var(--text-gray);
  letter-spacing: 0.02em;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  width: min(240px, 50%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── ENTRANCE ANIMATION ───────────────────────────────────────────────── */
.hero-info, .hero-logo, main.content-section > * {
  animation: rise 0.8s var(--ease) both;
}
.hero-logo { animation: rise 0.9s 0.1s var(--ease) both; }
.hero-logo img { animation-delay: 1s; }
main.content-section > *:nth-child(2) { animation-delay: 0.08s; }
main.content-section > *:nth-child(3) { animation-delay: 0.16s; }
main.content-section > *:nth-child(4) { animation-delay: 0.24s; }
main.content-section > *:nth-child(n+5) { animation-delay: 0.32s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-info h1::after { margin-top: 14px; }
  .news-card { grid-template-columns: 1fr; }
  .news-body { padding: 0 6px 6px; }
}

@media (max-width: 480px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 7px 9px; font-size: 14.5px; }
  .team-subtitle { padding-left: 0; }
}
