/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* ============================================
   ESTILOS DEL POPUP PREMIO Y FUEGOS ARTIFICIALES
   ============================================ */

#fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

#overlay-premio {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#popup-premio {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 90%;
    z-index: 1001;
}

@keyframes popIn {
    0% {
        transform: scale(0.3) rotate(-10deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

#popup-premio h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

#popup-premio .premio-titulo {
    color: white;
    font-size: 1.8em;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

#popup-premio .premio-ubicacion {
    color: white;
    font-size: 1.3em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#closeBtn {
    background: white;
    color: #f5576c;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#closeBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}

.trophy {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Responsive para popup */
@media (max-width: 768px) {
    #popup-premio {
        padding: 30px 40px;
    }

    #popup-premio h1 {
        font-size: 2em;
    }

    #popup-premio .premio-titulo {
        font-size: 1.4em;
    }

    #popup-premio .premio-ubicacion {
        font-size: 1.1em;
    }

    .trophy {
        font-size: 3em;
    }
}

@media (max-width: 480px) {
    #popup-premio {
        padding: 25px 30px;
    }

    #popup-premio h1 {
        font-size: 1.6em;
    }

    #popup-premio .premio-titulo {
        font-size: 1.2em;
    }

    #popup-premio .premio-ubicacion {
        font-size: 1em;
    }

    .trophy {
        font-size: 2.5em;
    }

    #closeBtn {
        padding: 10px 25px;
        font-size: 1em;
    }
}

/* Header Fijo */
.header-fijo {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 0.8rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fff;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: rotate(360deg) scale(1.1);
}

