/* --- Variables y Reset --- */
:root {
    --color-primary: #0A1128; /* Azul noche profundo más elegante */
    --color-accent: #C29F64; /* Dorado sobrio */
    --color-accent-hover: #A8864E; /* Dorado oscuro para hover */
    --color-light: #F8F9FA;
    --color-text: #334155;
    --color-text-light: #64748B;
    --color-whatsapp: #25D366;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --header-height: 90px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --transition-fast: 0.3s ease;
}

html { 
    scroll-behavior: smooth; 
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.7;
    background-color: var(--color-light);
    padding-top: var(--header-height);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { 
    font-family: var(--font-heading); 
    color: var(--color-primary); 
    line-height: 1.2;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: var(--transition-fast); 
}

ul { 
    list-style: none; 
}

input, textarea, button { 
    font-family: inherit; 
}

/* --- Animaciones de Entrada (Scroll Reveal) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Utilidades --- */
.container { 
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    position: relative; 
    z-index: 2; 
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--color-accent);
    color: #fff;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(194, 159, 100, 0.3);
}

.btn:hover { 
    background-color: var(--color-accent-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(194, 159, 100, 0.4);
}

/* --- Botón Flotante WhatsApp y Tooltip --- */
.whatsapp-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.whatsapp-tooltip {
    background-color: #fff;
    color: var(--color-text);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    font-size: 0.95rem;
    position: relative;
    opacity: 0;
    transform: translateX(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* El triangulito que apunta al botón */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 20px;
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #fff;
}

.whatsapp-tooltip.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.whatsapp-float {
    width: 60px;
    height: 60px;
    background-color: var(--color-whatsapp);
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
    background-color: #1ebc57;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* --- HEADER & NAVEGACIÓN --- */
header { 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: var(--header-height);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06); 
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%;
    z-index: 1000; 
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

header.scrolled {
    height: 75px;
    background: rgba(255, 255, 255, 0.98);
}
        
nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    font-size: 1.6rem; 
    font-weight: 700; 
    font-family: var(--font-heading); /* Tipografía más seria y profesional */
    color: var(--color-primary); 
    letter-spacing: 0.5px; 
    z-index: 1001;
    flex-shrink: 0;
}

.logo img { 
    height: 55px; 
    width: auto; 
    transition: var(--transition-fast);
}

header.scrolled .logo img {
    height: 45px;
}

.logo span { 
    color: var(--color-accent); 
}

.nav-links { 
    display: flex; 
    gap: 35px; 
    align-items: center; 
    margin-left: auto; 
    padding-left: 30px; 
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-primary);
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover { 
    color: var(--color-accent); 
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.hamburger { 
    display: none; 
    cursor: pointer; 
    z-index: 1001; 
    margin-left: 20px;
}
.bar { 
    display: block; 
    width: 28px; 
    height: 2px; 
    margin: 6px auto; 
    transition: all 0.3s ease-in-out; 
    background-color: var(--color-primary); 
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: calc(100vh - var(--header-height)); 
    min-height: 500px;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.video-container { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 0; 
}

.hero-video { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    opacity: 0; 
    transition: opacity 1.5s ease-in-out, transform 10s linear; 
}

.hero-video.active { 
    opacity: 1; 
    transform: scale(1.05); /* Efecto Ken Burns suave */
}

/* Overlay gradient radial para más sofisticación */
.overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(to right, rgba(10, 17, 40, 0.85) 0%, rgba(10, 17, 40, 0.4) 100%); 
    z-index: 1; 
}
        
.hero-content { 
    position: relative; 
    z-index: 2; 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 0 20px; 
    text-align: center;
}

.hero h1 { 
    font-size: 4rem; 
    margin-bottom: 25px; 
    color: #fff; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6); 
    font-weight: 700;
}

.hero p { 
    font-size: 1.3rem; 
    margin-bottom: 40px; 
    opacity: 0.95; 
    font-weight: 300;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.6); 
}

.slider-nav { 
    position: absolute; 
    bottom: 40px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 3; 
    display: flex; 
    gap: 15px; 
}

.nav-dot { 
    width: 10px; 
    height: 10px; 
    background-color: rgba(255, 255, 255, 0.4); 
    border-radius: 50%; 
    cursor: pointer; 
    transition: var(--transition-fast); 
}

.nav-dot:hover, .nav-dot.active { 
    background-color: var(--color-accent); 
    transform: scale(1.4); 
    box-shadow: 0 0 10px rgba(194, 159, 100, 0.8);
}

/* --- Secciones Generales --- */
.practices { padding: 100px 0; background: #fff; }

.section-title { 
    text-align: center; 
    margin-bottom: 70px; 
}

.section-title h2 { 
    font-size: 2.8rem; 
    margin-bottom: 15px; 
    position: relative;
    display: inline-block;
}

.section-title .divider { 
    width: 80px; 
    height: 3px; 
    background: var(--color-accent); 
    margin: 0 auto;
    border-radius: 2px; 
}
        
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 40px; 
}

.card { 
    padding: 40px 30px; 
    border: 1px solid rgba(226, 232, 240, 0.5); 
    border-radius: var(--radius-md); 
    background: #fff;
    transition: all 0.4s ease; 
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Detalle dorado en el borde superior de la tarjeta */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: center;
}

.card:hover { 
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover); 
    border-color: rgba(194, 159, 100, 0.2);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 { 
    margin-bottom: 15px; 
    font-size: 1.4rem; 
}

.card p {
    color: var(--color-text-light);
    font-size: 1rem;
}

.icon { 
    font-size: 2.5rem; 
    color: var(--color-accent); 
    margin-bottom: 25px; 
    display: inline-block; 
    transition: transform 0.4s ease;
}

.card:hover .icon {
    transform: scale(1.1);
}

/* --- Sección Contacto --- */
.contact-section { 
    padding: 100px 0; 
    background-color: var(--color-light); 
}

.contact-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 0; 
    background: #fff; 
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-hover); 
    overflow: hidden; /* Para las esquinas redondeadas del grid */
}

