/* =========================================
   FUENTES PERSONALIZADAS
========================================= */
/* Fuente secundaria decorativa (H1 principal / Pilates) */
@font-face {
    font-family: 'fuente-pilates';
    src: url('fonts/OrangeAvenueDEMO-Regular.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* Fuente caligráfica especial para el logotipo / destacar 'Manquehue' */
@font-face {
    font-family: 'PlaylistScript';
    src: url('fonts/playlist script.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* Fuente principal para todo el resto del sitio */
@font-face {
    font-family: 'DMSans';
    src: url('fonts/dmsans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* =========================================
   VARIABLES DE COLOR DE LA MARCA
========================================= */
:root {
    --color-primary: #035f59;
    --color-text-gray: #7d7e81;
    --color-white: #ffffff;
    --color-dark: #363b3b;
    --color-accent: #ffbf00;
    --color-zfitness: #3f3771;
}

/* =========================================
   RESET BÁSICO Y TIPOGRAFÍA GLOBAL
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DMSans', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--color-white);
    color: var(--color-dark);
    line-height: 1.6;
    font-size: 1.1rem;
    font-weight: 500;
}

p {
    font-size: 1.15rem;
    font-weight: 500;
}

/* Encabezados globales */
h1, h2, h3, h4 { 
    color: var(--color-primary); 
    margin-bottom: 15px; 
}

h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.8rem; font-weight: 700; }
h3 { font-size: 2.2rem; font-weight: 700; }
h4 { font-size: 1.8rem; font-weight: 700; }

a { text-decoration: none; color: inherit; }

/* =========================================
   BOTONES GLOBALES
========================================= */
.btn, .btn-instagram {
    font-weight: 800;
    display: inline-block;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.btn { padding: 12px 24px; border: 2px solid transparent; }

.btn.primary { 
    background-color: var(--color-primary); 
    color: var(--color-white); 
    border-color: var(--color-primary); 
}
.btn.primary:hover, .btn.primary:focus, .btn.primary:active { 
    background-color: var(--color-white); 
    color: var(--color-primary); 
}

.btn.secondary { background-color: var(--color-white); color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn.secondary:hover { background-color: var(--color-primary); color: var(--color-white); }
.btn.accent { background-color: var(--color-accent); color: var(--color-dark); }
.btn.accent:hover { background-color: #e6ac00; }

.btn-instagram { background: var(--color-primary); padding: 10px 20px; color: var(--color-white); margin-top: 30px; }
.btn-instagram:hover { background: #024a45; color: var(--color-white); }

/* =========================================
   BARRA DE NAVEGACIÓN
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar .logo img { max-height: 50px; }
.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a { font-weight: bold; color: var(--color-dark); transition: color 0.3s; }
.nav-links a:hover { color: var(--color-primary); }
.mobile-menu { display: none; font-size: 24px; cursor: pointer; color: var(--color-primary); }

/* =========================================
   ESTRUCTURA DE SECCIONES COMUNES
========================================= */
section:not(.hero) { 
    padding: 60px 20vw; 
    text-align: center; 
}

.container-flex { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 30px; 
    justify-content: center;
    text-align: left; 
}

.container-flex > div { 
    flex: 1; 
    min-width: 300px; 
    display: flex;
    flex-direction: column;
}

/* =========================================
   SECCIÓN: HERO (ESTILO COMBINADO)
========================================= */
.hero {
    height: 90vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 5% 50px 5%;
    box-sizing: border-box;
}

.hero-content {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    max-width: 750px;
}

/* H1 Base (Palabra 'Pilates') */
.hero-content h1 { 
    font-family: 'fuente-pilates', 'DMSans', sans-serif;
    font-size: 4.2rem; 
    font-weight: normal;
    line-height: 1.1;
    margin-bottom: 10px;
    text-align: left;
    color: var(--color-primary);
    
    font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
    font-feature-settings: "liga" 1, "dlig" 1, "calt" 1;
    letter-spacing: normal; 
    
    text-shadow: 
        1px 1px 3px #d6cfa9, 
        0px 0px 10px #d1c091;
}

/* Estilo exclusivo para la palabra 'Manquehue' */
.texto-script {
    font-family: 'PlaylistScript', cursive, sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 1.15em; /* Un leve ajuste de tamaño para equilibrar la caligrafía */
    display: inline-block;
    
    /* Ligaduras activas para la fuente script */
    font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
    font-feature-settings: "liga" 1, "dlig" 1, "calt" 1;
    letter-spacing: normal;
}

.hero-subtitle { 
    font-size: 2.2rem; 
    color: #ffffff; 
    margin-bottom: 25px; 
    font-weight: 800; 
    text-align: left;
    
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.8),
        0px 0px 15px rgba(0, 0, 0, 0.5);
}

.hero-buttons { 
    display: flex; 
    gap: 15px; 
    justify-content: flex-start; 
    flex-wrap: wrap;
    margin-bottom: 0; 
}

.hero-buttons .btn { 
    font-size: 1.1rem; 
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.qr-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.85); 
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px); 
}

.qr-container h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--color-dark);
}

.qr-code { 
    width: 180px; 
    height: 180px; 
    border-radius: 8px; 
}

/* =========================================
   SECCIÓN: ¿CÓMO AGENDAR? 
========================================= */
section.como-agendar { 
    background-color: #f9f9f9; 
    padding: 60px 2% !important; 
}

.como-agendar h2 { font-size: 2.5rem; margin-bottom: 30px; }

.pasos-container {
    display: flex;
    justify-content: center;
    gap: 2%; 
    width: 100%;
    max-width: 1800px; 
    margin: 0 auto 40px auto;
}

.pasos-container img { 
    width: 49%; 
    max-width: none; 
    height: auto; 
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.como-agendar .btn.primary {
    background-color: var(--color-zfitness);
    color: var(--color-white);
    font-size: 1.4rem;
    padding: 18px 40px;
    border: none;
}
.como-agendar .btn.primary:hover { background-color: #2c2652; color: var(--color-white); }

/* =========================================
   SECCIÓN: GALERÍA MULTIMEDIA
========================================= */
.galeria-multimedia { 
    background-color: var(--color-white); 
    padding: 60px 10vw !important; 
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.thumb {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    aspect-ratio: 1 / 1; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.thumb img, .thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumb:hover img, .thumb:hover video {
    transform: scale(1.05); 
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
    pointer-events: none; 
}

.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal.activo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-contenido {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 80%;
    height: 80vh;
}

.media-visor {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.cerrar-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: 0.3s;
}
.cerrar-modal:hover { color: var(--color-primary); }

.flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}
.flecha:hover { background: rgba(255,255,255,0.4); }
.flecha.izq { left: 20px; }
.flecha.der { right: 20px; }

/* =========================================
   SECCIÓN: UBICACIÓN, HORARIOS Y MAPA
========================================= */
.horarios-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px; 
    width: 30%; 
    min-width: 260px; 
}

.dia-pill {
    display: flex;
    background-color: #ffffff;
    border-radius: 30px; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); 
    padding: 3px; 
    align-items: stretch;
}

.dia-nombre {
    width: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #035f59; 
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dia-horas {
    width: 65%;
    background-color: #035f59; 
    border-radius: 20px;
    padding: 5px 8px; 
    text-align: center;
    color: #ffffff; 
    font-weight: 800; 
    font-size: 0.85rem; 
    line-height: 1.2; 
    letter-spacing: -0.3px; 
}

.mapa-contenedor {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    width: 100%;
}

.direccion-texto {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-dark);
    font-weight: 600;
    margin: 0;
}

.mapa-estatico {
    display: block;
    position: relative;
    width: 100%;
    height: 100%; 
    min-height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-decoration: none;
}

.mapa-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mapa-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 95, 89, 0.7); 
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mapa-overlay span {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 20px;
    border: 2px solid #ffffff;
    border-radius: 5px;
}

/* =========================================
   SECCIÓN: PLANES
========================================= */
.planes { background-color: var(--color-white); }
.planes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 30px; }
.plan-card { background: #f4f6f6; padding: 20px; border-radius: 10px; border-top: 5px solid var(--color-primary); text-align: center; }
.plan-card h3 { font-size: 1.5rem; margin-bottom: 5px; color: var(--color-accent); }
.plan-card .clases { color: var(--color-primary); margin-bottom: 15px; font-size: 1.2rem; font-weight: 800; }
.plan-card ul { list-style: none; padding: 0; font-size: 1rem; line-height: 1.8; }
.plan-card ul li { color: var(--color-primary); }
.clases-extra { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; flex-direction: row; }
.clase-caja { flex: 1; background-color: var(--color-accent); padding: 20px; border-radius: 8px; color: var(--color-dark); font-size: 1.1rem; box-shadow: 0 4px 6px rgba(0,0,0,0.05); text-align: center; }

/* =========================================
   SECCIÓN: QUIÉNES SOMOS & TEATINOS
========================================= */
.quienes-somos { background-color: var(--color-white); }
.nosotros-texto, .sede-teatinos {
    padding: 40px 30px; border-radius: 10px; align-items: center; text-align: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.nosotros-texto { background-color: #f4f6f6; color: var(--color-dark); }
.sede-teatinos { background-color: var(--color-primary); color: var(--color-white); }
.sede-teatinos h3 { color: var(--color-white); }
.sede-teatinos p { margin-bottom: 20px; }
.img-cuadrada {
    width: 140px; height: 140px; object-fit: cover; border-radius: 15px; margin-bottom: 25px; box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* =========================================
   FOOTER
========================================= */
.site-footer { background-color: var(--color-dark); color: var(--color-white); padding: 40px 20vw; font-size: 0.9rem; }
.footer-content { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 30px; }
.footer-logo { order: -1; }
.footer-info p { margin-bottom: 5px; }
.footer-info a { color: var(--color-accent); }

/* =========================================
   MEDIA QUERIES (ESCRITORIO / PC)
========================================= */
@media (min-width: 769px) {
    .mapa-estatico:hover .mapa-img { 
        transform: scale(1.05); 
    }
    .mapa-estatico:hover .mapa-overlay { 
        opacity: 1; 
    }
}

/* =========================================
   MEDIA QUERIES (TABLETS Y PANTALLAS MEDIANAS)
========================================= */
@media (max-width: 1024px) {
    .pasos-container { 
        flex-direction: column; 
        gap: 20px; 
    }
    .pasos-container img { 
        width: 100%; 
        max-width: 100%; 
        margin-bottom: 0; 
    }
}

/* =========================================
   MEDIA QUERIES (MÓVILES)
========================================= */
@media (max-width: 768px) {
    section:not(.hero):not(.como-agendar):not(.galeria-multimedia), .site-footer { padding: 50px 5%; }
    
    .nav-links { display: none; flex-direction: column; width: 100%; position: absolute; top: 70px; left: 0; background: var(--color-white); padding: 20px 0; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .mobile-menu { display: block; }
    
    .hero {
        height: auto;
        min-height: 80vh;
        padding: 100px 5% 40px 5%;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-subtitle { 
        font-size: 1.6rem; 
    }

    .hero-buttons { 
        flex-direction: column; 
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hidden-mobile { display: none !important; }
    .como-agendar h2 { font-size: 2.2rem; }
    
    .container-flex, .clases-extra { flex-direction: column; }
    
    .horarios-wrapper { width: 100%; min-width: auto; }
    .dia-pill { flex-direction: row; padding: 4px; }
    .dia-nombre { font-size: 0.7rem; }
    .dia-horas { padding: 8px; font-size: 0.75rem; }

    .mapa-estatico.en-pantalla .mapa-img { 
        transform: scale(1.05); 
    }
    .mapa-estatico.en-pantalla .mapa-overlay { 
        opacity: 1; 
    }
    
    .galeria-multimedia { padding: 40px 5% !important; }
    .galeria-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    
    .flecha { padding: 10px 15px; font-size: 20px; }
    .modal-contenido { max-width: 100%; }
}