/*
 * Estilos Generales y Resets
 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --light-bg: #f9f9f9;
    --dark-bg: #e9f5ff;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ddd;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --card-hover-bg: #e0f2ff;
    --card-selected-bg: #cce5ff;
    --card-shadow-category: 0 6px 15px rgba(0, 0, 0, 0.08);
    --card-hover-shadow-category: 0 12px 25px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Estilos para el icono flotante y arrastrable */
#floating-icon-container {
    position: fixed;
    right: 20px; /* Posición inicial: 20px desde la derecha */
    top: 65%; /* Posición inicial: centrado verticalmente */
    transform: translateY(-50%); /* Ajuste para un centrado perfecto */
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    cursor: grab; /* Cambia el cursor para indicar que es arrastrable */
    width: 60px;
    height: 60px;
}

#floating-icon-container img {
    width: 100%;
    height: auto;
    border-radius: 50%; /* Borde circular */
    box-shadow: none; /* 0 4px 8px rgba(0, 0, 0, 0.2); Sombra para dar profundidad */
    transition: transform 0.2s; /* Animación suave al hacer hover */
}

#floating-icon-container img:hover {
    transform: scale(1.1); /* Efecto de crecimiento al pasar el mouse */
}
        


/* --- Encabezado y Navegación Mejorados --- */
.header {
    background-color: #ffffff;
    padding: 15px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.header-main {
    display: flex;
    justify-content: space-between; /* Distribuye el espacio entre los elementos */
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Ancho máximo para el contenido */
    padding: 0 20px;
}

/* Ocultar el botón de hamburguesa por defecto en desktop */
.hamburger-menu {
    display: none;
}

/* Alineación del banner a la izquierda */
.banner-container {
    flex-grow: 1;
    text-align: left; /* Alinea el contenido a la izquierda */
    max-width: 400px;
}

.banner-image {
    max-width: 85%;
    height: auto;
    border-radius: 8px;
    box-shadow: none;
    display: block;
    margin-right: auto; /* Mantiene la imagen a la izquierda */
}

/* Alineación de la navegación a la derecha */
.main-nav {
    flex-grow: 1; /* Permite que la navegación ocupe el espacio disponible */
}

.main-nav .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end; /* Alinea los iconos a la derecha */
    flex-wrap: wrap;
    gap: 20px;
}

.main-nav .nav-list li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    transition: background-color 0.3s ease, border-radius 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-nav .nav-list li a:hover {
    background-color: var(--light-bg);
    border-radius: 5px;
}

/* Estilos de los íconos */
.menu-icon {
  width: 50px;
  height: 50px;
  display: block;
}

.icon-container {
  display: inline-block;
  transition: transform 0.5s ease-in-out;
}

.icon-container:hover {
  transform: rotateY(360deg);
}

/* --- Responsive Design / Media Queries --- */
@media (max-width: 768px) {
    .header-main {
        flex-direction: column; /* Apila los elementos en móvil */
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .main-nav {
        width: 110%; /* La navegación ocupa todo el ancho */
    }

    .main-nav .nav-list {
        justify-content: center; /* Centra los iconos en móvil */
    }

    .banner-container {
        width: 100%;
        text-align: center; /* Centra el banner en móvil */
        order: -1; /* Coloca el banner en la parte superior en móvil */
        margin-bottom: 10px;
    }

    .banner-image {
        margin: 0 auto;
    }

    /* Ocultar el menú de navegación en móvil por defecto, y mostrar el botón de hamburguesa */
    .main-nav .nav-list {
        display: ruby;
    }

    .hamburger-menu {
        display: block;
        position: static;
    }
}

/* Estilos para el input de búsqueda inicial */
.initial-search-input-wrapper {
    display: flex; /* Changed to flex to align input and icon */
    justify-content: center;
    align-items: center;
    margin-top: 0px;
    margin-bottom: 0px;
    flex-direction: row; /* Keep column for stacking if needed, but row for single line */
    gap: 20px;
    padding: 0 15px;
}

.initial-search-input-wrapper input {
    padding: 15px 25px;
    font-size: 1.4em;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    max-width: 500px;
    width: 90%;
    outline: none;
}

.initial-search-input-wrapper input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 5px rgba(0, 123, 255, 0.3);
}

