/* --- Variables y Reset --- */
:root {
    --primary-blue: #1661D9;
    --dark-blue: #1661D9;
    --dark-bg: #1a1a1a;
    --light-gray: #f5f5f5;
    --text-dark: #333333;
    --text-light: #ffffff;
    --font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth; /* Desplazamiento suave para las anclas */
}

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

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Hero Section con Video --- */

/* --- Nuevo: Selector de idiomas --- */
.lang-selector {
    display: flex;
    gap: 25px;
    font-size: 0.85rem;
    font-weight: 500;
}

.lang-link {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.lang-link:hover {
    color: var(--text-light);
}

/* Idioma activo (Español) con el color azul y subraya del diseño */
.lang-link.active {
    color: var(--primary-blue);
    border-bottom: 2px solid var(--primary-blue);
}


.hero {
    position: relative;
    color: var(--text-light);
    text-align: center;
    padding: 2rem 2rem 8rem 2rem;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    z-index: -1;
}

.header-top, .hero-content {
    position: relative;
    z-index: 1;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.logo-img {
    height: 45px;
    width: auto;
    display: block;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-circle {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-circle img {width: 30px; height: 30px;}

.hero-content {
    max-width: 1000px;
    margin: auto;
}



.subtitle-small {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 em {
    font-weight: 400;
    font-family: 'Playfair Display', serif; 
    font-style: italic;
    font-size: 125%;
}

.text-blue {
    color: var(--primary-blue);
}

.hero-desc {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    color: #dddddd;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 15px 50px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-blue);
}

.btn-solid {
    background: var(--text-light);
    color: var(--primary-blue);
    border: 1px solid var(--text-light);
}

.btn-solid:hover {
    background: var(--primary-blue);
    color: #fff;
}

/* --- Stats Banner --- */
.stats-container {
    max-width: 1080px;
    margin: -60px auto 4rem auto;
    position: relative;
    z-index: 10;
}

.stats-banner {
    background-color: var(--primary-blue);
    color: var(--text-light);
    border-radius: 8px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 2.5rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0 1rem;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item h2 {
    font-size: 3rem;
    margin-bottom: 0rem;
}

.stat-item p {
    font-size: 1rem;
    line-height: 1.2;
}

.stat-box {
    border: 1px solid var(--text-light);
    border-radius: 4px;
    padding: 1rem 3rem;
    display: inline-block;
}

/* --- Video Section --- */
.video-section {
    max-width: 1080px;
    margin: 0 auto 5rem auto;
    padding: 0 1rem;
    scroll-margin-top: 2rem;
}

.video-wrapper {
    position: relative;
    background: #333 url('/Mvc/assets/cedro/de-autor-a-autor/img/creadores.jpg') center/cover;
    height: 550px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.play-button {
    width: 110px;
    height: 110px;
    background-color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

.play-triangle {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid white;
    margin-left: 8px;
}

.video-title {
    position: absolute;
    bottom: 80px;
    z-index: 2;
    font-size: 2rem;
    font-weight: bold;
}

/* --- Contact Section (Actualizado) --- */
.contact-section {
    text-align: center;
    padding: 2rem 1rem 5rem 1rem;
    scroll-margin-top: 2rem;
}

.contact-header h3 {
    color: var(--primary-blue);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.contact-header h2 {
    color: var(--text-dark); /* Cambiado a color oscuro del nuevo diseño */
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.contact-header h2 em {
    font-family: 'Playfair Display', serif; 
    font-style: italic;
    font-size: 125%;
    font-weight: 400;
    color: var(--dark-blue); /* Ajustado al azul oscuro del nuevo énfasis */
}

.contact-header > p {
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: #333333;
    font-size: 0.95rem;
}

.contact-form-container {
    background-color: var(--light-gray);
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 8px;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 1.5rem; /* Un poco más de aire entre columnas */
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
}

input[type="text"], input[type="email"], input[type="tel"] {
    width: 100%;
    padding: 14px; /* Ligeramente más altos para que coincidan con la imagen */
    border: 1px solid #999999; /* Borde un poco más definido */
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: #ffffff;
}

/* Nueva leyenda debajo de los inputs */
.form-legend {
    text-align: right;
    font-size: 0.75rem;
    color: #777777;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #000000;
}

/* Contenedor para maquetar los 3 párrafos legales */
.legal-text-container {
    font-size: 0.68rem;
    color: #333333;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.legal-text-container p {
    margin-bottom: 1rem;
}

.legal-text-container p:last-child {
    margin-bottom: 0;
}

.legal-link-text {
    text-decoration: underline;
    color: #333333;
}

.form-submit {
    display: flex;
    justify-content: flex-start; /* Botón alineado a la izquierda */
}

.btn-submit {
    background-color: #244fa3; /* Azul real corporativo idéntico a la imagen */
    color: var(--text-light);
    border: none;
    padding: 14px 60px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0 auto;
}

.btn-submit:hover:not(:disabled) {
    background-color: #1a3c80;
}

.btn-submit:disabled {
    background-color: #aaaaaa;
    cursor: not-allowed;
    opacity: 0.7;
}

.campo-oculto {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    overflow: hidden;
    opacity: 0;
}

/* Panel de mensaje tras el envío */
.form-message {
    display: none;
    margin-top: 1rem;
    padding: 0.9rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-message--ok {
    background-color: #e8f5e9;
    border: 1px solid #66bb6a;
    color: #2e7d32;
}

.form-message--error {
    background-color: #fdecea;
    border: 1px solid #e57373;
    color: #c62828;
}

.submit-note {
    font-size: 0.8rem;
    color: #777;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 1rem;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo-img {
    height: 55px;
    width: auto;
    margin-bottom: 1.5rem;
}

.footer-links {
    font-size: 0.75rem;
    color: #777;
}

.footer-links a {
    margin: 0 5px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* --- Tooltip para idiomas no activos --- */
.lang-link[data-tooltip] {
    position: relative; /* Necesario para posicionar el cartelito respecto al enlace */
}

/* Estructura del cartelito flotante */
.lang-link[data-tooltip]::after {
    content: attr(data-tooltip); /* Captura el texto del atributo HTML */
    position: absolute;
    bottom: -40px; /* Lo sitúa justo debajo del texto del idioma */
    left: 50%;
    transform: translateX(-50%) translateY(-5px); /* Centrado horizontal y ligero desfase */
    background-color: rgba(0, 0, 0, 0.85); /* Fondo oscuro semitransparente */
    color: var(--text-light);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: normal;
    border-radius: 4px;
    white-space: nowrap; /* Evita que el texto se rompa en varias líneas */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none; /* Evita parpadeos molestos si el ratón toca el cartel */
    
    /* Estado inicial: oculto */
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 100;
}

/* Efecto Hover: muestra el cartelito con un sutil efecto de desplazamiento */
.lang-link[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* --- Pop-up / Modal del Vídeo --- */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fondo negro muy oscuro */
    z-index: 2000; /* Asegura que esté por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Estado inicial: oculto con transición suave */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Clase que activa el JavaScript para mostrarlo */
.video-modal.show-modal {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    width: 80%;
    max-width: 1280px; /* Tamaño máximo de pantalla de cine para el vídeo */
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-modal-content video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Botón de cerrar (X) */
.close-modal-btn {
    position: absolute;
    top: 30px; /* Lo posiciona flotando arriba a la derecha en pantallas grandes */
    right: 30px;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
    z-index: 2010;
}

.close-modal-btn:hover {
    color: var(--primary-blue);
    transform: scale(1.1);
}

/* Ajustes del botón cerrar para pantallas pequeñas (móviles) */
@media (max-width: 768px) {
    .close-modal-btn {
        top: 10px;
        right: 15px;
        background-color: rgba(0, 0, 0, 0.5);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 2rem;
    }
}

.social-icons.footer {margin:20px 0px}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.5rem; }
    .hero h1 em {font-size: 180%;}
    .contact-header h2 { font-size: 1.5rem; }
    .contact-header h2 em {font-size: 180%;}
    .lang-selector {gap: 10px;}
    .lang-link span {display: none;}
    .stats-container {padding: 0 25px;}
    .stats-banner { flex-direction: column; gap: 1rem; padding: 2rem; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); padding-bottom: 1.5rem; width: 100%; }
    .stat-item:last-child { border-bottom: none; padding-bottom: 0; }
    .video-section {margin-bottom: 1rem;}
    .form-row { flex-direction: column; }
    .contact-form-container { padding: 1.5rem; }
    .form-submit { flex-direction: column; align-items: flex-start; }
    .hero-buttons { flex-direction: column; }
    .video-wrapper {height: 350px;}
    .btn-submit {width: 100%;}
    .video-title { bottom:40px; font-size: 1.5rem;}
    .social-icons.top {display: none;}
    .social-icons.footer {margin:20px 0px}
}