/* ============================================================
   YMCA Youth Soccer — style.css
   Custom styles, animations, fonts, and overrides
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --green:   #22c55e;
  --green-dark: #16a34a;
  --blue:    #38bdf8;
  --blue-dark: #0284c7;
  --white:   #ffffff;
  --slate:   #1e293b;
  --slate-light: #334155;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --radius:  1rem;
  --shadow:  0 4px 24px rgba(30,41,59,0.12);
  --shadow-lg: 0 8px 40px rgba(30,41,59,0.18);
}

/* --- Base Reset & Smooth Scroll --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: var(--slate);
  background-color: var(--gray-100);
  line-height: 1.6;
}

/* --- Pitch Texture Background (CSS-only diagonal lines) --- */
.pitch-bg {
  background-color: #15803d;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.04) 0px,
      rgba(255,255,255,0.04) 2px,
      transparent 2px,
      transparent 18px
    );
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  color: var(--slate);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--slate);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--gray-400);
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: var(--green);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--slate);
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  color: var(--gray-400);
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--white);
  background: var(--green);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* --- Hero Section --- */
.hero {
  padding: 5rem 1.25rem 4rem;
  text-align: center;
  color: var(--white);
}

.hero h1 { color: var(--white); text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero p  { font-size: clamp(1.1rem, 2.5vw, 1.35rem); color: rgba(255,255,255,0.9); margin-top: 1rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  min-height: 44px;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0); }

.btn-green  { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); }

.btn-blue   { background: var(--blue); color: var(--slate); }
.btn-blue:hover { background: var(--blue-dark); color: var(--white); }

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

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-body { padding: 1.5rem; }

/* --- Category Badges --- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-dribbling  { background: #fef9c3; color: #854d0e; }
.badge-passing    { background: #dbeafe; color: #1e40af; }
.badge-shooting   { background: #fee2e2; color: #991b1b; }
.badge-defense    { background: #fce7f3; color: #9d174d; }
.badge-teamwork   { background: #d1fae5; color: #065f46; }
.badge-warmup     { background: #ede9fe; color: #5b21b6; }

/* --- Difficulty Rating --- */
.difficulty {
  display: flex;
  gap: 2px;
  align-items: center;
  font-size: 1rem;
}

/* --- Callout Boxes --- */
.callout {
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.callout-green {
  background: #dcfce7;
  border-left: 4px solid var(--green);
}

.callout-blue {
  background: #e0f2fe;
  border-left: 4px solid var(--blue);
}

.callout-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.callout-green .callout-title { color: var(--green-dark); }
.callout-blue  .callout-title { color: var(--blue-dark); }

/* --- Accordion --- */
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.accordion-panel.open {
  max-height: 1200px;
}

.accordion-inner {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
}

/* --- Filter Pills --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-pill {
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--slate-light);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.filter-pill:hover { border-color: var(--green); color: var(--green-dark); }
.filter-pill.active { background: var(--green); color: var(--white); border-color: var(--green); }

/* --- Category Tabs --- */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--gray-200);
  padding-bottom: 0.75rem;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem 0.5rem 0 0;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  min-height: 44px;
}

.tab-btn:hover { color: var(--slate); background: var(--gray-200); }
.tab-btn.active { color: var(--green-dark); background: #dcfce7; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--green) 0%, #16a34a 100%);
  color: var(--white);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-radius: var(--radius);
  margin: 3rem 0 0;
}

.cta-banner h2 { color: var(--white); font-size: 1.5rem; margin-bottom: 0.5rem; }
.cta-banner p  { color: rgba(255,255,255,0.9); margin-bottom: 1.25rem; }

/* --- Page Header --- */
.page-header {
  background: var(--slate);
  color: var(--white);
  padding: 3rem 1.25rem 2.5rem;
  text-align: center;
}

.page-header h1 { color: var(--white); }
.page-header p  { color: var(--gray-400); margin-top: 0.5rem; font-size: 1.1rem; }

/* --- Grid Layouts --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.drill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-3, .drill-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-3, .grid-2, .drill-grid { grid-template-columns: 1fr; }
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 3.5rem 0; }

/* --- Footer --- */
.site-footer {
  background: var(--slate);
  color: var(--gray-400);
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a { color: var(--blue); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* --- Quick Access Cards (Home) --- */
.quick-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--slate);
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.quick-card .icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

.quick-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.quick-card p  { color: var(--slate-light); font-size: 0.95rem; }

/* --- Featured Drill Card (Home) --- */
.featured-drill {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 768px) {
  .featured-drill { grid-template-columns: 1fr; }
}

.featured-drill-img {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.05) 0px,
      rgba(255,255,255,0.05) 2px,
      transparent 2px,
      transparent 18px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  min-height: 220px;
}

.featured-drill-body { padding: 2rem; }

/* --- Tip Cards --- */
.tip-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.tip-card .tip-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.tip-card h3 { margin-bottom: 0.5rem; }
.tip-card p  { color: var(--slate-light); font-size: 0.97rem; }

/* Parent note toggle */
.parent-toggle {
  background: none;
  border: none;
  color: var(--blue-dark);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  margin-top: 0.5rem;
}

.parent-note-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.parent-note-panel.open { max-height: 200px; }

/* --- Week Page --- */
.week-theme {
  background: linear-gradient(135deg, var(--slate) 0%, #0f172a 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.week-theme h2 { color: var(--white); font-size: 2rem; }
.week-theme p  { color: rgba(255,255,255,0.85); margin-top: 0.75rem; font-size: 1.05rem; }

.coach-message {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-radius: var(--radius);
  padding: 2rem;
  border-left: 5px solid var(--green);
}

.coach-message h3 { color: var(--green-dark); margin-bottom: 0.75rem; }

.parent-prep {
  background: #e0f2fe;
  border-radius: var(--radius);
  padding: 2rem;
  border-left: 5px solid var(--blue);
}

.parent-prep h3 { color: var(--blue-dark); margin-bottom: 0.75rem; }

/* --- Instruction List --- */
.instruction-list {
  list-style: none;
  counter-reset: steps;
  padding: 0;
}

.instruction-list li {
  counter-increment: steps;
  display: flex;
  gap: 0.85rem;
  padding: 0.6rem 0;
  font-size: 0.97rem;
  align-items: flex-start;
}

.instruction-list li::before {
  content: counter(steps);
  background: var(--green);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Equipment List --- */
.equipment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
  margin-bottom: 1rem;
}

.equipment-list li {
  background: var(--gray-200);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-light);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.5s ease both; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Misc Utilities --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Duration badge */
.duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--slate-light);
  font-weight: 600;
}

/* Section label */
.section-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}
