:root {
    --color-primary: #E63946;
    --color-secondary: #457B9D;
    --color-accent: #F1FAEE;
    --color-dark: #1D3557;
    --color-light: #A8DADC;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-color: #1D3557;
    color: white;
    position: relative;
    transition: background-image 0.5s ease-in-out;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Agregar overlay más oscuro */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Asegurar que el contenido esté por encima del overlay */
.hero nav {
    position: fixed;
    z-index: 1000;
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(29, 53, 87, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    height: 40px;
    z-index: 2;
    opacity: 0; /* Inicialmente oculto */
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    width: 100%;
    transition: all 0.3s ease;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-light);
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Estilos responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: var(--color-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.3s ease-in-out;
        z-index: 1001;
        overflow-y: auto;
        padding: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links-container {
        width: 100%;
        text-align: center;
        padding: 2rem 0;
    }

    .nav-links a {
        margin: 1.5rem 0;
        font-size: 1.2rem;
        display: block;
        padding: 0.5rem 0;
        color: white;
    }

    nav {
        background: rgba(29, 53, 87, 0.95);
        padding: 0.8rem 1.5rem;
        height: 80px;
        z-index: 1002;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }

    .logo {
        height: 55px;
        opacity: 1;
        display: block;
        position: relative;
        z-index: 1002;
    }

    .menu-toggle {
        padding: 0;
        transform: scale(1.2);
        position: relative;
        z-index: 1002;
    }
}

/* Ajustar para pantallas muy pequeñas */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .project-id {
        font-size: 0.8rem;
    }
}

/* Ajustar para pantallas medianas */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

/* Agregar clase para el menú hamburguesa activo */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Agregar comportamiento de scroll suave */
html {
    scroll-behavior: smooth;
}

.hero-content {
    text-align: left;
    padding: 0;
    margin: 0;
}

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Video Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.video-item {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Audio Control */
.audio-control {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.audio-control button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-control button:hover {
    transform: scale(1.1);
    background: var(--color-secondary);
}

.audio-control button i {
    font-size: 1.2rem;
}

/* Sections */
section {
    padding: 5rem 0;
    scroll-margin-top: 80px;
}

h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-primary);
}

/* Footer */
footer {
    background: var(--color-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

/* Agregar estos estilos */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
}

#startExperience {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-heading);
    margin-top: 1rem;
    transition: background 0.3s ease;
}

#startExperience:hover {
    background: var(--color-secondary);
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.modal-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 2rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-nav-button:hover {
    background: rgba(255,255,255,0.2);
}

.modal-prev {
    left: 2rem;
}

.modal-next {
    right: 2rem;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
}

/* Agregar estos estilos para los videos deshabilitados */
.video-disabled {
    position: relative;
}

.video-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
    pointer-events: none;
}

.video-disabled video {
    opacity: 0.7;
}

/* Ajustar el padding-top del main para compensar el nav fijo */
main {
    padding-top: 60px;
}

/* Estilos para el hero dividido */
.hero-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
    z-index: 2;
}

.hero-left {
    flex: 1;
    padding-right: 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: -5rem;
}

.hero-right {
    flex: 1;
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 200px;
    margin-bottom: 1.5rem;
}

.hero-video {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Estilos para la galería */
.gallery-section {
    padding: 5rem 0;
}

.gallery-group {
    margin-bottom: 5rem;
}

.gallery-group h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

/* Clase para mostrar el logo en el nav */
.show-nav-logo .logo {
    opacity: 1;
}

.show-nav-logo .nav-links {
    justify-content: flex-end;
    padding-right: 2rem;
}

/* Ajustes específicos para iPhone SE y dispositivos pequeños */
@media screen and (max-width: 375px) {
    .hero {
        width: 100%;
        left: 0;
        right: 0;
    }

    .hero-container {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .hero-content {
        padding: 0;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .hero-content p {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
}

/* Agregar soporte para notch en iPhones */
@supports (padding: max(0px)) {
    .hero {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.video-placeholder {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Mantener ratio 16:9 */
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-placeholder i {
    font-size: 3rem;
    color: #666;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-placeholder {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Mantener aspecto cuadrado */
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 8px;
}

.image-placeholder i {
    font-size: 2rem;
    color: #666;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.share-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.share-button i {
    color: white;
    font-size: 1rem;
}

.share-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.share-menu {
    position: absolute;
    bottom: 60px;
    right: 10px;
    background: rgba(29, 53, 87, 0.95);
    border-radius: 8px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.share-menu.active {
    display: flex;
}

.share-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.share-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Mantener solo los estilos básicos para el video de testimonio */
.video-grid-testimonios {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem 0;
}

.video-item-testimonio {
    position: relative;
    padding-bottom: 177.78% !important; /* Ratio 9:16 para video vertical */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-item-testimonio video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000; /* Fondo negro para los márgenes del video vertical */
}

/* Sección de testimonios */
.testimonios-section {
    padding: 5rem 0;
}

.testimonios-section .gallery-grid {
    max-width: 800px;
    margin: 3rem auto 0;
}

/* Ajustar espacio entre video y galería de testimonios */
.testimonios-section .video-grid-testimonios {
    margin-bottom: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .testimonios-section .gallery-grid {
        max-width: 100%;
        padding: 0 1rem;
    }
}

/* Ajustar el z-index de las imágenes ampliadas */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 80px 20px;
}

.lightbox img {
    max-width: 95%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    margin: auto;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Estilos para la sección de Aviso Radial */
.aviso-radial-section {
    padding: 4rem 0;
    background-color: var(--color-accent);
}

.aviso-radial-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-dark);
}

.audio-player-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.audio-player-container audio {
    width: 100%;
    height: 50px;
}

/* Estilos responsivos para la sección de aviso radial */
@media (max-width: 768px) {
    .aviso-radial-section {
        padding: 3rem 0;
    }

    .audio-player-container {
        margin: 0 1rem;
        padding: 1.5rem;
    }
} 