/* =========================================
   ESTILOS DE RESTAURANTES Y MENÚS
   ========================================= */

/* 1. Cuadrícula de Restaurantes */
.restaurants { padding: 4rem 0; background-color: #0a0a0a; }

.search-container {
  display: flex; justify-content: center; margin-bottom: 2rem;
  width: 100%; max-width: 600px; margin-left: auto; margin-right: auto;
}
.search-container input {
  width: 60%; padding: 12px; border: 1px solid #444; background-color: #1a1a1a;
  color: #ffffff; border-radius: 4px 0 0 4px;
}
.search-container button {
  background-color: #d4af37; color: #000000; border: none; padding: 12px 20px;
  border-radius: 0 4px 4px 0; cursor: pointer;
}

.restaurant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }

.restaurant-card {
  border-radius: 50px 8px 8px 50px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100px; display: flex;
  align-items: center; cursor: pointer; position: relative;
  background-color: rgba(20, 20, 20, 0.95); border: 2px solid #d4af37;
}
.restaurant-card:hover {
  transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.5);
  border-color: #f4d03f;
}

.restaurant-image {
  width: 100px; height: 100px; border-radius: 50%; overflow: hidden;
  border: 3px solid #d4af37; flex-shrink: 0; transition: transform 0.3s ease, border-color 0.3s ease;
}
.restaurant-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.restaurant-card:hover .restaurant-image img { transform: scale(1.1); }

.restaurant-content { padding: 0 15px; color: #ffffff; text-align: left; flex-grow: 1; }
.restaurant-content h3 { font-size: 1.2rem; margin-bottom: 5px; color: #ffffff; }
.restaurant-description { color: #cccccc; font-size: 0.9rem; margin: 0; opacity: 0.9; }

/* 2. Modal y Slideshow */
.modal {
  display: none; position: fixed; z-index: 1100; left: 0; top: 0;
  width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.95);
}
.modal-content {
  background-color: #0a0a0a; margin: 0; padding: 0; border-radius: 0;
  width: 100%; max-width: 100%; height: 100vh; overflow-y: auto; overflow-x: hidden;
  position: relative; color: #ffffff;
}
.modal-content:hover { scrollbar-width: thin; scrollbar-color: #d4af37 #0a0a0a; }

.fullscreen-slideshow {
  position: relative; width: 100vw; height: 100vh; overflow: hidden; background-color: #0a0a0a;
}
.slideshow-container { position: relative; width: 100%; height: 100%; }

/* --- MODIFICADO PARA TRANSICIÓN RÁPIDA (0.5s) --- */
/* =========================================
   EN restaurant.css - REEMPLAZA ESTO
   ========================================= */

.slide { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    
    /* Fondo negro de seguridad y ajuste de imagen */
    background-color: #000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Estado invisible por defecto */
    opacity: 0; 
    z-index: 1; /* Nivel bajo */
    
    /* TRANSICIÓN: 1.2 segundos para que sea muy suave (Cine) */
    transition: opacity 1.2s ease-in-out; 
}

/* CLASE ACTIVA: Se vuelve visible y sube de nivel */
.slide.active { 
    opacity: 1 !important; 
    z-index: 3; /* La imagen activa siempre está arriba del todo */
}

/* CLASE TRUCO: Mantiene la imagen vieja visible un momento mientras entra la nueva */
.slide.last-active {
    opacity: 1 !important;
    z-index: 2; /* Se queda debajo de la nueva (z-index 3) pero encima del fondo */
}

.slide-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.4); /* Un poco más claro para lucir las fotos */
    z-index: 4; /* Encima de todas las fotos */
    pointer-events: none;
}

/* La etiqueta img ya no es necesaria con background-image, pero se deja por compatibilidad */
.slide img { width: 100%; height: 100%; object-fit: cover; display: none; } 

.slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 3; }

