/* =====================================================
   TODD FAMILY COMMUNITY CENTER - Global Stylesheet
   Color-blind friendly · Accessible · Warm & Approachable
   Base font size: 18px for easy reading
   ===================================================== */

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Nunito+Sans:wght@400;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* === Brand Colors — Palette 1 "Trust & Growth" === */
  --green-primary:  #3D5A50;   /* Logo-matching dark muted green */
  --green-dark:     #3D5A50;   /* Same — navbar links, headings */
  --green-darker:   #2A3F38;   /* Deepest green — hover states */
  --green-light:    #F7FBF4;   /* Very pale green-white — base background */
  --green-medium:   #7AAB98;   /* Mid sage — borders, dividers */
  --green-hover:    #2E4840;   /* Dark hover */

  /* === Accent Color (warm orange-yellow — friendly & accessible) === */
  --blue-accent:    #FFD166;   /* Warm yellow accent */
  --blue-dark:      #E6B840;   /* Darker yellow hover */
  --blue-light:     #FFF8DC;   /* Light yellow tint */

  /* === Warm Neutrals === */
  --warm-white:     #FAFAF7;
  --cream:          #F7FBF4;
  --warm-gray-100:  #EEF2EC;
  --warm-gray-200:  #DDE6DC;
  --warm-gray-400:  #8A9E98;
  --warm-gray-600:  #596860;

  /* === Text === */
  --text-primary:   #333333;   /* Dark gray — easy on the eyes */
  --text-secondary: #3D5A50;   /* Dark green for subheadings */
  --text-muted:     #6B7D78;   /* Muted green-gray */
  --text-on-dark:   #FFFFFF;

  /* === Status Colors (color-blind safe) === */
  --status-success:     #3D5A50;
  --status-success-bg:  #EEF6F0;
  --status-warning:     #B06800;
  --status-warning-bg:  #FEF3E2;
  --status-info:        #3D5A50;
  --status-info-bg:     #F7FBF4;
  --status-error:       #8B2200;
  --status-error-bg:    #FDEAE4;

  /* === Layout === */
  --max-width:        1200px;
  --nav-height:       72px;

  /* === Border === */
  --border:           1px solid #C5D9CA;
  --border-color:     #C5D9CA;
  --radius-sm:        8px;
  --radius:           12px;
  --radius-lg:        20px;
  --radius-xl:        28px;
  --radius-full:      9999px;

  /* === Shadows === */
  --shadow-sm:  0 2px 8px  rgba(45, 90, 61, 0.08);
  --shadow-md:  0 4px 16px rgba(45, 90, 61, 0.12);
  --shadow-lg:  0 8px 32px rgba(45, 90, 61, 0.16);
  --shadow-xl:  0 16px 48px rgba(45, 90, 61, 0.20);

  /* === Typography === */
  --font-body:    'Nunito', 'Nunito Sans', sans-serif;
  --font-heading: 'Nunito', sans-serif;

  /* Sizes — larger than typical for accessibility */
  --text-xs:   0.875rem;  /* 14px */
  --text-sm:   1rem;      /* 16px */
  --text-base: 1.125rem;  /* 18px — base */
  --text-lg:   1.25rem;   /* 20px */
  --text-xl:   1.5rem;    /* 24px */
  --text-2xl:  1.875rem;  /* 30px */
  --text-3xl:  2.25rem;   /* 36px */
  --text-4xl:  3rem;      /* 48px */
  --text-5xl:  3.75rem;   /* 60px */

  /* === Spacing === */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* === Transitions === */
  --transition: 0.2s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px; /* Base = 18px for readability */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--warm-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== ACCESSIBILITY ===== */
/* Skip navigation */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--green-dark);
  color: white;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: var(--text-base);
  text-decoration: none;
  z-index: 9999;
  transition: top var(--transition);
}
.skip-nav:focus {
  top: var(--space-4);
}

/* Focus styles — always visible */
:focus-visible {
  outline: 3px solid var(--blue-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--green-darker);
  line-height: 1.3;
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
  max-width: 70ch;
}

a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--blue-accent); }

strong { font-weight: 700; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-title {
  font-size: var(--text-3xl);
  color: var(--green-darker);
  margin-bottom: var(--space-4);
  text-align: center;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--space-12);
}

/* ===== NAVIGATION ===== */
.navbar {
  background: var(--green-light);   /* #F7FBF4 — pale green-white, logo reads clearly */
  border-bottom: 3px solid var(--green-medium);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(61, 90, 80, 0.10);
  overflow: visible;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--space-6);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
}

.navbar-logo img {
  height: 52px;
  width: auto;
  /* No filter — cream background keeps original logo colors intact */
}

.navbar-logo-text {
  /* Hidden everywhere — logo image alone is sufficient */
  display: none !important;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  flex-shrink: 1;
}