.contact-info {
    background: var(--color-primary);
    color: #fff;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

/* Patrón sutil en fondo de contacto */
.contact-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(194,159,100,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.contact-info h3 { 
    color: #fff;
    margin-bottom: 20px; 
    font-size: 2.2rem;
}

.contact-info p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.info-item { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 30px; 
    font-size: 1.1rem; 
}

.info-item i { 
    color: var(--color-accent); 
    background: rgba(194, 159, 100, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem; 
    flex-shrink: 0;
}

.map-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid rgba(255,255,255,0.1);
}

.contact-form {
    padding: 60px 50px;
    background: #fff;
}

.form-group { 
    margin-bottom: 25px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 10px; 
    font-weight: 700; 
    font-size: 0.9rem; 
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea { 
    width: 100%; 
    padding: 15px; 
    border: 1px solid #E2E8F0; 
    border-radius: 6px; 
    font-size: 1rem; 
    background-color: #F8FAFC; 
    transition: var(--transition-fast);
}

.form-group textarea { 
    resize: vertical; 
    min-height: 140px; 
}

.form-group input:focus, .form-group textarea:focus { 
    outline: none; 
    border-color: var(--color-accent); 
    background-color: #fff; 
    box-shadow: 0 0 0 4px rgba(194, 159, 100, 0.1);
}

/* Indicador de estado del formulario */
.form-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
    font-weight: bold;
    text-align: center;
}
.form-status.success {
    display: block;
    background-color: rgba(37, 211, 102, 0.1);
    color: #1ebc57;
    border: 1px solid rgba(37, 211, 102, 0.3);
}
.form-status.error {
    display: block;
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Loader del botón */
.btn-loader {
    display: none;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 14px;
    height: 14px;
    -webkit-animation: spin 1s linear infinite; /* Safari */
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

footer { 
    background: var(--color-primary); 
    color: #fff; 
    padding: 50px 0 40px; 
    text-align: center;
    border-top: 4px solid var(--color-accent);
}

footer h3 {
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

footer p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}
        
/* --- MEDIA QUERIES --- */

/* 1. MÓVIL VERTICAL */
@media (max-width: 768px) {
    
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        margin-left: 0;
        padding-left: 0;
        gap: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.4s ease;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-top: 1px solid #eee;
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    
    header.scrolled .nav-links {
        top: 75px;
        height: calc(100vh - 75px);
    }

    .nav-links.active { left: 0; }
    .nav-links li { margin: 20px 0; width: 100%; }
    .nav-links a.btn { margin: 10px auto; width: 80%; display: block;}
    
    .logo { gap: 10px; max-width: 80%; }
    .logo img { height: 40px; }
    
    .logo div { 
        font-size: clamp(0.9rem, 4vw, 1.2rem); 
        line-height: 1.2;
        white-space: nowrap; 
    }
    
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    
    .contact-wrapper { grid-template-columns: 1fr; }
    .contact-info { padding: 40px 30px; }
    .contact-form { padding: 40px 30px; }
    
    .map-container { margin-top: 20px; }

    .section-title h2 { font-size: 2.2rem; }
    .practices { padding: 60px 0; }
    .contact-section { padding: 60px 0; }

    /* Ajuste para tooltip en móvil */
    .whatsapp-container {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }
    .whatsapp-tooltip::after {
        right: 25px;
        bottom: -8px;
        border-width: 8px 8px 0 8px;
        border-color: #fff transparent transparent transparent;
    }
}

/* 2. MÓVIL HORIZONTAL */
@media (max-width: 900px) and (orientation: landscape) {
    .hero { min-height: 100vh; } 
    .nav-links { gap: 15px; padding-left: 10px; } 
    .btn { padding: 10px 20px; font-size: 0.8rem; }
    .logo { font-size: 1.2rem; }
    .logo img { height: 40px; }
    .hero h1 { font-size: 2.5rem; margin-top: 40px;}
}