.restaurant-title-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; z-index: 10; color: white; background-color: transparent; padding: 30px;
}
.restaurant-title-overlay h1 { font-size: 4rem; font-weight: bold; margin-bottom: 1rem; color: #d4af37; }
.restaurant-title-overlay p { font-size: 1.5rem; opacity: 0.9; }

.slide-indicators { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.indicator { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); cursor: pointer; transition: all 0.3s ease; }
.indicator.active { background: #d4af37; transform: scale(1.2); }

.restaurant-content-below { background-color: #0a0a0a; min-height: 100vh; padding: 2rem 0; }

/* 3. Detalles del Restaurante y Menú */
.restaurant-detail-content h2 { font-family: "Tempus Sans ITC", serif; font-size: 2.5rem; color: #d4af37; margin-bottom: 1.5rem; }

.restaurant-history, .restaurant-info {
  margin: 2rem auto; width: 100%; text-align: center; padding: 1.5rem;
  background-color: #1a1a1a; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid #333; border-radius: 8px;
}
.restaurant-history h3 { font-size: 1.8rem; color: #d4af37; margin-bottom: 1rem; }
.restaurant-history p { font-size: 1.1rem; line-height: 1.8; color: #cccccc; }

.info-item { margin-bottom: 0.5rem; }
.info-label { font-weight: bold; color: #d4af37; margin-right: 0.5rem; }

.menu-section { margin: 0; padding: 20px; width: 100%; }
.menu-section h3 { font-size: 2.2rem; color: #d4af37; text-align: center; margin-bottom: 2rem; }

.menu-category-section { width: 100%; margin-bottom: 2rem; }
.menu-category-section h4 {
  font-size: 1.5rem; color: #ffffff; border-bottom: 2px solid #d4af37;
  padding-bottom: 0.5rem; margin-bottom: 1.5rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.menu-category-section h4:after { content: "\f078"; font-family: "Font Awesome 5 Free"; font-weight: 900; transition: transform 0.3s ease; }
.menu-category-section h4.active:after { transform: rotate(180deg); }

.menu-list { display: none; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.menu-list.active { display: grid; }

.menu-item-simple {
  background-color: #1a1a1a; padding: 1.2rem; border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5); transition: transform 0.3s ease; border: 1px solid #333;
}
.menu-item-simple:hover { transform: translateY(-5px); border-color: #d4af37; }
.menu-item-name { font-size: 1.2rem; font-weight: 600; color: #ffffff; }
.menu-item-description { font-size: 0.95rem; color: #cccccc; margin-top: 0.5rem; }

.back-to-restaurants {
  position: fixed; top: 20px; right: 20px; background-color: #d4af37;
  color: #000000; border: none; border-radius: 50%; width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  z-index: 1200; box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3); transition: all 0.3s ease;
}
.back-to-restaurants:hover { background-color: #b8941f; transform: translateY(-2px); }

/* Búsqueda y Resultados */
.dish-result-item {
  background-color: #1a1a1a; border-radius: 8px; padding: 1.5rem; margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; border: 1px solid #333;
}
.dish-result-item .restaurant-name { font-weight: bold; color: #d4af37; margin-top: 0.5rem; }
.dish-result-item .view-restaurant-btn {
  align-self: flex-start; margin-top: 1rem; padding: 0.5rem 1rem;
  background-color: #d4af37; color: #000000; border: none; border-radius: 4px; cursor: pointer;
}

/* Resaltado */
.highlight-category { border-left: 4px solid #d4af37; padding-left: 10px; }
.highlight-dish {
  background-color: rgba(212, 175, 55, 0.2); border-left: 4px solid #d4af37;
  transform: translateY(-2px); box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}
.highlight-dish .menu-item-name { color: #d4af37; font-weight: bold; }

/* Rating Stars */
.star { font-size: 2em; cursor: pointer; color: #ccc; }
.star.selected { color: #f39c12; }

/* =========================================
   NUEVO LAYOUT DEL MODAL (SIDEBAR + MENU)
   ========================================= */

/* Contenedor principal dividido en dos columnas */
.restaurant-modal-grid {
    display: flex;
    gap: 40px;            /* Espacio entre la barra lateral y el menú */
    align-items: flex-start;
    padding-top: 30px;
    position: relative;
}

/* Barra Lateral Izquierda (Botón e Info) */
.modal-sidebar {
    flex: 0 0 280px;      /* Ancho fijo de la barra lateral */
    background-color: #141414;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #333;
    position: sticky;     /* Hace que se quede fija al bajar */
    top: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Estilo del Botón en la barra lateral */
.btn-rating-sidebar {
    width: 100%;
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    /* --- ARREGLO DE COLOR AQUÍ --- */
    background-color: #d4af37;  /* Fondo Dorado */
    color: #000000;             /* Texto Negro */
    border: none;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    /* ----------------------------- */

    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    animation: pulseGold 2s infinite;
    transition: transform 0.2s;
}

.btn-rating-sidebar:hover {
    transform: scale(1.05);
    background-color: #f4d03f; /* Un dorado más brillante al pasar el mouse */
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* Información de contacto en la barra lateral */
.sidebar-info {
    text-align: left;
    border-top: 1px solid #333;
    padding-top: 20px;
}
.sidebar-info .info-item {
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.sidebar-info .info-label {
    display: block;
    color: #d4af37;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Contenido Principal Derecha (Menú e Historia) */
.modal-main-content {
    flex: 1; /* Ocupa todo el espacio restante */
}

/* RESPONSIVE: En celulares, poner uno debajo del otro */
@media screen and (max-width: 900px) {
    .restaurant-modal-grid {
        flex-direction: column;
    }
    .modal-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 30px;
        order: -1; /* Asegura que salga antes del menú en móviles */
    }
}

/* =========================================
   ESTILOS DE PUNTUACIÓN EN SIDEBAR
   ========================================= */
.sidebar-rating-container {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.rating-big-score {
    font-size: 3.5rem;
    font-weight: 700;
    color: #d4af37;
    line-height: 1;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.rating-stars-display {
    color: #d4af37;
    font-size: 1.2rem;
    margin: 5px 0;
}
.rating-stars-display .fa-star.empty {
    color: #444;
}

.rating-count-label {
    color: #cccccc;
    font-size: 0.9rem;
    opacity: 0.8;
}


/* =========================================
   BOTÓN GOOGLE MAPS (Agregado)
   ========================================= */
.btn-google-maps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background-color: transparent;
    color: #d4af37; /* Dorado */
    border: 1px solid #d4af37;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-google-maps:hover {
    background-color: #d4af37;
    color: #000000; /* Texto negro al pasar el mouse */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.btn-google-maps i {
    font-size: 1.1rem;
}

/* =========================================
   ACORDEÓN DEL MENÚ (EXPANDIR / MINIMIZAR)
   ========================================= */

/* Estilo para el título de la categoría (Clickable) */
.menu-category-section h4 {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
    user-select: none;
    transition: color 0.3s;
}

/* Flechita animada usando CSS puro (::after) */
.menu-category-section h4::after {
    content: '\f078'; /* Código FontAwesome para flecha abajo */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

/* Cuando está activo (Abierto) */
.menu-category-section h4.active {
    color: #d4af37; /* Dorado */
}

/* Girar la flecha */
.menu-category-section h4.active::after {
    transform: translateY(-50%) rotate(180deg);
}

/* La lista de platos */
.menu-list {
    display: none; /* Oculto por defecto */
    animation: fadeInMenu 0.4s ease;
}

/* Mostrar cuando tiene la clase active */
.menu-list.active {
    display: grid !important; /* Forzamos el grid */
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}