/* ===== Variables ===== */
:root {
  --purple: #8e2b8f;
  --green: #2db84d;
  --grass: #9acd32;
  --orange: #f97b4f;
  --red: #e8453c;
  --pink: #ff6b8b;
  --yellow: #ecbb44;
  --blue: #4fb3cf;
  --dark: #30303f;
  --text: #777;
  --grey: #f3f4f4;
  --wa: #25d366;
  --font-title: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-script: "Pacifico", cursive;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font-body); color: var(--text); line-height: 1.8; background: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-title); margin: 0 0 .4em; line-height: 1.2; color: var(--dark); }
p { margin: 0 0 1em; }
.container { width: min(1140px, 92%); margin-inline: auto; }
.center { text-align: center; }
.green { color: var(--green); }

.section { padding: 90px 0; }
.section--grey { background: var(--grey); }

.title { text-align: center; margin-bottom: 55px; }
.title h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--purple); letter-spacing: 1px; }
.title p { font-family: var(--font-title); font-size: 1.15rem; color: #888; letter-spacing: .5px; margin: 0; }

/* ===== Botones ===== */
.btn {
  display: inline-block; padding: 12px 30px; border: 2px solid transparent;
  font: 600 .85rem var(--font-body); letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--orange { background: var(--orange); color: #fff; }
.btn--orange:hover { background: var(--red); }
.btn--ghost { border-color: #fff; color: #fff; border-radius: 40px; }
.btn--ghost:hover { background: #fff; color: var(--dark); }
.btn--wa { background: var(--wa); color: #fff; border-radius: 40px; }
.btn--wa:hover { background: #1ebe5a; }

/* ===== Franja tricolor ===== */
.flagbar { display: flex; height: 6px; }
.flagbar span { flex: 1; }
.flagbar span:nth-child(1) { background: #009246; }
.flagbar span:nth-child(2) { background: #fff; box-shadow: inset 0 0 0 1px #eee; }
.flagbar span:nth-child(3) { background: #ce2b37; }

/* ===== Encabezado ===== */
.header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-title); font-weight: 700; font-size: 1.5rem; color: var(--dark); line-height: 1; }
.brand img { border-radius: 50%; }
.brand small { display: block; font-size: .95rem; font-weight: 500; color: var(--blue); margin-top: 3px; }
.nav { display: flex; gap: 28px; }
.nav a { position: relative; padding: 8px 0; font-family: var(--font-title); font-weight: 600; font-size: 1.05rem; letter-spacing: 1px; color: var(--dark); transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--red); }
.menu-toggle, .menu-btn { display: none; }

/* ===== Portada ===== */
.hero { position: relative; min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 66, 40, .78); }
.hero__content { position: relative; z-index: 2; padding: 80px 20px 120px; max-width: 800px; }
.script { font-family: var(--font-script); font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 6px; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 7vw, 4.6rem); letter-spacing: 2px; margin-bottom: 14px; }
.hero__sub { font-size: 1.05rem; opacity: .95; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 70px; z-index: 2; }

/* ===== Bienvenida ===== */
.overview { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; max-width: 1140px; margin: 0 auto; }
.overview h3 { font-size: 2.3rem; }
.overview__img { margin: 0; }
.overview__img img { width: 100%; height: 360px; object-fit: cover; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }

/* Pasto */
.grass {
  height: 46px;
  background:
    linear-gradient(135deg, var(--grass) 25%, transparent 25%) -23px 0,
    linear-gradient(225deg, var(--grass) 25%, transparent 25%) -23px 0;
  background-size: 46px 46px;
  background-color: transparent;
  border-bottom: 10px solid var(--grass);
}

/* ===== Instalaciones ===== */
.facilities { display: grid; grid-template-columns: repeat(3, 1fr); }
.fac { position: relative; overflow: hidden; padding: 40px 34px 70px; min-height: 250px; text-align: center; color: #fff; }
.fac h3 { color: #fff; font-size: 1.6rem; letter-spacing: 1px; }
.fac p { margin: 0; font-size: .95rem; position: relative; z-index: 1; }
.fac__icon { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: 5.5rem; opacity: .22; filter: grayscale(1) brightness(2); }
.fac--green { background: #41c075; }
.fac--pink { background: var(--pink); }
.fac--yellow { background: var(--yellow); }
.fac--dark { background: var(--dark); }
.fac--blue { background: var(--blue); }
.fac--orange { background: #ee7b4c; }

/* ===== Talleres ===== */
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 30px; }
.course { text-align: center; padding: 14px 14px 26px; border-radius: 40px 40px 60px 60px; background: linear-gradient(180deg, #3fa9ff, #1ad8ff); color: #fff; transition: transform .25s; }
.course:hover { transform: translateY(-8px); }
.course__img { height: 230px; border-radius: 55% 45% 50% 50% / 45% 50% 50% 55%; overflow: hidden; background: #fff; }
.course__img img { width: 100%; height: 100%; object-fit: cover; }
.course__img--emoji { display: grid; place-items: center; font-size: 6rem; background: linear-gradient(135deg, #ffe0f0, #fff2c9); }
.course h3 { color: #fff; margin: 18px 0 0; font-size: 1.5rem; letter-spacing: 1px; }
.course p { margin: 0; font-size: .9rem; }

/* ===== Niveles ===== */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.level { position: relative; padding: 46px 20px 40px; text-align: center; color: #fff; border-radius: 30px 30px 80px 30px; transition: transform .25s; }
.level:hover { transform: translateY(-8px) rotate(-1deg); }
.level h3 { color: #fff; font-size: 1.7rem; margin: 0; }
.level__age { display: inline-block; margin-bottom: 8px; padding: 2px 18px; border-radius: 30px; background: rgba(255, 255, 255, .25); font-weight: 600; font-size: .85rem; letter-spacing: 1px; }
.level--1 { background: var(--green); }
.level--2 { background: var(--pink); }
.level--3 { background: var(--yellow); }
.level--4 { background: var(--blue); }

/* ===== Novedades (posts) ===== */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; }
.post { background: #fff; border: 1px solid #eee; transition: box-shadow .25s; }
.post:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .1); }
.post img { width: 100%; height: 260px; object-fit: cover; }
.post__body { padding: 22px 22px 8px; }
.post h3 { font-size: 1.4rem; }
.post p { font-size: .92rem; }
.post footer { padding: 12px; text-align: center; font-size: .82rem; border-top: 1px solid #eee; }

/* ===== Contacto ===== */
.contact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 20px; }
.contact__item { display: flex; gap: 14px; align-items: flex-start; }
.contact__icon { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border: 2px solid; border-radius: 50%; font-size: 1.5rem; }
.c1 .contact__icon { border-color: var(--orange); }
.c2 .contact__icon { border-color: var(--blue); }
.c3 .contact__icon { border-color: var(--yellow); }
.c4 .contact__icon { border-color: var(--green); }
.contact h4 { font-size: 1.1rem; letter-spacing: 1px; margin-bottom: 4px; }
.contact p { margin: 0; font-size: .92rem; line-height: 1.7; }
.contact a:hover { color: var(--red); }
.map { margin-top: 40px; height: 400px; background: var(--grey); }
.map iframe { width: 100%; height: 100%; border: 0; }
.map__link { margin: 30px 0 0; }

/* ===== Pie de página ===== */
.footer { background: var(--dark); color: #b9b9c6; padding-top: 70px; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; }
.footer h4 { color: var(--yellow); font-size: 1.4rem; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 3px solid var(--yellow); display: inline-block; }
.brand--footer { color: #fff; margin-bottom: 16px; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }
.footer__photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-width: 280px; }
.footer__photos img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity .2s; }
.footer__photos a:hover img { opacity: .75; }
.footer__phone { margin-top: 14px; }
.footer__bottom { margin-top: 60px; padding: 22px 15px; text-align: center; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--wa); border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  animation: pulse 2.4s infinite;
}
.wa-float:hover { transform: scale(1.08); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55), 0 6px 18px rgba(0, 0, 0, .25); }
  70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0), 0 6px 18px rgba(0, 0, 0, .25); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 6px 18px rgba(0, 0, 0, .25); }
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .nav { gap: 18px; }
  .facilities { grid-template-columns: repeat(2, 1fr); }
  .courses, .posts { grid-template-columns: repeat(2, 1fr); }
  .levels { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .menu-btn { display: block; width: 44px; height: 44px; position: relative; cursor: pointer; }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 10px; width: 24px; height: 3px; background: var(--dark); border-radius: 3px; }
  .menu-btn span { top: 20px; }
  .menu-btn span::before { left: 0; top: -8px; }
  .menu-btn span::after { left: 0; top: 8px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; padding: 8px 4%; box-shadow: 0 10px 20px rgba(0, 0, 0, .1); }
  .nav a { padding: 12px 0; border-bottom: 1px solid #eee; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .overview { grid-template-columns: 1fr; }
  .hero__bg { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .facilities, .courses, .posts, .levels, .contact, .footer__grid { grid-template-columns: 1fr; }
  .hero { min-height: 520px; }
  .hero__bg { grid-template-columns: 1fr; }
  .hero__bg img:not(:first-child) { display: none; }
  .wa-float { right: 16px; bottom: 16px; }
}
