/* -----------------
   RESET BÁSICO
----------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Poppins", sans-serif;
    color: #212121;
    background-color: #F2F2F2;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}


/* -----------------
   VARIABLES
----------------- */
:root {
    /* Verde institucional tipo UAM Iztapalapa */
    --vino: #57A519;        /* color principal ahora es verde */
    --vino-dark: #4A9214;   /* verde más oscuro para hover */

    --gris-oscuro: #212121;
    --gris-claro: #F2F2F2;
    --blanco: #FFFFFF;
    --borde: #e0e0e0;
    --verde-ok: #4CAF50;
    --rojo-error: #D32F2F;
    --shadow-card: 0 20px 40px rgba(0,0,0,0.06);
    --shadow-soft: 0 10px 24px rgba(0,0,0,0.04);
}

/* -----------------
   LAYOUT HELPERS
----------------- */
.container {
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}
.section {
    padding: 4rem 0;
}
.section-head {
    margin-bottom: 2rem;
    max-width: 800px;
}
.section-title {
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gris-oscuro);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.section-intro {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

/* -----------------
   HEADER
----------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    background-color: rgba(255,255,255,0.8);
    border-bottom: 1px solid var(--borde);
}
.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.brand-logo {
    background-color: var(--vino);
    color: var(--blanco);
    font-family: "Poppins", system-ui, sans-serif;
    font-weight: 600;
    font-size: .9rem;
    border-radius: .75rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-soft);
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    max-width: 220px;
}
.brand-name {
    font-family: "Poppins", system-ui, sans-serif;
    font-size: .9rem;
    font-weight: 600;
    color: var(--gris-oscuro);
}
.brand-tagline {
    font-size: .7rem;
    color: #666;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    font-size: .9rem;
}
.main-nav a {
    color: #444;
    text-decoration: none;
    font-weight: 500;
}
.main-nav a:hover {
    color: var(--vino);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-cta-header {
    background-color: var(--vino);
    color: var(--blanco);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
    padding: .6rem 1rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s;
    box-shadow: var(--shadow-soft);
}
.btn-cta-header:hover {
    background-color: var(--vino-dark);
}

/* BOTÓN HAMBURGUESA — SIEMPRE 3 LÍNEAS */
.burger {
    position: relative;
    width: 32px;
    height: 24px;
    display: none; /* visible en mobile vía media query */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 3000;
}
.burger span {
    position: absolute;
    left: 0;
    width: 32px;
    height: 3px;
    border-radius: 3px;
    background-color: #212121;
    transition: background-color 0.2s ease;
}
/* línea 1 arriba */
.burger span:nth-child(1) {
    transform: translateY(-8px);
}
/* línea 2 centro */
.burger span:nth-child(2) {
    transform: translateY(0);
}
/* línea 3 abajo */
.burger span:nth-child(3) {
    transform: translateY(8px);
}
/* hover sutil */
.burger:hover span {
    background-color: var(--vino);
}

/* -----------------
   HERO
----------------- */
.hero {
    background-color: var(--blanco);
    padding-top: 5rem;
    padding-bottom: 4rem;
}
.hero-grid {
    display: grid;
    gap: 2rem;
}
@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        min-height: 70vh;
    }
}
.hero-title {
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--gris-oscuro);
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--vino);
    margin-top: .75rem;
    font-family: "Poppins", system-ui, sans-serif;
}
.hero-desc {
    margin-top: 1rem;
    color: #444;
    font-size: 1rem;
    max-width: 45ch;
    line-height: 1.5;
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

/* Botones reutilizables */
.btn-primary {
    background-color: var(--vino);
    color: var(--blanco);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 500;
    padding: .8rem 1.2rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 190px;
    transition: background-color .15s, box-shadow .15s;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
    background-color: var(--vino-dark);
    box-shadow: var(--shadow-card);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--vino);
    color: var(--vino);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 500;
    padding: .7rem 1.2rem;
    text-decoration: none;
    min-width: 190px;
    text-align: center;
    transition: all .15s;
    box-shadow: var(--shadow-soft);
}
.btn-outline:hover {
    background-color: var(--vino);
    color: var(--blanco);
}