.navbar-links a {
  color: var(--green-dark);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.navbar-links a:hover,
.navbar-links a.active {
  background: rgba(61, 90, 80, 0.10);
  color: var(--green-darker);
}

.navbar-links .btn-nav-login {
  background: rgba(61, 90, 80, 0.08);
  border: 2px solid rgba(61, 90, 80, 0.35);
}

.navbar-links .btn-nav-register {
  background: var(--blue-accent);   /* #FFD166 yellow */
  color: var(--green-darker);
  border: 2px solid var(--blue-dark);
}
.navbar-links .btn-nav-register:hover {
  background: var(--blue-dark);
  color: var(--green-darker);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--green-dark);
  border-radius: var(--radius-full);
  transition: transform var(--transition), opacity var(--transition);
}

@media (max-width: 1450px) {
  .nav-toggle { display: flex; }

  .navbar-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--green-light);
    border-top: 3px solid var(--green-medium);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4) var(--space-6);
    gap: var(--space-3);
    box-shadow: 0 8px 24px rgba(61, 90, 80, 0.15);
    z-index: 999;
  }

  .navbar-links.open { display: flex; }

  .navbar-links a {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    color: var(--green-primary);
    display: block;
  }

  .navbar-links .btn-nav-login,
  .navbar-links .btn-nav-register {
    text-align: center;
    margin-top: var(--space-2); /* ボタンの上に少し余白を置いて区切る */
    border-radius: var(--radius-full) !important; /* 角丸を維持 */
  }
}

/* ===== HERO BANNER ===== */
.hero {
  background: linear-gradient(135deg, var(--green-darker) 0%, var(--green-dark) 60%, var(--green-primary) 100%);
  color: white;
  padding: var(--space-24) 0 var(--space-20);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto var(--space-6);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.15);
}

.hero-title {
  font-size: var(--text-4xl);
  color: white;
  margin-bottom: var(--space-4);
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.88);
  margin: 0 auto var(--space-8);
  max-width: 60ch;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hero-subtitle { white-space: normal; }
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .hero-title { font-size: var(--text-3xl); }
  .hero-subtitle { font-size: var(--text-base); }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* ===== QUICK NAV BUTTONS (home page) ===== */
.quick-nav {
  background: var(--cream);
  padding: var(--space-10) 0;
  border-bottom: 2px solid var(--border-color);
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.quick-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--green-dark);
  font-weight: 700;
  font-size: var(--text-base);
  transition: all var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.quick-nav-btn:hover {
  background: var(--green-light);
  border-color: var(--green-primary);
  color: var(--green-darker);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quick-nav-btn i {
  font-size: 2rem;
  color: var(--green-primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 52px; /* Large tap targets */
  justify-content: center;
}

.btn-primary {
  background: var(--green-dark);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--green-darker);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--green-dark);
  border: 2px solid var(--green-primary);
}
.btn-secondary:hover {
  background: var(--green-light);
  color: var(--green-darker);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--blue-accent);
  color: white;
}
.btn-accent:hover {
  background: var(--blue-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--status-error);
  color: white;
}
.btn-danger:hover {
  background: #6B1A00;
  color: white;
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
  min-height: 60px;
}

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  min-height: 40px;
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
}

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-medium);
  font-size: 4rem;
}

.card-body {
  padding: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--green-darker);
  margin-bottom: var(--space-2);
}

.card-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.card-meta i { color: var(--green-primary); }

/* ===== GRIDS ===== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green  { background: var(--status-success-bg); color: var(--status-success); }
.badge-blue   { background: var(--status-info-bg);    color: var(--status-info); }
.badge-amber  { background: var(--status-warning-bg); color: var(--status-warning); }
.badge-red    { background: var(--status-error-bg);   color: var(--status-error); }
.badge-gray   { background: var(--warm-gray-100);     color: var(--warm-gray-600); }

/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--space-6);
}

label {
  display: block;
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

label .required {
  color: var(--status-error);
  margin-left: var(--space-1);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="url"],
select,
textarea {
  display: block;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 52px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 4px rgba(91, 138, 107, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--warm-gray-400);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B8A6B' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
  -webkit-appearance: none;
}

.form-hint {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.form-error {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--status-error);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Checkbox / Radio */
.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--green-primary);
}

.checkbox-item label,
.radio-item label {
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
}

/* ===== ALERT / NOTICE ===== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius);
  border-left: 4px solid;
  margin-bottom: var(--space-6);
  font-size: var(--text-base);
}

.alert i { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }

.alert-success { background: var(--status-success-bg); border-color: var(--status-success); color: var(--status-success); }
.alert-warning  { background: var(--status-warning-bg); border-color: var(--status-warning); color: var(--status-warning); }
.alert-info     { background: var(--status-info-bg);    border-color: var(--status-info);    color: var(--status-info); }
.alert-error    { background: var(--status-error-bg);   border-color: var(--status-error);   color: var(--status-error); }

/* ===== TABLE ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

th {
  background: var(--green-light);
  color: var(--green-darker);
  font-weight: 700;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--warm-gray-100);
  color: var(--text-primary);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--warm-white); }

/* ===== PAGE HEADER ===== */
.page-header {
  background: var(--green-light);
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 2px solid var(--border-color);
  text-align: center;
}

