@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Open+Sans:wght@400;600;700&display=swap');

/* --- 2. Estilos generales y reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
    overflow-x: hidden; /* Evita el desplazamiento horizontal */
    min-height: 100vh; /* Usa min-height para que el body crezca, pero ocupe al menos el viewport */
    display: flex; /* Añadido para layout de la página completa */
    flex-direction: column; /* Organiza header, main, footer en columna */
}

/* --- 3. Tipografía y elementos básicos (sin cambios sustanciales aquí) --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka One', cursive;
    color: #222;
    margin-bottom: 0.8em;
    text-align: center;
    font-weight: 400;
}

h1 { font-size: 3.5em; }
h2 { font-size: 2.5em; }
h3 { font-size: 2em; }

p {
    font-size: 1.1em;
    margin-bottom: 1em;
}

ul { list-style: none; }
li { font-size: 1.1em; }

/* --- 4. Clases de utilidad (sin cambios sustanciales aquí) --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 25px 20px;
}

.color-acento { color: #6a0dad; }

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: #444;
}

/* --- 5. Estilos de botones generales (sin cambios sustanciales aquí) --- */
.btn-primary {
    font-size: 1.15em;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    color: white;
    background-color: #6a0dad;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #5a0a99;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* --- 6. HEADER --- */
header {
    background-color: #FFD700;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000; /* Asegurado */
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 25px;
}

header .logo-link { /* Nuevo contenedor para logo e imagen */
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px; /* Margen para cuando están apilados */
}

header .foto1 {
    height: 100px;
    width: auto;
    margin-right: 10px; /* Espacio entre imagen y texto del logo */
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: cover;
}

header .logo {
    font-weight: 700;
    color: #333;
    font-size: 1.8em;
    font-family: 'Fredoka One', cursive;
    margin: 0; /* Reiniciar margen */
}

header nav {
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 5px;
}

header nav a {
    padding: 6px 12px;
    text-decoration: none;
    font-weight: 600;
    color: #444;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
    margin: 5px 0;
}

header nav a:hover {
    color: white;
    background-color: #6a0dad;
}

/* --- 7. SECCIÓN DE TEMÁTICAS --- */
main { /* Añadido para envolver todas las secciones principales */
    flex-grow: 1; /* Permite que main ocupe el espacio restante entre header y footer */
}

.thematics-section {
    padding-top: 190px;
    padding-bottom: 70px;
    background-color: #fefefe;
}

.product-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-items: center;
    margin-bottom: 50px;
}

.category-item {
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 20px;
    text-align: center;
    background-color: white;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.image-placeholder {
    width: 100%;
    height: 180px;
    background-color: #e8e8e8;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.category-item:hover .image-placeholder img {
    transform: scale(1.05);
}

.theme-text {
    font-size: 1.4em;
    font-weight: 700;
    color: #444;
    margin-top: 10px;
    font-family: 'Fredoka One', cursive;
}

.price {
    font-weight: bold;
    color: #28a745;
    margin-top: 10px;
    font-size: 1.2em;
    text-align: center;
}

/* --- 8. SECCIÓN DE GALERÍA DE FOTOS (DETALLES DE MESA) --- */
#detalles-mesa {
    padding: 70px 20px;
    background-color: #fdfdfd;
    border-bottom: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 40px;
    text-align: center;
}

#detalles-mesa h2 {
    margin-bottom: 30px;
    color: #333;
}

#detalles-mesa p {
    margin-bottom: 35px;
    font-size: 1.05em;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    justify-items: center;
}

.photo-item {
    border: 1px solid #eee;
    width: 100%;
    max-width: 300px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative; /* Añadido para posicionar photo-price */
    flex-direction: column; /* Para apilar imagen y precio */
}

.photo-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Estilo para el precio en la miniatura de la galería */
.photo-price {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo semi-transparente */
    color: white;
    padding: 8px 5px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-sizing: border-box;
}


/* --- 9. SECCIÓN DE REALIDAD AUMENTADA (QR) --- */
#ar-section {
    display: none;
}

/* --- 10. SECCIÓN DEL FORMULARIO DE CONTACTO --- */
#contact-form-section {
    background-color: #f3f3f3;
    padding: 80px 20px;
    margin-top: 40px;
}

#contact-form-section h2 {
    color: #333;
    margin-bottom: 45px;
}

#event-form {
    max-width: 600px;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    background-color: white;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1em;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select,
.form-group input[type="direccion"] { /* Agregado para el input de dirección */
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}


.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #6a0dad;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.15);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

#event-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 1.25em;
    background-color: #6a0dad;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 700;
}

#event-form button[type="submit"]:hover {
    background-color: #5a0a99;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

