:root {
    --p: #000;
    --b: #f8f8f8;
    --t: #333;
    --w: #fff;
    --s: 0 2px 10px rgba(0, 0, 0, .1);
}

a, a:link, a:visited, a:active {
    color: #000;
}

a:hover {
    color: gray;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--b);
    color: var(--t);
}

.header {
    background: url(/headers/header-image-paisa.jpg) center/cover;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--w);
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, .7);
    position: relative;
    overflow: hidden;
}

.sub_header {
    background: #ffffff;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.sub_header img {
    height: 100%;
    width: auto;
    object-fit: cover; /* Para que no se estire feo */
}

.nav {
    background: var(--p);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; 
    z-index: 100; 
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin: 0 1rem;
    position: relative;
}

.nav-links a {
    color: var(--w);
    text-decoration: none;
    font-size: .75rem;
}

.has-submenu > a::after {
    content: "▼";
    margin-left: 5px;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--w);
    margin: 3px 0;
}

.section h2, .section h3, .section h4 {
    padding-top:5px;
    text-align: center;
    color: var(--p);
}

.review-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
}

.vote-container {
    display: flex;
    clear: both;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0.5rem 0 0.5rem;
}

.comment-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0.5rem 0 0.5rem;
}

.review-card, .login-card {
    background: var(--w);
    min-width: 250px;
    margin: 1rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--s);

}

.comment-card {
    background: var(--w);
    min-width: 250px;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--s);
}

.rating-card {
    background: var(--w);
    min-width: 250px;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: var(--s);
}

/* Gallery specific styles */
.gallery-container {
    position: relative;
    width: 100%; /* Ensure it takes full width of its parent */
    height: 350px; /* Keep consistent height */
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-container img {
    width: 100%; /* Make image fill 100% of the container's width */
    height: 100%; /* Make image fill 100% of the container's height */
    object-fit: cover; /* Use cover to ensure the image fills the area, cropping if necessary */
    border-radius: 8px;
    display: block;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 25px; /* Slightly smaller width */
    height: 50px; /* Slightly smaller height */
    cursor: pointer;
    font-size: 1.2rem; /* Smaller font size for the arrows */
    border-radius: 3px; /* Slightly smaller border-radius */
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.prev-btn {
    left: 5px;
}

.next-btn {
    right: 5px;
}


.stars {
    color: gold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.nombretitulo {
    color: #000;
    font-size: 1.15rem;
}

.footer {
    background: #333;
    color: var(--w);
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
}

.footer a {
    color: var(--w);
    margin: 0 .5rem;
    text-decoration: none;
}

.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--p);
    list-style: none;
    padding: 0;
    margin: 0;
    width: 200px;
    z-index: 10;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li {
    padding: 10px;
}

.submenu a {
    display: block;
    color: var(--w);
    text-decoration: none;
}

p, h3, h4 {
    margin-block-start: .3em;
    margin-block-end: .3em;
}

h3 {
    font-size: 1.15em;
    font-weight: 700;
}

h4 {
    font-size: 1em;
    font-weight: 700;
}

@media(min-width: 768px) {
    .main-content {
        display: flex;
    }

    .reviews-section {
        width: 75%;
    }

    .sidebar {
        width: 25%;
        min-width: 300px;
        background-color: lightgray;
        position: sticky;
        top: 0;
        height: 150vh;
        overflow-y: auto;
    }

    .login-card {
        width: calc(90% - 2rem);
        margin: 1rem auto;
    }

    .review-card {
        width: calc(33% - 2rem);
        margin: 1rem auto;
    }
    .comment-card {
        width: calc(33% - 2rem);
        margin: 0.5rem auto;
    }
}

@media(max-width: 768px) {
    .header {
        text-align: center;
        padding: 0 1rem;
    }

    .nav {
        padding: 1rem 0;
        position: relative;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 75%;
        text-align: center;
        position: absolute;
        top: 60px;
        left: 0;
        background: var(--p);
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav.active .nav-links {
        max-height: 300px;
        padding-bottom: 10px;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .hamburger-menu {
        display: flex;
        margin-left: 10px;
    }

    .close-icon {
        display: none;
        cursor: pointer;
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        color: var(--w);
    }

    .nav.active .close-icon {
        display: block;
    }

    .review-card, .login-card, .comment-card {
        width: calc(100% - 2rem);
        margin: 0.5rem auto;
    }

    .has-submenu:hover .submenu {
        display: none;
    }

    .has-submenu.active .submenu {
        display: block;
    }

    .submenu {
        position: static;
        width: 100%;
        background: none;
    }

    .submenu li {
        padding: 0;
    }

    .submenu a {
        padding: 10px;
        background: var(--p);
        margin: 5px 0;
    }
}

#map {
    width: 100%;
    height: 400px;
    margin-top: 20px;
}

.map-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
}

button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
}

.section{
    width:100%;
}

.navegacion-principal ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #f1f1f1;
    font-size: .75rem;
    /* overflow: hidden;  Puedes comentar o eliminar si solo se usaba para limpiar floats */
    display: flex;          /* Convierte el UL en un contenedor flex */
    align-items: center;    /* Alinea verticalmente los elementos LI (sus hijos flex) al centro */
    /* Opcional: si quieres que la barra tenga una altura mínima y los items se centren dentro de ella: */
    /* min-height: 50px; */ 
    justify-content: space-around;
}

