/* styles.css - Estilo mejorado y colores armonizados con mejoras para la galería */
:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #CD853F;
    --light-accent: #DEB887;
    --text-color: #3E2723;
    --background-color: #FFF8E1;
    --section-bg: #FFFFFF;
    --price-color: #8B4513;
    --border-color: #DEB887;
    --message-bg: #8B4513;
    --message-text: #FFFFFF;
    --ticker-bg: #8B4513;
    --ticker-text: #FFFFFF;
    --shadow-color: rgba(139, 69, 19, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.4;
    overflow: hidden; /* Prevenir scroll en TV */
    background-image: linear-gradient(to bottom, rgba(255, 248, 225, 0.8), rgba(255, 248, 225, 0.9)), 
                      url('https://via.placeholder.com/1920x1080/8B4513/FFFFFF?text=');
    background-size: cover;
    background-position: center;
}

.tv-container {
    width: 100vw;
    height: 100vh;
    padding: 2vh 2vw;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 1vh;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px var(--shadow-color);
    border: 3px solid var(--light-accent);
}

.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

.title {
    color: var(--primary-color);
    font-size: 5vh;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px var(--shadow-color);
    font-family: 'Playfair Display', serif;
    position: relative;
}

.title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

/* Barra de mensajes */
.message-bar {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--primary-color));
    color: var(--message-text);
    padding: 1vh 2vw;
    margin-bottom: 1vh;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: 5vh;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.message-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.message {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2vh;
    font-weight: 700;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.message.active {
    opacity: 1;
    transform: translateY(0);
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1vh; /* Reducido de 2vh para dar más espacio a la galería */
    overflow: hidden;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2vw;
    height: 60vh;
}

.menu-column {
    display: flex;
    flex-direction: column;
    gap: 2vh;
}

.menu-section {
    background-color: var(--section-bg);
    border-radius: 10px;
    box-shadow: 0 6px 12px var(--shadow-color);
    overflow: hidden;
    height: fit-content;
    border: 1px solid var(--light-accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.section-title {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5vh 1vw;
    font-size: 2.2vh;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.menu-items {
    padding: 1.5vh 1vw;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vh 0;
    position: relative;
}

.item-name {
    color: var(--text-color);
    font-weight: 700;
    font-size: 2vh;
    position: relative;
    z-index: 1;
    background-color: var(--section-bg);
    padding-right: 0.5vw;
}

.item-name::before {
    content: "•";
    color: var(--secondary-color);
    margin-right: 0.5vw;
    font-size: 2.2vh;
}

.price {
    color: var(--price-color);
    font-weight: 900;
    font-size: 2vh;
    position: relative;
    z-index: 1;
    background-color: var(--section-bg);
    padding-left: 0.5vw;
}

.item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50%;
    border-bottom: 2px dotted var(--border-color);
    z-index: 0;
}

/* Galería de imágenes MEJORADA */
.gallery-container {
    height: 30vh; /* Aumentado desde 25vh para dar más espacio a las imágenes */
    margin-top: 1vh;
}

.gallery-title {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5vh 1vw; /* Reducido de 1vh para dar más espacio a las imágenes */
    font-size: 1.8vh; /* Reducido de 2.2vh */
    text-align: center;
    font-weight: 700;
    border-radius: 10px 10px 0 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1; /* Añadido para reducir altura */
    height: 2.5vh; /* Fijado explícitamente */
}

.multi-gallery {
    position: relative;
    height: calc(30vh - 2.5vh - 10px); /* Nueva fórmula: total - título - margen */
    background-color: var(--section-bg);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    box-shadow: 0 6px 12px var(--shadow-color);
    border: 1px solid var(--light-accent);
    border-top: none;
    padding: 5px; /* Reducido de 10px */
}

/* Para usar cuando se quiera eliminar completamente el título */
.multi-gallery.full-height {
    height: calc(30vh - 10px);
    border-radius: 10px;
    border-top: 1px solid var(--light-accent);
}

.gallery-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.8s ease;
}

.gallery-slide {
    min-width: calc(100% / var(--slides-per-view));
    height: 100%;
    padding: 0 3px; /* Reducido de 10px */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-frame {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
    border: 1px solid var(--light-accent); /* Reducido de 2px */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.2), transparent);
    z-index: 1;
}

.image-frame:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Asegura que la imagen esté centrada */
    transition: transform 0.3s ease, filter 0.3s ease; /* Mejora la transición */
}

.gallery-slide:hover img {
    transform: scale(1.1);
    filter: brightness(1.1); /* Mejora visual al hacer hover */
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 6px; /* Reducido de 10px */
    margin-top: 3px; /* Reducido de 10px */
}

.indicator {
    width: 8px; /* Reducido de 12px */
    height: 8px; /* Reducido de 12px */
    border-radius: 50%;
    background-color: rgba(139, 69, 19, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 0 3px;
}

.indicator:hover {
    transform: scale(1.2);
}

.indicator.active {
    background-color: var(--primary-color);
}

/* Ticker de mensajes estilo TV */
.ticker-container {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color), var(--primary-color));
    color: var(--ticker-text);
    height: 5vh;
    margin-top: 1vh;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.ticker-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker-content {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker 60s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 30px;
    font-size: 2.2vh;
    font-weight: 700;
}

.ticker-item::after {
    content: "♦";
    margin-left: 30px;
    color: var(--light-accent);
}

.ticker-item:last-child::after {
    content: "";
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Estilos para la pantalla de inicio con logo grande */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.splash-logo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: contain;
    background-color: white;
    padding: 20px;
    margin-bottom: 30px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.splash-logo:hover {
    transform: scale(1.05);
}

.splash-text {
    color: white;
    font-size: calc(24px * var(--font-size-base));
    text-align: center;
    max-width: 80%;
    margin-bottom: 20px;
}

.splash-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.splash-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: calc(18px * var(--font-size-base));
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.splash-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Botón flotante para control de audio */
.audio-control {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9999;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.audio-control:hover {
    background-color: var(--secondary-color);
}

/* Botón flotante para control de pantalla completa */
.fullscreen-control {
    position: fixed;
    top: 20px;
    right: 80px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9999;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.fullscreen-control:hover {
    background-color: var(--secondary-color);
}

/* Botón flotante para control de tamaño de fuente */
.font-size-control {
    position: fixed;
    top: 20px;
    right: 140px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9999;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.font-size-control:hover {
    background-color: var(--secondary-color);
}

/* Menú de tamaño de fuente */
.font-size-menu {
    position: fixed;
    top: 80px;
    right: 140px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding: 10px;
    z-index: 9999;
    display: none;
}

.font-size-menu.active {
    display: block;
}

.font-size-option {
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.font-size-option:hover {
    background-color: #f0f0f0;
}

.font-size-option.active {
    background-color: var(--primary-color);
    color: white;
}

/* Asegurar que todo sea visible en la pantalla sin scroll */
@media (max-height: 768px) {
    .item-name, .price {
        font-size: 1.8vh;
    }
    
    .section-title {
        font-size: 2vh;
    }
}