.initial-search-icon {
    font-size: 3em;
    color: var(--primary-color);
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* CONTAINER (for results and details) */
.container {
    display: flex;
    flex-direction: column; /* Change to column for better stacking on small screens */
    max-width: 1200px;
    margin: 5px auto;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    flex-grow: 1;
    padding: 0 15px; /* Add some padding for responsiveness */
    box-sizing: border-box; /* Include padding in element's total width and height */
}

/* Estilos del Formulario de Búsqueda */
.search-form-container {
    padding: 15px 20px; /* Reduced padding slightly */
    border-bottom: 1px solid var(--border-color);
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Space between elements */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    position: static; /* CAMBIO: Vuelve a posición estática (flujo normal del documento) */
    top: auto; /* CAMBIO: Remueve la propiedad top */
    left: auto; /* CAMBIO: Remueve la propiedad left */
    width: 100%; /* CAMBIO: Permite que ocupe el 100% del ancho */
    z-index: auto; /* CAMBIO: Remueve el z-index */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Mantiene la sombra */
    margin-top: 15px; /* Vuelve a añadir margen superior */
    margin-bottom: 15px; /* Vuelve a añadir margen inferior */
    max-width: 1200px; /* CAMBIO: Limita el ancho del formulario */
    margin-left: auto; /* Centra el formulario */
    margin-right: auto; /* Centra el formulario */
    border-radius: var(--border-radius); /* Vuelve a aplicar border-radius */
    box-sizing: border-box;
}

/* CAMBIO: Eliminar el padding-top del body ya que el search-form-container no es fijo */
/* REMOVIDO: body { padding-top: 90px; } */
/* REMOVIDO: @media (max-width: 768px) { body { padding-top: 180px; } } */


.search-form-container form {
    display: flex;
    flex-direction: row; /* Make items appear in a row */
    align-items: flex-end; /* Align items to the bottom */
    gap: 15px; /* Space between input groups and button */
    justify-content: center; /* Center the items within the form */
    width: 100%; /* Ensure form takes full width of its container */
    flex-wrap: wrap; /* Allow wrapping of form elements */
    max-width: 1200px; /* Limita el ancho del formulario dentro del contenedor fijo */
}

.search-form-container .input-group {
    display: flex;
    flex-direction: column; /* Keep label above input */
    align-items: flex-start; /* Align label/input to the start */
    flex: 1; /* Allow input groups to grow and shrink */
    min-width: 180px; /* Minimum width for input group */
    max-width: 250px; /* Max width for consistency */
}

.search-form-container label {
    font-size: 0.9em;
    color: var(--light-text);
    margin-bottom: 5px;
    display: block; /* Ensure label is on its own line */
}

.search-form-container input[type="text"],
.search-form-container select {
    width: 100%; /* Make them take full width of their group */
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1em;
    box-sizing: border-box; /* Include padding and border in element's total width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-form-container input[type="text"]:focus,
.search-form-container select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.search-form-container button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px; /* Adjusted padding for better fit */
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.search-form-container button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.search-form-container button i {
    font-size: 1.1em;
}

/* RESULTS AND DETAILS PANEL */
.results-container {
    display: flex;
    flex-direction: row; /* Default to row for side-by-side */
    gap: 20px;
    padding: 20px;
    flex-grow: 1; /* Allow it to take available space */
    box-sizing: border-box;
}

.list-panel {
    flex: 2; /* Takes 2 parts of the available space */
    min-width: 300px;
    background-color: var(--dark-bg);
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05); /* Sombra interna para el panel */
    padding: 15px;
    overflow-y: auto; /* Enable scrolling for the list */
    max-height: calc(100vh - 250px); /* Adjust height to fit viewport, considering header/footer */
    border: 1px solid var(--border-color);
}

.details-panel {
    flex: 3; /* Takes 3 parts of the available space */
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--border-color);
}

.details-placeholder {
    text-align: center;
    color: var(--light-text);
    padding: 30px;
    font-style: italic;
}

.details-panel .detail-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.details-panel .detail-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    background-color: #fff;
}

.details-panel .detail-logo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5em;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.details-panel h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 2.2em;
    line-height: 1.2;
}

/* CAMBIO: Estilo para el eslogan debajo del nombre del negocio */
.details-panel .detail-slogan {
    font-style: italic;
    color: var(--light-text);
    margin-top: 5px; /* Ajusta el espacio entre el nombre y el eslogan */
    font-size: 1.1em;
    line-height: 1.4;
    text-align: center;
}

.details-panel p {
    font-size: 1em;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start; /* Alinea el ícono con el texto si el texto es largo */
    gap: 10px;
}

.details-panel p strong {
    color: var(--primary-color);
}

.details-panel p i {
    color: var(--accent-color);
    margin-right: 5px;
    font-size: 1.1em;
    flex-shrink: 0; /* Evita que el ícono se encoja */
}

.details-panel .contact-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.details-panel .contact-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.details-panel .contact-links i {
    color: var(--primary-color); /* Color del ícono en los enlaces de contacto */
}

/* Share buttons */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.4em;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.share-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.3);
}

.share-buttons .whatsapp-share {
    background-color: #25D366;
}

.share-buttons .facebook-share {
    background-color: #3b5998;
}

.share-buttons .instagram-share {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}


/* Negocio Card (list item) */
.negocio-grid {
    display: grid;
    gap: 15px;
    /* grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Consider a more flexible layout here if needed */
}

.negocio-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.negocio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    background-color: var(--card-hover-bg);
}

.negocio-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    background-color: var(--card-selected-bg);
    transform: translateY(-2px);
}

.negocio-logo-wrapper {
    flex-shrink: 0; /* Prevents the logo from shrinking */
}

.negocio-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    background-color: white; /* Ensure background if image is transparent */
}

.negocio-logo-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
}

.negocio-info {
    flex-grow: 1; /* Allows info to take remaining space */
}

.negocio-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.1em;
}

