/* ------------------------------------------------------------------
   style.css  –  Diseño Neomórfico con Texturas Hiperrealistas
   ------------------------------------------------------------------ */

/* =========================
   VARIABLES Y PALETA GLOBAL
   ========================= */
:root {
    /* Split-Complementary Palette */
    --clr-primary: #00b4d8;           /* Cian vibrante */
    --clr-primary-dark: #0090ad;
    --clr-accent: #ff6b35;            /* Naranja cálido */
    --clr-accent-dark: #d95629;
    --clr-secondary: #9b5de5;         /* Púrpura intenso */
    --clr-secondary-dark: #7b46b5;

    /* Neutrales */
    --clr-bg: #e6ecf3;
    --clr-surface: #edf1f7;
    --clr-shadow-light: rgba(255, 255, 255, 0.7);
    --clr-shadow-dark: rgba(0, 0, 0, 0.15);

    /* Texto */
    --clr-text: #222222;
    --clr-text-light: #ffffff;

    /* Gradientes */
    --gradient-hero:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55));

    /* Tipografía */
    --ff-heading: 'Manrope', sans-serif;
    --ff-body: 'Rubik', sans-serif;

    /* Radios, sombras y transiciones */
    --radius: 12px;
    --shadow-neomorph: 9px 9px 18px var(--clr-shadow-dark),
                       -9px -9px 18px var(--clr-shadow-light);
    --transition-fast: 0.25s cubic-bezier(.55,.1,.15,.9);       /* movimiento no lineal */
    --transition-slow: 0.75s cubic-bezier(.25,.8,.25,1);

    /* Z-index */
    --z-fixed: 1000;
}

/* =========================
   RESET Y FUNDAMENTOS
   ========================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    background: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--ff-body);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--clr-primary-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover,
a:focus {
    color: var(--clr-secondary);
}

/* =========================
   UTILIDADES
   ========================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin-inline: auto;
}

.is-two-thirds {
    width: 100%;
}

.text-center { text-align: center; }
.light { color: var(--clr-text-light); }
.mt-2 { margin-top: 2rem; }

/* =========================
   NAVEGACIÓN Y HEADER
   ========================= */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--clr-surface);
    box-shadow: var(--shadow-neomorph);
    z-index: var(--z-fixed);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
}
.navbar .brand {
    font-family: var(--ff-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--clr-primary);
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
.nav-menu li a {
    font-weight: 500;
}
.burger {
    display: none;
    flex-direction: column;
    gap: .25rem;
    background: none;
    border: none;
    cursor: pointer;
}
.burger span {
    width: 24px;
    height: 3px;
    background: var(--clr-primary);
    transition: transform var(--transition-fast);
}

/* ============ HERO ============ */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 0 4rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    color: var(--clr-text-light);
}
.hero-title {
    font-family: var(--ff-heading);
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin: 0 0 1rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,.6);
}
.hero-subtitle {
    max-width: 800px;
    margin-inline: auto;
    font-size: 1.2rem;
    font-weight: 300;
}

/* ============ BOTONES ============ */
.btn,
button,
input[type='submit'] {
    display: inline-block;
    font-family: var(--ff-heading);
    font-weight: 600;
    padding: .75rem 1.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    transition: transform var(--transition-fast),
                box-shadow var(--transition-fast),
                background var(--transition-fast);
}
.btn.primary {
    background: var(--clr-primary);
    color: var(--clr-text-light);
    box-shadow: var(--shadow-neomorph);
}
.btn.primary:hover,
.btn.primary:focus {
    background: var(--clr-primary-dark);
    transform: translateY(-3px);
}
.btn.secondary {
    background: var(--clr-accent);
    color: var(--clr-text-light);
    box-shadow: var(--shadow-neomorph);
}
.btn.secondary:hover,
.btn.secondary:focus {
    background: var(--clr-accent-dark);
    transform: translateY(-3px);
}

/* ============ SECCIONES GENERALES ============ */
section {
    padding: 4rem 0;
}
.section-title {
    font-family: var(--ff-heading);
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--clr-text);
}
.section-title.light { color: var(--clr-text-light); }
.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* ============ CARD GENÉRICA ============ */
.card,
.item,
.testimonial,
.team-member,
.product-card {
    background: var(--clr-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-neomorph);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-fast),
                box-shadow var(--transition-fast);
}
.card:hover {
    transform: translateY(-4px);
}
.card-image,
.image-container {
    width: 100%;
    height: 240px;               /* altura fija */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}