/* Hero visual / carrusel simulado */
.hero-carousel {
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow-card);
}
.hero-slide {
    border-radius: 0.75rem;
    background-color: #fafafa;
    border: 1px solid #eee;
    padding: 1rem;
    margin-bottom: 1rem;
}
.hero-avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background-color: #ddd;
    margin-bottom: .75rem;
}
.hero-avatar-rect {
    width: 100%;
    height: 56px;
    border-radius: .75rem;
    background-color: #ddd;
    margin-bottom: .75rem;
}
.math-bg {
    background: linear-gradient(135deg,#212121 0%,#4e4e4e 100%);
    color: #fff;
}
.lit-bg {
    background: linear-gradient(135deg, #57A519 0%, #2E4F12 100%);
    color: #fff;
}
.hero-lines .line {
    background-color: #eee;
    border-radius: .5rem;
    margin-bottom: .5rem;
}
.line-lg { width: 80%; height: 10px; }
.line-md { width: 60%; height: 8px; }
.line-sm { width: 40%; height: 6px; }

.hero-badge {
    margin-top: 1rem;
    display: inline-block;
    background-color: var(--vino);
    color: var(--blanco);
    font-size: .7rem;
    font-weight: 500;
    border-radius: .5rem;
    padding: .4rem .6rem;
    box-shadow: var(--shadow-soft);
}
.hero-badge.alt {
    background-color: #212121;
}
.hero-badge.alt2 {
    background-color: #2E4F12;
}
.hero-carousel-footnote {
    color: #777;
    font-size: .7rem;
    text-align: center;
    margin-top: .5rem;
}

/* -----------------
   ALT BLOCK (DIFERENCIAL)
----------------- */
.alt-block {
    background-color: var(--vino);
    color: var(--blanco);
}
.alt-inner {
    display: grid;
    gap: 2rem;
}
@media (min-width: 800px) {
    .alt-inner {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}
.alt-title {
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--blanco);
}
.alt-desc {
    font-size: .95rem;
    line-height: 1.5;
    color: rgba(255,255,255,.9);
    margin-top: .75rem;
    max-width: 50ch;
}
.alt-benefits {
    list-style: none;
    display: grid;
    gap: .75rem;
    font-size: .9rem;
    line-height: 1.4;
    color: var(--blanco);
}
@media (min-width: 500px) {
    .alt-benefits {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}
@media (min-width: 1000px) {
    .alt-benefits {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

/* -----------------
   CLASES / OFERTA
----------------- */
.classes {
    background-color: var(--blanco);
}
.class-grid {
    display: grid;
    gap: 1.5rem;
}
@media (min-width: 700px) {
    .class-grid {
        grid-template-columns: repeat(2,1fr);
    }
}
.class-card {
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}
.class-icon {
    font-size: 1.4rem;
    line-height: 1;
    background-color: var(--gris-claro);
    border-radius: .75rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin-bottom: .75rem;
    font-family: "Poppins", system-ui, sans-serif;
}
.class-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gris-oscuro);
    margin-bottom: .75rem;
    font-family: "Poppins", system-ui, sans-serif;
}
.class-list {
    font-size: .9rem;
    color: #444;
    line-height: 1.4;
    list-style: disc;
    padding-left: 1.2rem;
}
.class-list li + li {
    margin-top: .4rem;
}

.notes-block {
    background-color: var(--gris-claro);
    border: 1px solid var(--borde);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-soft);
}
.note-line {
    font-size: .8rem;
    color: #444;
    line-height: 1.4;
}
.note-line + .note-line {
    margin-top: .5rem;
}

.classes-cta-wrapper {
    text-align: center;
    margin-top: 2rem;
}
.big-btn {
    min-width: 260px;
    font-size: .9rem;
}

/* -----------------
   MISIÓN / VISIÓN
----------------- */
.missionvision {
    background-color: var(--gris-claro);
}
.mission-grid {
    display: grid;
    gap: 1.5rem;
}
@media (min-width: 800px) {
    .mission-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.mission-card,
.vision-card {
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}
.mv-title {
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gris-oscuro);
    margin-bottom: .5rem;
}
.mv-body {
    font-size: .9rem;
    color: #444;
    line-height: 1.5;
}

/* -----------------
   NOSOTROS
----------------- */
.about {
    background-color: var(--gris-claro);
}
.profile-grid {
    display: grid;
    gap: 1.5rem;
}
@media (min-width: 600px) {
    .profile-grid {
        grid-template-columns: repeat(2,1fr);
    }
}
.profile-card {
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* Base para ambos avatares */
.profile-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: .75rem;

    /* estilito tarjeta */
    background-color: #fff;
    border: 1px solid var(--borde);
    box-shadow: var(--shadow-soft);

    /* aseguramos que la imagen cubra */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Avatar Jorge (Matemáticas) */
.avatar-math {
    background-image: url('img/logaritmo.png');
}

/* Avatar Ana (Lengua y Literatura) */
.avatar-lit {
    background-image: url('img/libros.png');
}


.profile-info {
    display: flex;
    flex-direction: column;
}
.profile-name {
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gris-oscuro);
    line-height: 1.3;
}
.profile-text {
    font-size: .9rem;
    color: #444;
    line-height: 1.4;
    margin-top: .5rem;
}

/* -----------------
   CONTACTO
----------------- */
.contact {
    background-color: var(--blanco);
}
.contact-grid {
    display: grid;
    gap: 2rem;
}
@media (min-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Formulario */
.contact-form {
    background-color: var(--gris-claro);
    border: 1px solid var(--borde);
    border-radius: 1rem;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
}
.contact-form label {
    display: grid;
    gap: .5rem;
    font-size: .8rem;
    color: #444;
    font-weight: 500;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border-radius: .6rem;
    border: 1px solid var(--borde);
    background-color: var(--blanco);
    font-size: .9rem;
    padding: .7rem .8rem;
    color: var(--gris-oscuro);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--vino);
    border-color: var(--vino);
}
.checkline {
    display: flex;
    align-items: flex-start;
    font-size: .8rem;
    gap: .5rem;
    color: #444;
    font-weight: 400;
}
.checkline input[type="checkbox"] {
    transform: translateY(3px);
}
.form-hint {
    font-size: .75rem;
    line-height: 1.4;
    display: none;
}
.form-hint.ok {
    color: var(--verde-ok);
}
.form-hint.error {
    color: var(--rojo-error);
}

/* Contacto directo */
.contact-right .contact-box {
    background-color: var(--gris-claro);
    border: 1px solid var(--borde);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}
.contact-item {
    font-size: .9rem;
    color: #333;
    line-height: 1.4;
    margin-bottom: 1rem;
}
.contact-item a.whatsapp-link {
    color: var(--vino);
    font-weight: 600;
    text-decoration: none;
}
.contact-item a.whatsapp-link:hover {
    text-decoration: underline;
}
.contact-email {
    font-weight: 500;
    color: #444;
}
.contact-mini {
    font-size: .75rem;
    color: #555;
    margin-top: 1rem;
    line-height: 1.4;
    font-style: italic;
}

/* Botón flotante WhatsApp (negro, estilo badge) */
.whatsapp-float {
    position: fixed;
    left: 1rem;
    bottom: 1rem;

    width: 56px;
    height: 56px;
    border-radius: 999px;

    background-color: #000;      /* círculo negro */
    border: 2px solid #fff;      /* borde blanco */
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);

    display: grid;
    place-items: center;
    text-decoration: none;
    cursor: pointer;

    z-index: 1100;
    transition: box-shadow .15s, transform .15s;
}

.whatsapp-float:hover {
    box-shadow: 0 28px 60px rgba(0,0,0,0.6);
    transform: scale(1.06);
}

/* Ícono interno */
.whatsapp-float .wa-icon {
    width: 28px;
    height: 28px;
    display: block;
}
.whatsapp-float .wa-icon path {
    fill: #fff; /* aseguramos blanco por si algún navegador ignora inline */
}


/* -----------------
   FOOTER
----------------- */
.site-footer {
    background-color: var(--blanco);
    border-top: 1px solid var(--borde);
    color: #444;
    font-size: .8rem;
}
.footer-inner {
    padding: 2rem 0;
    display: grid;
    gap: 1rem;
}
@media (min-width: 800px) {
    .footer-inner {
        grid-template-columns: 2fr 1fr;
        align-items: center;
    }
}
.footer-brand {
    font-family: "Poppins", system-ui, sans-serif;
    font-weight: 600;
    color: var(--gris-oscuro);
    font-size: .9rem;
    margin-bottom: .5rem;
}
.footer-phrase {
    font-size: .8rem;
    line-height: 1.4;
    color: #555;
    max-width: 45ch;
}
.footer-copy {
    font-size: .75rem;
    color: #777;
    text-align: left;
}

/* -----------------
   MENÚ MÓVIL
----------------- */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 280px;
    height: 100vh;
    background-color: var(--blanco);
    box-shadow: -20px 0 40px rgba(0,0,0,0.2);
    border-left: 1px solid var(--borde);

    display: flex;
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 1rem;

    /* estado inicial: oculto a la derecha */
    transform: translateX(100%);
    transition: transform .2s ease-out;
    z-index: 2000;
}
.mobile-nav.open {
    transform: translateX(0);
}
.mobile-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gris-oscuro);
    text-decoration: none;
    padding: .75rem 0;
    border-bottom: 1px solid var(--borde);
}
.mobile-cta {
    margin-top: 1rem;
    background-color: var(--vino);
    color: var(--blanco);
    text-align: center;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    padding: .9rem 1rem;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    border: none;
}