.navegacion-principal li {
    /*float: left;*/
    padding: 10px;
}

.navegacion-principal li a {
    display: flex;          /* Mantener: Para centrar el contenido dentro del enlace */
    align-items: center;    /* Mantener: Para centrar el contenido dentro del enlace */
    justify-content: center;/* Mantener: Para centrar el contenido dentro del enlace */
    color: #333;
    /* text-align: center; -- Puedes eliminar esta línea ya que justify-content: center lo maneja */
             /* Mantener el padding existente */
    text-decoration: none;
}

.navegacion-principal li a:hover {
    background-color: #ddd;
}

.distance {
    font-size: 0.9em;
    color: #555;
    margin-left: auto;
}

#contenedor-estadisticas {
    display: flex;
    justify-content: center; /* Centra el grupo entero */
    align-items: center;     /* Alinea iconos y texto verticalmente */
    flex-wrap: wrap;        /* Permite que bajen si no caben en móviles */
    gap: 15px;               /* Crea espacio uniforme entre los items */
    margin-top: 10px;
    width: 100%;
}

#contenedor-estadisticas > p {
    display: flex;
    align-items: center;    /* Alinea el icono con el número */
    margin: 0;              /* ELIMINA los márgenes por defecto que rompen el centro */
    font-size: 0.9rem;
    color: var(--t);
}

#contenedor-estadisticas img {
    margin-right: 6px;      /* Espacio entre icono y número */
    width: 20px;            /* Tamaño fijo para consistencia */
    height: 20px;
    object-fit: contain;
}

.contenedor-tabla {
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

td {
    border: 0px solid #000;
    padding: 2px;
}

#imagen-header {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    z-index: 1;
    object-fit: contain;
}

.section-header {
    background: url(/header3.jpg) center/cover;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--w);
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, .7);
    margin-bottom: 1rem;
}

.banner {
    background: url(/CocaCola.jpg) center/cover;
    width: 100%;
    height: 200px;
}

.image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.image-container img {
    height: 135px;
    width: auto;
    object-fit: contain;
}

.user-info {
  width:100%;
  justify-content: space-between;
}

.rating-container {
  display: flex;
  align-items: center;
  margin: 10px;
  width: 90%;
}
.rating-overall {
  text-align: center;
  margin-right: 20px;
}
.rating-number {
  font-size: 3em;
  font-weight: 700;
  color: #f39c12;
}
.rating-total {
  font-size: 1.2em;
  color: #555;
}
.rating-bars {
  width: 80%;
}



.rating-bars-full {
  width: 100%;
}

.rating-bar {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
.rating-stars {
  width: 20px;
  font-size: 0.9em;
  color: #333;
  margin-right: 5px;
}
.bar-container {
  background-color: #eee;
  height: 10px;
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
}
.bar-rating {
  background-color: #f39c12;
  height: 100%;
  border-radius: 5px;
}

.rating {
  color: #f39c12;
  font-size: 1em;
  text-align: left;
  display: inline-block;
}
.star {
  display: inline-block;
}

.review-descripcion {
  font-size: 1em;
  color: #000;
  text-align: justify;
  width:100%;
}


.texto-centrar {
  text-align: center;
}

.review-date {
  font-size: 0.9em;
  color: #555;
}

.resena-text{
      font-size: 0.9em;
}

h1 {
    text-align: center;
    margin-bottom: 0.1em; /* Ajusta este valor para reducir el espacio a la mitad */
}

h4 {
    text-align: center;
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    display: flex; /* Changed to flex to allow for even spacing */
    flex-wrap: wrap; /* Allows items to wrap to the next line */
    align-items: flex-start; /* Aligns items to the start of the cross axis */
    width: 100%; /* Ensure it takes full width */
}

.texto-centrado {
    font-weight: 700;
    font-size: 14px;
    display: flex; /* Changed to flex to allow for even spacing */
    flex-wrap: wrap; /* Allows items to wrap to the next line */
    justify-content: center; /* Aligns items to the start of the cross axis */
    width: 100%; /* Ensure it takes full width */
}

.centrar {
    display: flex; /* Changed to flex to allow for even spacing */
    flex-wrap: wrap; /* Allows items to wrap to the next line */
    justify-content: center; /* Aligns items to the start of the cross axis */
}


.icon-text-pair {
    display: flex;
    flex-direction: column; /* Stacks image and text vertically */
    align-items: center; /* Centers items horizontally within the column */
    margin: 5px 5px; /* Adjust spacing between icon-text pairs */
}

.icon-text-pair img {
    margin-bottom: 2px; /* Adds some space between the image and the text */
}

.texto-pequeno{
      font-size: 0.7em;
      font-weight: 700;
}

.texto-medio{
      font-size: 1em;
      font-weight: 700;
}

.review-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
}

