/* ========== RESET Y VARIABLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6491bb;
    --secondary: #1d1d1b;
    --text-dark: #3d3d3a;
    --text-title: #1d1d1b;
    --bg-light: #f0f3f5;
    --white: #ffffff;
    --footer-bg: #3d3d3a;
    --transition: all 0.3s ease;
    --margin-horizontal: 16.666%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: transparent;
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--margin-horizontal);
    width: 100%;
}

h1, h2, h3 {
    font-family: 'Mongolian Baiti', 'Times New Roman', serif;
    letter-spacing: 1px;
    color: var(--text-title);
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }

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

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

/* ========== PANTALLA DE CARGA ========== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f3f5;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.preloader-logo-img {
    width: 180px;
    height: 180px;
    transform-style: preserve-3d;
    animation: softPulse 2s ease-in-out infinite, gentleRotate 4s ease-in-out infinite;
}

@keyframes softPulse {
    0% { filter: drop-shadow(0 0 0px rgba(99,144,185,0.3)); }
    50% { filter: drop-shadow(0 0 12px rgba(99,144,185,0.9)); }
    100% { filter: drop-shadow(0 0 0px rgba(99,144,185,0.3)); }
}

@keyframes gentleRotate {
    0% { transform: perspective(800px) rotateY(0deg); }
    50% { transform: perspective(800px) rotateY(6deg); }
    100% { transform: perspective(800px) rotateY(0deg); }
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--white);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 55px;
    width: auto;
}

/* Efecto latido lento en logo del menú */
.logo-beat img {
    animation: gentleBeat 4s ease-in-out infinite;
}

@keyframes gentleBeat {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(99,144,185,0)); }
    50% { transform: scale(1.02); filter: drop-shadow(0 0 4px rgba(99,144,185,0.5)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(99,144,185,0)); }
}

/* ========== MENÚ ========== */
.nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-list a {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.3px;
    color: var(--secondary);
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-list a:hover::after { width: 100%; }
.nav-list a:hover { color: var(--primary); }
.nav-list a.active { color: #8ab3d0; }
.nav-list a.active::after { width: 100%; background: #8ab3d0; }

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary);
    margin: 3px 0;
    transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
    position: relative;
    height: 600px;
    margin-top: 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.hero-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--margin-horizontal) 40px;
    width: 100%;
}

.hero-footer-text {
    text-align: center;
    width: 100%;
}

.hero-tagline {
    font-family: 'Mongolian Baiti', 'Times New Roman', serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--white);
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.4);
    display: inline-block;
    padding: 10px 24px;
    border-radius: 40px;
    backdrop-filter: blur(4px);
}

/* ========== HERO CON VÍDEO ========== */
.hero-video {
    position: relative;
    height: 600px;
    margin-top: 100px;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-bg-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
    display: none;
}

.hero-video.video-fallback .hero-video-bg { display: none; }
.hero-video.video-fallback .hero-bg-fallback { display: block; }

/* ========== REINFORCEMENT ========== */
.reinforcement {
    padding: 0;
    background: var(--white);
    margin-bottom: 60px;
}

.reinforcement .container {
    border-top: 1px solid var(--text-dark);
    border-bottom: 1px solid var(--text-dark);
    padding: 40px var(--margin-horizontal);
}

.reinforcement-title {
    font-family: 'Mongolian Baiti', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 2.6rem;
    letter-spacing: 1px;
    color: var(--text-title);
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.4;
    text-align: center;
}

/* ========== BLOCKS 50/50 ========== */
.section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.block-50:not(:last-child) {
    border-bottom: 1px solid rgba(61, 61, 58, 0.2);
}

.block-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.block-text { flex: 1; }
.block-text p {
    font-size: 1.125rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.block-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.block-image img {
    width: 80%;
    height: auto;
    border-radius: 25px;
    padding: 20px;
    transition: transform 0.4s ease;
}

.block-image img:hover { transform: scale(1.02); }
.reverse-order .block-container { flex-direction: row-reverse; }

/* ========== FOOTER ========== */
.footer {
    background: var(--footer-bg);
    padding: 60px 0 20px;
    color: var(--white);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-nav-center { flex: 1; display: flex; justify-content: center; }
.footer-nav { display: flex; gap: 40px; list-style: none; }

.footer-nav li a {
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
}

.footer-nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.footer-nav li a:hover::after { width: 100%; }
.footer-nav li a:hover { opacity: 1; color: var(--primary); }

.footer-legal ul { display: flex; gap: 30px; list-style: none; }
.footer-legal li a {
    color: var(--white);
    font-size: 0.8rem;
    opacity: 0.6;
    transition: var(--transition);
}
.footer-legal li a:hover { opacity: 1; color: var(--primary); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ========== CONTACTO ========== */
.contact-call { padding: 40px 0 0; background: transparent; }
.call-text { max-width: 900px; margin: 0 auto; text-align: center; }
.call-text p { font-size: 1.125rem; color: var(--text-dark); line-height: 1.6; }

.contact-section { padding: 60px 0 80px; }
.contact-wrapper { display: flex; gap: 60px; align-items: flex-start; }

.contact-form, .contact-info {
    flex: 1;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.contact-form h3, .contact-info h3 {
    font-family: 'Mongolian Baiti', 'Times New Roman', serif;
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.form-group { margin-bottom: 24px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(100,145,187,0.1);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}
.btn-primary:hover { background: var(--secondary); transform: translateY(-2px); }

.form-note { font-size: 0.75rem; margin-top: 15px; color: #777; text-align: center; }

.checkbox-group { margin: 20px 0; }
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
}
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.checkbox-label a { color: var(--primary); text-decoration: underline; }
.checkbox-label a:hover { color: var(--secondary); }

.contact-details { display: flex; flex-direction: column; gap: 24px; }
.detail-item { border-left: 3px solid var(--primary); padding-left: 20px; }
.detail-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 600;
}
.detail-item span { font-size: 1rem; color: var(--text-dark); }

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    text-align: center;
}
.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ========== PÁGINAS LEGALES ========== */
.legal-page {
    padding: 160px 0 120px;
    background: var(--bg-light);
    min-height: 100vh;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fefefe;
    padding: 60px 50px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-title);
}

.legal-page h2 {
    font-size: 1.3rem;
    margin: 35px 0 15px;
    color: var(--primary);
}

.legal-page p, .legal-page li {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.legal-page ul, .legal-page ol {
    margin: 15px 0 20px 30px;
}

.legal-page a {
    color: var(--primary);
    text-decoration: underline;
}

.legal-page a:hover {
    color: var(--secondary);
}

.legal-date {
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 120px 0 80px;
    }
    
    .legal-container {
        padding: 40px 25px;
    }
    
    .legal-page h1 {
        font-size: 1.6rem;
    }
    
    .legal-page h2 {
        font-size: 1.2rem;
    }
}