/* FONTS */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

/* RESET SEGURO */
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
}

/* PALETA DE COLORES */
:root {
    --color-primary: #3d3229;
    --color-secondary: #5c4a3a;
    --color-accent: #8b7355;
    --color-light: #d4c4b0;
    --color-bg: #f5f1eb;
    --color-dark: #2a2420;
    --color-text: #3a3632;
    --color-white: #ffffff;
    --color-gray: #6b6560;
}

main {
    width: 100%;
    display: block;
}

.area {
    margin-bottom: 0;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    padding-top: 70px;
}

/* ============================================
   ANIMACION 1: ENTRADA CON SCROLL (fade-in + slide-up)
   ============================================ */

/* Clases base para animaciones de scroll */
.scroll-animate,
.scroll-animate-up,
.scroll-animate-left,
.scroll-animate-right {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate-left {
    transform: translateX(-60px);
}

.scroll-animate-right {
    transform: translateX(60px);
}

/* Estado visible cuando entra al viewport */
.scroll-animate.visible,
.scroll-animate-up.visible,
.scroll-animate-left.visible,
.scroll-animate-right.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Delays escalonados para elementos */
.scroll-animate-up[style*="-delay"] {
    transition-delay: var(--delay, 0s);
}

/* ============================================
   ANIMACION 2: HOVER EFFECTS (scale + glow)
   ============================================ */

/* Hover lift - elevacion suave */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(61, 50, 41, 0.2);
}

/* Hover glow - brillo suave */
.hover-glow {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                filter 0.4s ease;
}

.hover-glow:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(139, 115, 85, 0.4),
                0 15px 40px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

/* NAV */
.navbar {
    background: var(--color-dark);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    color: var(--color-white);
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-light);
}

.navbar a {
    margin-left: 15px;
    text-decoration: none;
    color: var(--color-white);
    padding: 10px 14px;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.navbar a:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Social icons en navbar */
.social-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: white;
    transition: fill 0.3s ease, transform 0.3s ease;
}

.social-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
}

.social-nav a:hover {
    background-color: var(--color-accent);
}

.social-nav a:hover .social-icon {
    fill: var(--color-white);
    transform: scale(1.15) rotate(5deg);
}

#audio-control {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 22px;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#audio-control:hover {
    background: var(--color-secondary);
    transform: scale(1.1);
}

/* WhatsApp floating button */
#whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#whatsapp-btn svg {
    width: 30px;
    height: 30px;
    fill: var(--color-white);
}

#whatsapp-btn:hover {
    transform: scale(1.15);
    background: #25d366;
}

/* ============================================
   HERO - IMAGEN COMPLETA Y RESPONSIVA (MÁS COMPACTO)
   ============================================ */

.hero {
    width: 100%;
    min-height: 500px; /* Altura base */
    height: 60vh; /* Altura reducida en desktop */
    max-height: 600px; /* Altura máxima */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    background-color: var(--color-dark);
}

/* Contenedor de la imagen */
.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding: 20px; /* Espacio alrededor de la imagen */
}

/* Imagen del hero - se ve completa */
.hero-image {
    height: 700px;
    width: 3000px;
    object-fit: contain;
    object-position: center;
}

/* Overlay oscuro para mejorar legibilidad del texto */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* Contenido del hero (texto) */
.hero-content {
    position: relative;
    z-index: 3;
    padding: 20px;
    animation: heroFadeIn 1.2s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem; /* Reducido */
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: 1.3rem; /* Reducido */
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.95;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

/* ============================================
   RESPONSIVE HERO
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    .hero {
        height: 55vh;
        min-height: 450px;
        max-height: 500px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
        min-height: 400px;
        max-height: 450px;
    }
    
    .hero-image-container {
        padding: 15px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .hero-content {
        padding: 15px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .hero {
        height: 45vh;
        min-height: 350px;
        max-height: 400px;
    }
    
    .hero-image-container {
        padding: 10px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
}

/* INTRO SECTION */
.intro-section {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 100px 40px;
}

.intro-section h1 {
    color: var(--color-white);
    font-size: 2.6rem;
    max-width: 900px;
    margin: 0 auto 25px;
}

.intro-text {
    color: var(--color-light);
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.9;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* SECCIONES */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 40px;
    text-align: center;
    font-family: 'Lato', sans-serif;
    font-size: 1.2rem;
    color: var(--color-text);
}

/* Textos mas grandes para mejor legibilidad */
.section p,
.card p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--color-gray);
}