.card-image img,
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 auto;
}

/* ============ PROCESO – GRID ============ */
.process-steps {
    display: grid;
    gap: 2rem;
}
@media (min-width: 768px) {
    .process-steps {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* ============ INSTRUCTORES ============ */
.instructors-grid {
    display: grid;
    gap: 2rem;
}
@media (min-width: 768px) {
    .instructors-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* ============ MODALES ============ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}
.modal.active {
    opacity: 1;
    pointer-events: all;
}
.modal-content {
    background: var(--clr-surface);
    border-radius: var(--radius);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-neomorph);
}
.close-modal {
    position: absolute;
    top: .5rem;
    right: .75rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--clr-accent);
}

/* ============ ACCOLADES ============ */
.accolades-section {
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--clr-text-light);
}
.accolades-list {
    list-style: none;
    padding: 0;
    margin: 2rem auto 0;
    max-width: 600px;
}
.accolades-list li {
    margin: .5rem 0;
}

/* ============ PRICING ============ */
.pricing-cards {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}
@media (min-width: 720px) {
    .pricing-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}
.pricing-cards .price {
    font-size: 2rem;
    font-weight: 700;
    margin: .5rem 0 1rem;
}
.pricing-cards .destacado {
    transform: scale(1.05);
}

/* ============ FAQ (ACORDEÓN) ============ */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}
.accordion-item {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    background: var(--clr-surface);
    box-shadow: var(--shadow-neomorph);
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-family: var(--ff-heading);
    cursor: pointer;
    position: relative;
}
.accordion-header::after {
    content: '+';
    position: absolute;
    right: 1.25rem;
    transition: transform var(--transition-fast);
}
.accordion-item.active .accordion-header::after {
    transform: rotate(45deg);
}
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    padding: 0 1.25rem;
}
.accordion-item.active .accordion-body {
    padding: 1rem 1.25rem;
    max-height: 300px; /* suficiente para contenido medio */
}

/* ============ FORMULARIO DE CONTACTO ============ */
.contact-form {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}
.form-group {
    display: flex;
    flex-direction: column;
}
label {
    margin-bottom: .25rem;
    font-weight: 500;
    font-family: var(--ff-heading);
}
input,
textarea {
    padding: .75rem 1rem;
    border: none;
    border-radius: var(--radius);
    background: var(--clr-surface);
    box-shadow: inset var(--shadow-neomorph);
    resize: vertical;
}
input:focus,
textarea:focus {
    outline: 2px solid var(--clr-primary);
}

/* ============ FOOTER ============ */
.main-footer {
    background: var(--clr-surface);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    box-shadow: inset var(--shadow-neomorph);
    text-align: center;
}
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}
.social-links a {
    font-weight: 600;
    color: var(--clr-primary-dark);
}
.social-links a:hover { color: var(--clr-secondary); }

/* ============ SUCESS PAGE ============ */
.success-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* ============ PÁGINAS PRIVACY / TERMS ============ */
.legal-page {
    padding-top: 100px;
}

/* ============ ENLACES “Leer más” ============ */
.read-more {
    display: inline-block;
    margin-top: .75rem;
    color: var(--clr-secondary);
    font-weight: 600;
    position: relative;
}
.read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--clr-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-fast);
}
.read-more:hover::after { transform: scaleX(1); }

/* ============ PARALLAX UTILITY ============ */
.parallax {
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

/* ============ ANIMACIONES KEYFRAMES ============ */
@keyframes floating {
    0%   { transform: translateY(0);   }
    50%  { transform: translateY(-8px);}
    100% { transform: translateY(0);   }
}
.floating {
    animation: floating 6s cubic-bezier(.6,.05,.3,.95) infinite;
}

/* ============ RESPONSIVE NAV (Burger) ============ */
@media (max-width: 768px) {
    .burger { display: flex; }
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--clr-surface);
        width: 260px;
        height: calc(100vh - 70px);
        padding: 2rem 1rem;
        transition: right var(--transition-slow);
        box-shadow: var(--shadow-neomorph);
    }
    .nav-menu.open { right: 0; }
}

/* ============ TRANSICIONES DE PÁGINA (Barba.js helpers) ============ */
[data-barba="container"] {
    opacity: 1;
    transition: opacity var(--transition-slow);
}
[data-barba="container"].is-leaving { opacity: 0; }