.page-header h1 {
  font-size: var(--text-3xl);
  color: var(--green-darker);
  margin-bottom: var(--space-2);
}

.page-header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 60ch;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: var(--space-2);
  border-bottom: 2px solid var(--border-color);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.tab-btn {
  padding: var(--space-3) var(--space-6);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover { color: var(--green-dark); background: var(--green-light); }
.tab-btn.active { color: var(--green-dark); border-bottom-color: var(--green-primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--green-darker);
  margin: 0;
}

.modal-close {
  background: var(--warm-gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--warm-gray-200); }

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  background: white;
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: 600;
  min-width: 280px;
  animation: toastIn 0.3s ease;
  border-left: 4px solid;
}

.toast-success { border-color: var(--status-success); color: var(--status-success); }
.toast-error   { border-color: var(--status-error);   color: var(--status-error); }
.toast-info    { border-color: var(--status-info);    color: var(--status-info); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--green-darker);
  color: rgba(255,255,255,0.85);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-logo img {
  height: 56px;
  border-radius: 50%;
}

.footer h4 {
  color: white;
  font-size: var(--text-base);
  font-weight: 800;
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: var(--text-sm);
}

.footer p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
}

.footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  transition: color var(--transition);
}

.footer a:hover { color: white; }

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  margin: 0;
}

/* ===== PROGRAM CARDS ===== */
.program-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--space-4);
  color: var(--green-primary);
}

/* ===== STATS ROW ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-6);
  text-align: center;
}

.stat-item {
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: var(--green-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== CALENDAR ===== */
.calendar-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ===== EVENT DETAIL ===== */
.event-detail-header {
  background: var(--green-light);
  padding: var(--space-12) 0;
  border-bottom: 2px solid var(--border-color);
}

.event-meta-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.event-meta-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
}

.event-meta-list i {
  width: 24px;
  color: var(--green-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== AUTH PAGES ===== */
.auth-wrapper {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-light);
  padding: var(--space-8);
}

.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-header img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: var(--space-4);
}

/* ===== ADMIN LAYOUT ===== */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

.admin-sidebar {
  width: 260px;
  background: var(--green-darker);
  flex-shrink: 0;
  padding: var(--space-6) 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.admin-sidebar-title {
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--space-4) var(--space-6) var(--space-2);
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-sidebar a i {
  width: 22px;
  font-size: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.admin-sidebar .sidebar-badge {
  margin-left: auto;
  background: var(--status-warning);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.admin-main {
  flex: 1;
  padding: var(--space-8);
  background: var(--warm-white);
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.admin-title {
  font-size: var(--text-2xl);
  color: var(--green-darker);
  margin: 0;
}

.admin-stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.admin-stat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.admin-stat-icon.green  { background: var(--status-success-bg); color: var(--status-success); }
.admin-stat-icon.blue   { background: var(--status-info-bg);    color: var(--status-info); }
.admin-stat-icon.amber  { background: var(--status-warning-bg); color: var(--status-warning); }
.admin-stat-icon.purple { background: #F3F0FF; color: #5B4FCF; }

.admin-stat-num {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--green-darker);
  line-height: 1;
}

.admin-stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
  margin-top: var(--space-1);
}

/* Mobile admin */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    flex-wrap: wrap;
    padding: var(--space-2);
    gap: var(--space-1);
  }
  .admin-sidebar-title { display: none; }
  .admin-sidebar a {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
  }
  .admin-main { padding: var(--space-5); }
}

/* ===== SECTION BACKGROUNDS ===== */
.bg-white      { background: white; }
.bg-green-light { background: var(--green-light); }
.bg-cream      { background: var(--cream); }
.bg-green-dark { background: var(--green-dark); color: white; }

/* ===== DIVIDER ===== */
.divider {
  height: 2px;
  background: var(--border-color);
  margin: var(--space-8) 0;
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: var(--space-4); }
.gap-2 { gap: var(--space-2); }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ===== SPINNER ===== */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(91,138,107,0.2);
  border-top-color: var(--green-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 480px) {
  html { font-size: 16px; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  .section { padding: var(--space-12) 0; }
  .container { padding: 0 var(--space-4); }
}

/* ===== RECAPTCHA BADGE ===== */
/* Hide default badge — privacy notice shown inline per Google policy */
.grecaptcha-badge { visibility: hidden !important; }