/* --- 11. FOOTER --- */
.pie-pagina {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center; /* Centra el texto por defecto en el footer */
    margin-top: auto; /* Empuja el footer hacia abajo */
}

.pie-pagina .container {
    display: flex;
    flex-direction: column; /* Por defecto apilados y centrados */
    justify-content: center;
    align-items: center; /* Centra los items horizontalmente */
    gap: 25px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pie-pagina .box {
    margin-bottom: 0;
    width: 90%;
    max-width: 300px;
    text-align: center; /* Centra el texto dentro de cada caja */
    /* Añadimos flexbox para los elementos internos de cada box para un mejor control del centrado */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pie-pagina h2 {
    color: #FFD700;
    font-size: 1.6em;
    margin-bottom: 15px;
    font-family: 'Fredoka One', cursive;
    text-align: center; /* Asegura que el título también esté centrado */
}

.pie-pagina p {
    margin: 5px 0;
    color: #ccc;
    font-size: 0.95em;
    text-align: center; /* Centra el texto de los párrafos */
}

.pie-pagina .redes-sociales {
    margin-top: 15px;
    display: flex;
    justify-content: center; /* Centra los iconos horizontalmente */
    gap: 15px;
}

.pie-pagina .redes-sociales a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    background-color: #6a0dad;
    font-size: 1.5em;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pie-pagina .redes-sociales a:hover {
    background-color: #FFD700;
    color: #333;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pie-pagina .grupo-2 {
    margin-top: 25px;
    color: #999;
    font-size: 0.85em;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- MODAL (Fondo Oscuro) --- */
.modal {
    display: none; /* Oculto por defecto, JavaScript lo cambiará a 'flex' */
    position: fixed;
    z-index: 10000; /* Asegurado para que esté por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center; /* Estas propiedades se aplicarán cuando JavaScript cambie el display a 'flex' */
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

/* Contenido del modal */
.modal-content {
    background-color: #fefefe;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop;
    animation-duration: 0.4s;
    position: relative;
    border-radius: 8px;
    max-height: calc(100vh - 40px); /* Ajusta max-height para el padding del modal */
    overflow-y: auto; /* Permite scroll interno si el contenido es demasiado alto */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Animación para el modal */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

/* Botón de cerrar */
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    z-index: 1; /* Asegura que el botón de cerrar esté por encima de otros elementos del modal-content */
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
}

/* Contenedor del cuerpo del modal (imagen/video, precio y QR/botones) */
.modal-body-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

/* Video dentro del modal (responsivo con 16:9 aspect ratio) */
.video-container {
    display: none;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 10px;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Imagen dentro del modal */
#modal-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Ajuste para el título del modal */
#modal-title {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 2em;
}

/* Precio dentro del modal */
.modal-price {
    font-size: 1.3em;
    font-weight: bold;
    color: #6a0dad;
    margin-top: 15px;
    text-align: center;
    padding: 8px 15px;
    background-color: #f0e6ff;
    border-radius: 5px;
}

/* Nuevo contenedor para agrupar QR y botones */
.qr-and-buttons-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

/* Contenedor del QR */
.qr-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.qr-text {
    margin: 0;
    font-weight: bold;
    color: #333;
    font-size: 0.9em;
}

#modal-qr-image {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    padding: 5px;
    background-color: white;
    border-radius: 5px;
}

/* Estilos para el botón de WhatsApp (y el de seleccionar paquete si aplica) */
.whatsapp-button {
    background-color: #25D366;
    color: white;
    padding: 16px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    max-width: 320px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.select-package-button { /* Estilo específico para este botón */
    background-color: #6a0dad; /* Color secundario, por ejemplo */
}

.select-package-button:hover {
    background-color: #5a0a99;
}

.whatsapp-button:hover {
    background-color: #1DA851;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.whatsapp-button:active{
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.whatsapp-button:hover::before{
    left: 125%;
    opacity: 1;
}

.whatsapp-button i {
    font-size: 1.4em;
    transform: rotate(0deg);
    transition: transform 0.3s ease-in-out;
}

.whatsapp-button:hover i {
    transform: rotate(5deg);
}


/* --- MEDIA QUERIES --- */

/* Ajustes para Móviles Pequeños (e.g., iPhone SE, Androids antiguos) */
@media (max-width: 599px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.5em; }
    p { font-size: 1em; }

    header .foto1 {
        height: 70px;
    }
    header .logo {
        font-size: 1.6em;
    }
    header nav a {
        font-size: 0.9em;
        padding: 5px 8px;
    }
    .thematics-section {
        padding-top: 140px;
    }

    .product-categories, .photo-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-item, .photo-item {
        max-width: 90%;
        width: 100%;
        margin: 0 auto;
    }
    .image-placeholder {
        height: 150px;
    }
    .photo-item {
        height: 180px;
    }

    /* Ajustes del formulario */
    #event-form {
        padding: 20px;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 0.95em;
    }
    #event-form button[type="submit"] {
        padding: 12px;
        font-size: 1.05em;
    }

    /* Ajustes del Modal para pantallas pequeñas */
    .modal-content {
        padding: 15px;
        width: 95%;
        max-height: calc(100vh - 30px); /* Ajustado para el padding del modal */
    }
    #modal-title {
        font-size: 1.6em;
    }
    .modal-body-content {
        flex-direction: column;
        gap: 15px;
    }
    #modal-image {
        max-width: 80%;
    }
    #modal-qr-image {
        max-width: 100px;
    }
    .modal-price {
        font-size: 1.1em;
        padding: 6px 10px;
    }

    .whatsapp-button, .select-package-button {
        font-size: 1em;
        padding: 12px 25px;
        gap: 8px;
    }
    .whatsapp-button i {
        font-size: 1.2em;
    }

    /* Footer en móviles: asegurar centrado */
    .pie-pagina .container {
        flex-direction: column;
        align-items: center;
    }
    .pie-pagina .box {
        text-align: center;
        align-items: center;
    }
    .pie-pagina .redes-sociales {
        justify-content: center;
    }
}