.google-btn{background:#db4437}.facebook-btn{background:#1877f2}

.social-login{display:flex;flex-direction:column;gap:10px}

textarea {
    width: 100%; /* Esto hará que el textarea ocupe el 100% del ancho de su contenedor */
    box-sizing: border-box; /* Incluye el padding y el border en el cálculo del ancho total */
    resize: vertical; /* Permite redimensionar solo verticalmente, si lo deseas */
}

.calificaciones-container {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start; /* Alinea a la izquierda */
  font-size: 14px;
}

.calificaciones-container p {
  margin-right: 10px; /* Espacio entre el texto y el número */
}

.calificaciones-numero {
  padding: 5px 10px; /* Espaciado interno */
  border-radius: 5px; /* Bordes redondeados */
  font-weight: bold; /* Texto en negrita */
  background-color: transparent; /* Elimina el color de fondo */
  margin-left: auto; /* Alinea el número a la derecha */
}

.flag{
 font-size: 18px;   
}

/* Asegura que .ancho-90 también centre el elemento */
.ancho-90 {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Actualiza esta clase para ajustar el padding interno */
.form-styled {
    padding: 25px; /* Aumenta el padding general para un espaciado más uniforme */
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: var(--w); /* Usa el color de fondo blanco */
    box-shadow: var(--s); /* Aplica una sombra suave */
    margin-bottom: 20px; /* Espacio entre los formularios */
}

/* Añade estas nuevas reglas para el primer elemento visible dentro del formulario */
/* Esto asegura que el primer label o título no tenga un margen superior adicional */
.form-styled > .form-label:first-of-type,
.form-styled > p.form-section-title:first-of-type {
    margin-top: 0; /* Elimina cualquier margen superior por defecto o previo */
}

/* Revisa estas clases para asegurar que el espaciado inferior sea consistente */
.form-input,
.form-select,
.form-textarea {
    /* Mantén el padding y el margin-bottom como están */
    padding: 10px;
    margin-bottom: 15px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
    color: var(--t);
    background-color: var(--w);
}

/* Revisa el margen del botón */
.form-button {
    /* Mantén el margin-top para el espacio antes del botón */
    margin-top: 15px;
    background-color: var(--p);
    color: var(--w);
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: inline-block;
}

        /* Estilos básicos para mensajes de error */
        .error-message {
            color: red;
            font-size: 0.9em;
            margin-top: 5px;
            display: none; /* Oculto por defecto */
        }
        /* Estilos para el mensaje de disponibilidad de nombre de usuario */
        .availability-message {
            font-size: 0.9em;
            margin-top: 5px;
            display: none;
        }
        .availability-message.available {
            color: green;
        }
        .availability-message.not-available {
            color: orange; /* Usar naranja para "no disponible" para distinguirlo de errores de formato */
        }
        
        /* Estilo para campos de formulario deshabilitados */
input[disabled],
select[disabled],
textarea[disabled] {
    background-color: #f0f0f0; /* Gris claro */
    color: #6c757d; /* Un color de texto un poco más oscuro para que sea legible */
    cursor: not-allowed; /* Cambia el cursor para indicar que no es editable */
}


.message-container {
    width: 95%;
    padding-top: 10px;
    margin: auto; /* Centers the container and gives some vertical spacing */
    box-sizing: border-box; /* Includes padding in the width calculation */
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
    display: none; /* Hidden by default, show with JavaScript */
}

.site-message {
    padding: 10px;
    border-radius: 5px;
    word-wrap: break-word;
    width: 100%;
    text-align: center;
    font-weight: bold;
    box-sizing: border-box; /* Añade esta línea */
}

.site-message.info {
    background-color: #e7f3fe;
    color: #0056b3;
    border: 1px solid #a8d5ff;
}

.site-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.site-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.site-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.form-select option[disabled] {
        color: #ccc;
        font-style: italic;
    }
    
            .highlight-row-gray {
            background-color: #e0e0e0; /* Un gris claro */
            font-weight: bold;
            color: #333; /* Color de texto para que sea legible sobre el gris */
        }
        .highlight-row-gray a {
            color: #000; /* Asegura que los enlaces dentro de la fila gris sean negros como el resto del sitio */
        }
        
        
        /* In your style.css file */
.gallery-container {
    position: relative; /* Essential for positioning the counter */
    /* ... existing styles ... */
}

.image-counter {
    position: absolute;
    bottom: 10px; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    z-index: 10; /* Ensure it's above the image and buttons */
}

.sorting-filters {
    display: flex;            /* Activa el modo horizontal */
    justify-content: center;  /* Centra los botones horizontalmente */
    align-items: center;      /* Alinea los botones verticalmente */
    gap: 10px;                /* Espacio exacto entre botones */
    margin-bottom: 5px;
    width: 100%;
    flex-wrap: nowrap;        /* Obliga a permanecer en una sola línea */
}

.filter-btn {
    flex: 1;                  /* Hace que todos los botones tengan el mismo ancho */
    max-width: 200px;         /* Evita que se estiren demasiado en pantallas grandes */
    white-space: nowrap;      /* Evita que el texto dentro del botón salte de línea */
    padding: 10px 15px;
    font-size: 0.85rem;       /* Tamaño de fuente adecuado para que quepan los tres */
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: var(--w);
    color: var(--t);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: var(--p); /* Tu color principal (negro) */
    color: var(--w);            /* Texto blanco */
    border-color: var(--p);
}

/* Ajuste para pantallas muy pequeñas (móviles) */
@media (max-width: 480px) {
    .filter-btn {
        font-size: 0.9rem;    /* Reduce un poco la letra para asegurar que no se corten */
        padding: 8px 5px;
    }
    .sorting-filters {
        gap: 5px;             /* Reduce el espacio entre botones en móviles */
    }
}

html {
  scroll-behavior: smooth;
}

.img-full-width {
    width: 100%;
    height: auto; /* Mantiene la proporción original */
    display: block; /* Elimina el espacio fantasma debajo de la imagen */
    object-fit: contain; /* Asegura que se vea completa */
}

.skeleton * {
    pointer-events: none;
}

.skeleton-img {
    width: 100%;
    height: 160px;
    border-radius: 10px;
    background: linear-gradient(90deg,#eee,#ddd,#eee);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

.skeleton-line {
    height: 14px;
    margin-top: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg,#eee,#ddd,#eee);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

.skeleton-line.title { width: 70%; height:18px; }
.skeleton-line.short { width: 40%; }

.skeleton-stats {
    display:flex;
    gap:10px;
    margin-top:12px;
}
.skeleton-stats div {
    flex:1;
    height:18px;
    border-radius:6px;
    background: linear-gradient(90deg,#eee,#ddd,#eee);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#load-more-btn.loading {
    opacity:.7;
    cursor:wait;
}

#map{
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}


.map-popup .title{
    font-weight:600;
    margin-bottom:4px;
}
.map-popup .rating{
    color:#e0a800;
    font-size:14px;
}
.map-popup .address{
    font-size:12px;
    color:#666;
    margin-bottom:6px;
}
.map-popup .link{
    font-size:13px;
    font-weight:500;
    text-decoration:none;
}

/* --- ESTILOS DEL BUSCADOR EN EL MENÚ --- */
.nav-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto; /* 🪄 LA MAGIA: Empuja el buscador totalmente a la derecha */
    margin-right: 15px; /* Un pequeño respiro para que no toque el borde exacto de la pantalla */
    z-index: 10;
}

.nav-search form {
    display: flex;
    background-color: var(--w);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 250px;
    height: 35px;
}

.nav-search input {
    border: none;
    padding: 0 15px;
    width: 100%;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    margin: 0; 
    color: var(--p);
}

.nav-search button {
    background: transparent;
    color: var(--p);
    border: none;
    padding: 0 10px;
    cursor: pointer;
    width: auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* --- ADAPTACIÓN PARA MÓVILES --- */
@media(max-width: 768px) {
    .nav-search {
        margin-left: auto; 
        margin-right: 15px; /* Se mantiene pegado a la derecha */
        width: 60%; /* Evita que el buscador aplaste al menú de hamburguesa */
    }
    
    .nav-search form {
        max-width: 100%;
    }

    /* Solo separamos el buscador del borde derecho cuando el menú se abre, 
       para que no estorbe con el ícono de la 'X' */
    .nav.active .nav-search {
        margin-right: 45px; 
        transition: margin 0.3s ease;
    }
}

/* Asegura que el autocompletado esté por encima de todo */
.ui-autocomplete {
    z-index: 2147483647 !important; 
    background-color: white;
    border: 1px solid #ccc;
    max-height: 300px;
    overflow-y: auto;
    font-family: Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ui-menu-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    list-style: none;
}

.ui-state-active, .ui-menu-item:hover {
    background-color: #f0f0f0 !important;
    color: #000 !important;
    border: none !important;
}