/* Título con letras dinámicas */
.titulo-dinamico {
    font-size: clamp(1rem, 3vw, 2rem);
    color: #fff;
    text-align: center;
    flex: 1;
    margin: 0 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.titulo-dinamico span {
    display: inline-block;
    animation: wave 1.5s ease-in-out infinite;
}

.titulo-dinamico span:nth-child(1) { animation-delay: 0s; }
.titulo-dinamico span:nth-child(2) { animation-delay: 0.1s; }
.titulo-dinamico span:nth-child(3) { animation-delay: 0.2s; }
.titulo-dinamico span:nth-child(4) { animation-delay: 0.3s; }
.titulo-dinamico span:nth-child(5) { animation-delay: 0.4s; }
.titulo-dinamico span:nth-child(6) { animation-delay: 0.5s; }
.titulo-dinamico span:nth-child(7) { animation-delay: 0.6s; }
.titulo-dinamico span:nth-child(8) { animation-delay: 0.7s; }
.titulo-dinamico span:nth-child(10) { animation-delay: 0.8s; }
.titulo-dinamico span:nth-child(11) { animation-delay: 0.9s; }
.titulo-dinamico span:nth-child(12) { animation-delay: 1s; }
.titulo-dinamico span:nth-child(13) { animation-delay: 1.1s; }
.titulo-dinamico span:nth-child(14) { animation-delay: 1.2s; }
.titulo-dinamico span:nth-child(15) { animation-delay: 1.3s; }

.espacio {
    width: 0.5rem;
}

@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Menú de navegación */
.menu {
    position: relative;
    flex-shrink: 0;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #fff;
    color: #fff;
    font-size: 1.8rem;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    line-height: 1;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.menu-lista {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.menu-item {
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    font-size: 0.95rem;
    display: block;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.menu-item:hover::before {
    width: 300px;
    height: 300px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Sección Inicio / Hero */
.seccion-inicio {
    margin-top: 80px;
    min-height: 60vh;
    background-image: url("img/fondoInicio.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 2rem;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Secciones de contenido */
.seccion-contenido {
    padding: 3rem 1rem;
    background: #fff;
}

.seccion-contenido.alt {
    background: #f9f9f9;
}

.contenedor {
    max-width: 1200px;
    margin: 0 auto;
}

.titulo-seccion {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #667eea;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.titulo-seccion::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.contenido-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.listas { 
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: #555;
}

.texto-contenido p {
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: #555;
}

.texto-contenido h3 {
    color: #667eea;
    margin: 2rem 0 1rem;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.texto-contenido h4 {
    color: #764ba2;
    margin: 1.5rem 0 1rem;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

.texto-contenido img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.galeria-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.galeria-fotos img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeria-fotos img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Video responsive */
.texto-contenido iframe {
    width: 100%;
    max-width: 560px;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 10px;
    margin: 1rem auto;
    display: block;
}

/* Tabla/Grilla de imágenes y descripciones */
.tabla-container {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.tabla-container h3 {
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: #667eea;
    margin-bottom: 2rem;
}

.grilla-tabla {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.fila-tabla {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fila-tabla:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.celda-imagen {
    overflow: hidden;
    width: 100%;
}

.celda-imagen img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fila-tabla:hover .celda-imagen img {
    transform: scale(1.1);
}

.celda-descripcion {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.celda-descripcion h4 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #667eea;
    margin-bottom: 1rem;
}

.celda-descripcion ul {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.7;
    color: #555;
    padding-left: 1.5rem;
}

.celda-descripcion ul li {
    margin-bottom: 0.5rem;
}

/* Carrusel */
.carrusel-container {
    margin-top: 3rem;
}

.carrusel-container h3 {
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: #667eea;
    margin-bottom: 2rem;
}

.carrusel {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.carrusel-slides {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    top: 0;
    left: 0;
}

.slide.active {
    opacity: 1;
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: clamp(1.5rem, 3vw, 2rem);
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 5px;
    line-height: 1;
}

.carrusel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carrusel-btn.prev {
    left: 10px;
}

.carrusel-btn.next {
    right: 10px;
}

.carrusel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #667eea;
    transform: scale(1.3);
}

.indicator:hover {
    background: #764ba2;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 2rem 1rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-seccion h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.footer-seccion p {
    margin-bottom: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-seccion a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-seccion a:hover {
    color: #2ecc71;
    text-decoration: underline;
}

.integrantes-lista {
    list-style: none;
}

.integrantes-lista li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 15px;
    background: #25D366;
    color: #fff !important;
    border-radius: 25px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-top: 5px;
}

.whatsapp-link::before {
    content: "📱";
    font-size: 1.2rem;
}

.whatsapp-link:hover {
    background: #128C7E;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}


/* Footer */
/*.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 3rem 2rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-seccion h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-seccion p {
    margin-bottom: 0.5rem;
}

.footer-seccion a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-seccion a:hover {
    color: #2ecc71;
    text-decoration: underline;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 15px;
    background: #25D366;
    color: #fff !important;
    border-radius: 25px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-top: 5px;
}

.whatsapp-link::before {
    content: "📱";
    font-size: 1.2rem;
}

.whatsapp-link:hover {
    background: #128C7E;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.integrantes-lista {
    list-style: none;
}

.integrantes-lista li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
}
*/
/* Responsive Design */

/* Tablets y desktop */
@media (min-width: 768px) {
    .contenido-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .fila-tabla {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .celda-descripcion {
        padding: 2rem;
    }

    .footer-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .header-container {
        padding: 0 2rem;
    }

    .logo {
        width: 60px;
        height: 60px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .header-fijo {
        padding: 0.5rem 0;
    }

    .header-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .titulo-dinamico {
        order: 1;
        flex: 0 0 100%;
        margin: 0.5rem 0;
        font-size: 1.2rem;
    }

    .logo-container {
        order: 0;
    }

    .menu {
        position: static;
        order: 2;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-lista {
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        border-radius: 0;
        gap: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .menu-lista.active {
        max-height: 500px;
    }

    .menu-item {
        text-align: center;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
        font-weight: 600;
        background: transparent;
        width: 100%;
        display: block;
        color: #fff;
    }

    .menu-item:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: none;
        box-shadow: none;
    }

    .menu-item::before {
        display: none;
    }

    .menu-item:last-child {
        border-bottom: none;
    }

    .seccion-inicio {
        margin-top: 90px;
    }

    .seccion-inicio {
        margin-top: 70px;
    }

    .galeria-fotos {
        grid-template-columns: 1fr;
    }

    .galeria-fotos img {
        height: 250px;
    }

    .listas {
        margin-left: 1.5rem;
    }

    .carrusel-btn {
        padding: 0.5rem 0.8rem;
    }

    .carrusel-btn.prev {
        left: 5px;
    }

    .carrusel-btn.next {
        right: 5px;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .header-container {
        padding: 0 0.4rem;
    }

    .titulo-dinamico {
        margin: 0.5rem 0.3rem;
        font-size: 1rem;
    }

    .espacio {
        width: 0.3rem;
    }

    .logo {
        width: 45px;
        height: 45px;
    }

    .menu-toggle {
        font-size: 1.5rem;
        padding: 0.4rem 0.9rem;
    }

    .menu-lista {
        top: 80px;
    }

    .menu-item {
        padding: 1rem 1rem;
        font-size: 1rem;
    }

    .seccion-inicio {
        margin-top: 80px;
    }

    .seccion-contenido {
        padding: 2rem 0.8rem;
    }

    .galeria-fotos {
        gap: 0.8rem;
    }

    .galeria-fotos img {
        height: 200px;
    }
}
/* ============================================
   SOLUCIÓN HEADER EN ORIENTACIÓN HORIZONTAL
   ============================================ */

/* Botón toggle oculto por defecto */
.header-toggle-btn {
    display: none;
}

/* Detectar orientación landscape (horizontal) */
@media (orientation: landscape) and (max-height: 600px) {
    
    /* Ocultar el header por defecto en landscape */
    .header-fijo {
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    /* Mostrar header cuando tenga la clase 'visible' */
    .header-fijo.visible {
        transform: translateY(0);
    }
    
    /* Ajustar margen de la sección inicio */
    .seccion-inicio {
        margin-top: 0 !important;
    }
    
    /* Botón flotante para mostrar/ocultar header */
    .header-toggle-btn {
        display: block;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1001;
        background: rgba(102, 126, 234, 0.9);
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        line-height: 1;
    }
    
    .header-toggle-btn:hover {
        background: rgba(118, 75, 162, 0.9);
        transform: scale(1.1);
    }
    
    .header-toggle-btn:active {
        transform: scale(0.95);
    }
    
    /* Ajustar el menú desplegable en landscape */
    .menu-lista {
        top: 0;
    }
    
    .menu-lista.active {
        top: 70px;
    }
}

/* Para dispositivos muy pequeños en landscape */
@media (orientation: landscape) and (max-height: 450px) {
    
    .header-fijo.visible {
        padding: 0.3rem 0;
    }
    
    .header-container {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }
    
    .logo {
        width: 30px;
        height: 30px;
    }
    
    .titulo-dinamico {
        font-size: 0.8rem;
    }
    
    .menu-item {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .header-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        top: 8px;
        right: 8px;
    }
}