/* =========================================
   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%; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); }

.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;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    animation: pulseGold 2s infinite;
}

@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;
}