.negocio-info p {
    margin: 0 0 3px 0;
    font-size: 0.9em;
    color: var(--light-text);
}

.negocio-info p i {
    margin-right: 5px;
    color: var(--accent-color);
}

.negocio-info .negocio-category i,
.negocio-info .negocio-location i {
    color: var(--secondary-color);
}

.no-results {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: var(--light-text);
    font-size: 1.1em;
}
/* Estilo para los enlaces de los nombres de negocio */
.negocio-title-link {
    text-decoration: none;
    color: inherit; /* Mantiene el color del texto de la etiqueta padre (h4) */
}

/* Opcional: para que se vea el cambio al pasar el cursor */
.negocio-title-link:hover {
    color: #007bff; /* Cambia a un color azul al pasar el cursor */
    /* text-decoration: underline; si quieres que aparezca al pasar el cursor */
}

.city-info {
    font-size: 0.8rem;
    padding: 5px 20px;
    text-align: right;
    background-color: #0069ff;
    border-bottom: 1px solid #e0e0e0;
    color: white;
}

.city-info span {
    display: block;
    align-items: center;
    gap: 5px;
}

/* Contenedor principal del faldón */
.chyron-container {
    position: relative; /* Cambiado a 'relative' para contener el texto */
    margin-top: 0.0rem;
    width: 100%;
    background: linear-gradient(45deg, #5d5dff, #ff6b6b);
    color: #fff;
    padding: 10px 0; /* padding horizontal 0, el texto se mueve por dentro */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    overflow: hidden; /* Oculta el contenido que se desborda, esencial para el efecto de movimiento */
    font-size: 1rem;
    font-weight: 500;
}

/* Título fijo */
.chyron-title {
    font-weight: 700;
    margin-right: 10px;
    padding-left: 20px; /* Padding izquierdo para que el título no esté pegado al borde */
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0; /* Evita que el título se encoja */
}

/* Contenido del faldón, el elemento que se moverá */
.chyron-content {
    white-space: nowrap;
    display: inline-block; /* Importante para que la animación funcione */
    padding-left: 100%; /* Mueve el texto completamente fuera de la vista al inicio */
    animation: scroll-left linear infinite;
    animation-duration: 300s; /* Controla la velocidad. A mayor valor, más lento. */
}

/* Animación de desplazamiento de izquierda a derecha */
@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-200%); /* Ajustado a -200% para evitar el parpadeo. */
    }
}       


/* Categorías Sección */
.category-section {
    padding: 0px 0px;
    text-align: center;
    background-color: var(--dark-bg);
    margin-top: 0px;
    border-top: 1px solid var(--border-color);
}

.category-section h2 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-item {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow-category);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.category-item:hover {
    transform: translateY(-7px);
    box-shadow: var(--card-hover-shadow-category);
}

.category-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.category-info {
    padding: 15px;
    text-align: left;
}

.category-info h3 {
    margin-top: 0;
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.category-info p {
    font-size: 0.9em;
    color: var(--light-text);
    line-height: 1.5;
}

/* FOOTER */
.site-footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto; /* Pushes the footer to the bottom */
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 28px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.3);
}


/* --- Responsive Design / Media Queries --- */

@media (max-width: 1024px) {
    .header h1 {
        font-size: 2em;
    }

    .main-nav .nav-list {
        gap: 20px;
    }

    .container {
        padding: 0 10px;
    }

    .results-container {
        flex-direction: column; /* Stack results

/* Estilos para el modal */
.modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo semi-transparente */
    backdrop-filter: blur(5px); /* Efecto de desenfoque (moderno) */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex; /* Se muestra cuando tiene la clase 'active' */
}

.modal-content {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%; /* Ancho para móviles */
    max-width: 800px; /* Ancho máximo en escritorio */
    height: 90vh; /* Altura para móviles */
    max-height: 600px; /* Altura máxima en escritorio */
    position: relative;
    transform: scale(0.9); /* Empieza un poco más pequeño */
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out; /* Transición suave */
    animation: fadeIn 0.3s forwards; /* Animación de aparición */
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
    transition: color 0.2s ease-in-out;
}

.modal-close-btn:hover {
    color: #ff4d4d;
}

#negocio-iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Animación para la aparición del modal */
@keyframes fadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Estilos para el icono flotante y arrastrable */
#floating-icon-container {
    position: fixed;
    right: 20px; /* Posición inicial: 20px desde la derecha */
    top: 50%; /* Posición inicial: centrado verticalmente */
    transform: translateY(-50%); /* Ajuste para un centrado perfecto */
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    cursor: grab; /* Cambia el cursor para indicar que es arrastrable */
    width: 60px;
    height: 60px;
}

#floating-icon-container img {
    width: 100%;
    height: auto;
    border-radius: 50%; /* Borde circular */
    box-shadow: none; /* 0 4px 8px rgba(0, 0, 0, 0.2); Sombra para dar profundidad */
    transition: transform 0.2s; /* Animación suave al hacer hover */
}

#floating-icon-container img:hover {
    transform: scale(1.1); /* Efecto de crecimiento al pasar el mouse */
}
        
 