.section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--color-primary);
}

.section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--color-primary);
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 15px auto 0;
}

.section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 18px;
    color: var(--color-secondary);
}

.grid p {
    font-size: 1.3rem;
    line-height: 1.9;
}

.section-ubicacion {
    margin-top: -100px;
}

.center {
    text-align: center;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.grid img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--color-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    text-align: center;
    align-items: center;
    border: 1px solid rgba(139, 115, 85, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,.12);
}

#qr img {
    display: block;
    margin: 0 auto;
    width: 450px;
    height: auto;
    border-radius: 12px;
}

.card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
}

.servicios {
    padding: 80px 20px;
    text-align: center;
}

.servicios h2 {
    font-size: 2.2rem;
    margin-bottom: 50px;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.servicio-card {
    background: var(--color-white);
    padding: 35px 30px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
    border-left: 4px solid var(--color-accent);
}

.servicio-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 45px rgba(61, 50, 41, 0.15);
    border-left-color: var(--color-primary);
}

.servicio-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 14px;
    color: var(--color-primary);
}

.servicio-card p {
    font-size: 1.15rem;
    color: var(--color-gray);
    line-height: 1.8;
}

/* SECCION EQUIPO */
.section-equipo {
    margin-top: -30px;
    margin-bottom: -55px;
}

.section-equipo .cards {
    justify-content: center;
}

.section-equipo .card {
    max-width: 800px;
    margin: 0 auto;
}

.section-equipo .card img {
    height: 600px;
    width: 550px;
    object-fit: cover;
}

/* FORM */
form {
    max-width: 700px;
    margin: auto;
    display: grid;
    gap: 20px;
}

input, textarea {
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid var(--color-light);
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
    transform: translateY(-2px);
}

button {
    padding: 16px 40px;
    border-radius: 8px;
    border: none;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    background: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(61, 50, 41, 0.3);
}

/* FOOTER */
footer {
    background: var(--color-dark);
    color: var(--color-light);
    text-align: center;
    padding: 30px 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    clear: both;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.section .wide {
    text-align: center;
}

/* AREAS DE PRACTICA - Full width rows alternadas */
.section-areas {
    padding: 80px 0;
    text-align: center;
    font-family: 'Lato', sans-serif;
}

.section-areas h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 50px;
    color: var(--color-primary);
    position: relative;
}

.section-areas h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 15px auto 0;
}

.areas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.area-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 6px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.area-row:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.area-row.area-left {
    flex-direction: row;
    text-align: left;
    background: var(--color-white);
}

.area-row.area-right {
    flex-direction: row;
    text-align: right;
    background: var(--color-primary);
}

.area-row.area-right .area-content h3 {
    color: var(--color-light);
}

.area-row.area-right .area-content p {
    color: var(--color-light);
    opacity: 0.85;
}

.area-img {
    width: 40%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
    transition: transform 0.5s ease;
}

.area-row:hover .area-img {
    transform: scale(1.05);
}

.area-content {
    flex: 1;
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.area-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.area-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-gray);
}

/* ============================================
   RESPONSIVE GENERAL
   ============================================ */

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .area-row {
        flex-direction: column !important;
        height: auto;
    }

    .area-img {
        width: 100%;
        height: 180px;
    }

    .area-content {
        padding: 20px;
    }

    .area-row.area-right {
        text-align: left;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .section h1 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .section-equipo .card img {
        height: 400px;
        width: 100%;
    }
    
    #qr img {
        width: 280px;
    }
    
    .map-container iframe {
        width: 100% !important;
        height: 350px !important;
    }
    
    .navbar {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-animate,
    .scroll-animate-up,
    .scroll-animate-left,
    .scroll-animate-right {
        opacity: 1;
        transform: none;
    }
}