/* Ajustes para Tabletas (600px a 949px) */
@media (min-width: 600px) and (max-width: 949px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2.2em; }
    h3 { font-size: 1.8em; }

    header .foto1 {
        height: 90px;
    }
    header .logo {
        font-size: 1.7em;
    }
    header nav {
        flex-direction: row;
        margin-top: 10px;
        gap: 15px;
    }
    header nav a {
        padding: 7px 14px;
        margin: 0;
    }
    .thematics-section {
        padding-top: 170px;
    }

    .product-categories {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    /* Ajustes del Modal para tabletas */
    .modal-content {
        max-height: calc(100vh - 40px); /* Ajustado para el padding del modal */
    }

    /* Footer en tabletas: asegurar centrado */
    .pie-pagina .container {
        flex-direction: row; /* Aquí sí los puedes poner en fila */
        justify-content: space-around;
        align-items: flex-start; /* Alinea los bloques arriba para consistencia */
        flex-wrap: wrap;
        text-align: center; /* Centra el texto dentro del container, aplicable a los box */
    }

    .pie-pagina .box {
        flex: 1;
        min-width: 200px;
        max-width: 30%;
        padding: 0 10px;
        /* Para que los elementos dentro de box se centren también en tablet */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .pie-pagina .redes-sociales {
        justify-content: center; /* Centra los iconos */
    }
}

/* Escritorio y Pantallas Grandes (min-width: 950px) */
@media (min-width: 950px){
    header .container {
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 30px;
    }

    header .logo-link {
        margin-bottom: 0; /* Elimina margen al pasar a horizontal */
    }

    header .foto1 {
        height: 85px;
        margin-bottom: 0;
        margin-right: 15px;
    }

    header .logo {
        margin-right: auto;
        font-size: 1.9em;
        margin-bottom: 0;
    }

    header nav {
        flex-direction: row;
        margin-top: 0;
    }

    header nav a {
        padding: 8px 15px;
        margin: 0 8px;
    }

    .thematics-section {
        padding-top: 150px;
    }

    /* Diseño del Modal para pantallas grandes */
    .modal-body-content {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 40px;
        flex-wrap: nowrap;
    }

    #modal-image {
        max-width: 50%;
        margin-bottom: 0;
    }

    .video-container {
        max-width: 50%;
        margin-bottom: 0;
    }

    .qr-and-buttons-group {
        max-width: 40%;
        align-items: center;
        margin-top: 0;
    }

    /* Footer para escritorio */
    .pie-pagina .container {
        display: flex;
        justify-content: space-around;
        align-items: flex-start;
        flex-wrap: nowrap;
        text-align: center; /* Asegura que el texto se centre en cada caja del footer */
        flex-direction: row; /* Los boxes en fila */
    }

    .pie-pagina .box {
        margin-bottom: 0;
        padding: 0 15px;
        width: auto;
        flex: 1;
        /* Aseguramos que los elementos internos de cada box se centren */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .pie-pagina .redes-sociales {
        justify-content: center; /* Centra los iconos en escritorio también */
    }
}
.video-flyer {
  width: 100%;
  max-width: 100%;
  margin-top: 250px;      /* <-- ESTA LÍNEA NUEVA */
  margin-bottom: 20px;
  text-align: center;
}

.video-flyer video {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}