/* -----------------
   RESPONSIVE BREAKPOINTS
----------------- */
@media (max-width: 900px) {
    .main-nav {
        display: none;
    }
    .btn-cta-header {
        display: none;
    }
    .burger {
        display: flex;
    }
}
@media (min-width: 901px) {
    .mobile-nav {
        display: none;
    }
}

/* -----------------
   BODY LOCK
----------------- */
.no-scroll {
    overflow: hidden;
}

/* -----------------
   CARRUSEL HERO
----------------- */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--borde);
  background-color: var(--blanco);
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  user-select: none;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

/* Botones */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(87,165,25,0.8); /* verde institucional translúcido */
  border: none;
  color: white;
  font-size: 1.8rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.2s;
  z-index: 10;
}

.carousel-btn:hover {
  background-color: var(--vino-dark);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 5;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background-color: rgba(87,165,25,0.4);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-dots .dot.active {
  background-color: var(--vino);
}

/* Adaptabilidad */
@media (max-width: 768px) {
  .carousel {
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1.4rem;
  }
}

/* -----------------
   JUSTIFICACIÓN TIPOGRÁFICA GLOBAL
   Queremos que el cuerpo de texto se vea editorial / formal,
   así que justificamos párrafos y descripciones.
   Importante: NO tocamos headings ni botones.
----------------- */

/* Párrafos generales, descripciones, textos largos de secciones */
p,
.section-intro,
.hero-desc,
.alt-desc,
.mv-body,
.profile-text,
.note-line,
.contact-item,
.contact-mini,
.footer-phrase {
    text-align: justify;
    text-justify: inter-word; /* mejora el espaciado entre palabras */
}

/* Listas de beneficios / contenidos tipo bullets */
.alt-benefits li,
.class-list li {
    text-align: justify;
    text-justify: inter-word;
}

/* Texto dentro de tarjetas de materias, avisos, etc. */
.class-list,
.notes-block,
.contact-box {
    text-align: justify;
    text-justify: inter-word;
}

/* Ajuste fino:
   No justificar headers tipo "Misión", "Visión", nombres, etc.,
   así que .section-title, .mv-title, .profile-name se quedan como están
   (no se incluyen aquí on purpose).
*/
