
/* ===========================
   Ellenbrook Cricket Coaching
   Modern MVP Stylesheet
   =========================== */

/* CSS Variables (Theme) */
:root {
  --green: #0C8B4B;         /* primary cricket green */
  --green-dark: #066035;
  --green-600: #0f7a41;
  --bg: #f6f8f7;            /* light background */
  --surface: #ffffff;       /* card surface */
  --text: #1d2b2a;          /* body text */
  --muted: #63716f;
  --accent: #FFB700;        /* warm accent (yellow/orange) */
  --accent-2: #FF6A00;      /* orange for highlights/ball */
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
  --shadow-soft: 0 6px 16px rgba(0,0,0,0.06);
  --radius: 16px;
  --radius-sm: 12px;
}

/* Global Resets & Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; border-radius: var(--radius-sm); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e7ecea;
}
.header-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--text);
}
.brand-text { font-family: Poppins, Inter, sans-serif; font-weight: 700; }
.logo-icon svg { display: block; }

.main-nav ul {
  display: flex; gap: 18px; align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.main-nav a { padding: 10px 12px; border-radius: 10px; }
.main-nav a:hover { background: #eef5f1; }

.nav-toggle {
  display: none;
  border: none; background: transparent; cursor: pointer;
}
.nav-toggle .bar {
  display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 12px; font-weight: 600;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow-soft);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-600); }
.btn-secondary { background: #eef5f1; color: var(--green-dark); }
.btn-secondary:hover { background: #e2efe8; }
.btn-accent { background: var(--accent); color: #432407; }
.btn-accent:hover { background: #ffc528; }

/* Hero */
.hero {
  position: relative; min-height: 68vh; display: grid; align-items: center;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(12,139,75,0.25), rgba(12,139,75,0.25)),
    url('https://images.unsplash.com/photo-1543063130-58bcd4546131?q=80&w=1600&auto=format&fit=crop');
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.25) 100%);
}
.hero-content {
  padding: 70px 0;
  color: #fff;
}
.hero-title {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800; font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 10px;
}
.hero-subtitle {
  max-width: 800px; font-size: 1.1rem; margin-bottom: 24px;
}
.hero-cta .btn { margin-right: 12px; }

/* Panels & Sections */
.section { padding: 70px 0; }
.section-alt { padding: 70px 0; background: #ffffff; }
.section-header h2 {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin: 0 0 8px;
}
.section-header p { color: var(--muted); margin: 0; }
.panel {
  background: var(--surface); padding: 24px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.lead { font-size: 1.05rem; }

/* Cards */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* About grid */
.about-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 22px;
}
.card-media { display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }

/* Programs */
.programs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 22px;
}
.program-card { overflow: hidden; }
.program-media img { height: 240px; width: 100%; object-fit: cover; border-radius: 14px; }
.program-content h3 { margin-top: 12px; font-family: Poppins; }
.program-details { padding-left: 18px; color: var(--muted); }
.program-details li { margin-bottom: 6px; }
.program-actions { display: flex; gap: 10px; margin-top: 12px; }

/* Carousel */
.carousel { position: relative; overflow: hidden; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  gap: 22px; align-items: stretch;
  transition: transform .4s ease;
}
.testimonial { min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; }
.testimonial p { font-size: 1.05rem; }
.testimonial .author { color: var(--muted); }
.carousel-controls {
  position: absolute; inset: auto 0 10px 0; display: flex; justify-content: center; gap: 10px;
}
.carousel-prev, .carousel-next {
  background: #eef5f1; border: none; border-radius: 50%;
  width: 40px; height: 40px; cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.carousel-prev:hover, .carousel-next:hover { background: #e2efe8; }

/* Booking */
.booking-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 16px;
}
.form .form-row { margin-bottom: 16px; }
.form label { font-weight: 600; display: block; margin-bottom: 6px; }
.form .req { color: var(--accent-2); margin-left: 4px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #dbe5e2;
  border-radius: 12px; font: inherit; background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid #cfe6da; border-color: #cfe6da;
}
.form .error {
  border-color: #d86161; outline: 2px solid #f1d1d1;
}
.error-msg {
  display: block; color: #b24040; min-height: 18px; margin-top: 4px;
}
.form-inline {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.form-actions { display: flex; gap: 12px; margin-top: 10px; }
.form-confirmation {
  margin-top: 16px; padding: 14px; border-radius: 12px;
  background: #e6f7ee; color: #0a4b2a; box-shadow: var(--shadow-soft);
}

/* Checklist */
.checklist { padding-left: 18px; }
.checklist li { margin-bottom: 6px; }

/* Contact */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px;
}
.map-responsive {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius);
}
.map-responsive iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
  border-radius: var(--radius);
}

/* Footer */
.site-footer { background: #0f2921; color: #e6f0ed; padding-top: 28px; }
.footer-wrap {
  display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: center; gap: 20px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.footer-links a { color: #bcd3cc; margin-right: 12px; }
.footer-links a:hover { color: #fff; }
.footer-cta .btn-accent { box-shadow: none; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-top: 1px solid #173c32; margin-top: 16px;
}
.socials a { color: #bcd3cc; margin-left: 12px; }
.socials a:hover { color: #fff; }

/* Reveal on Scroll */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .booking-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-wrap { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 760px) {
  .main-nav { position: absolute; top: 64px; right: 0; background: #fff; width: 100%; border-bottom: 1px solid #e7ecea; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px; }
  .nav-toggle { display: inline-block; }
  .hero-content { padding: 60px 0; }
  .form-inline { grid-template-columns: 1fr; }
}
