/* Estilos Generales */
body {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    background: black;
    color: white;
    margin: 0;
    padding: 0;
}

/* Video de fondo */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Encabezado */
header {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
}

.logo-container img {
    width: 150px;
}

h1 {
    font-size: 28px;
    font-weight: bold;
}

/* Barra de búsqueda */
.search-bar {
    display: flex;
    justify-content: center;
    margin: 15px auto;
}

.search-bar input {
    padding: 12px;
    width: 70%;
    max-width: 500px;
    border: 2px solid #ffdd57;
    border-radius: 10px 0 0 10px;
    font-size: 16px;
    outline: none;
    text-align: center;
    background: white;
}

/* Botón de búsqueda */
.search-bar button {
    background-color: #ffdd57;
    border: 2px solid #ffdd57;
    padding: 12px 15px;
    border-radius: 0 10px 10px 0;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

.search-bar button:hover {
    background-color: white;
    color: black;
    transform: scale(1.05);
}


/* Contenedor de pestañas de categorías */
.category-container {
    display: flex;
    justify-content: center;
    width: 100%;
    border-bottom: 1px solid rgba(255, 221, 87, 0.3);
    margin: 5px 0;
    padding-bottom: 10px; /* Agrega espacio para que se vea mejor */
}

/* Categorías ahora son visibles correctamente */
.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 90%;
    max-width: 800px;
    padding: 10px;
}

/* Botones de categorías */
.category-tabs button {
    background-color: #ffdd57;
    border: none;
    padding: 12px;
    margin: 5px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    width: 130px;
    transition: 0.3s;
    display: inline-block; /* Asegura que se vean */
}

/* Categorías (Emergencias ya no es roja) */
.category-tabs button[data-category="Emergencias"] {
    order: -1; /* Sigue apareciendo primero, pero sin color rojo */
    background-color: #ffdd57;
    color: black;
    font-weight: bold;
}

.category-tabs button.active {
    background-color: white;
    color: black;
}

.category-tabs button:hover {
    background-color: white;
    color: black;
    transform: scale(1.05);
}

/* Adaptabilidad a móviles */
@media screen and (max-width: 768px) {
    .category-tabs {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
    }

    .category-tabs button {
        width: auto;
        flex: 1;
        margin: 5px;
    }
}

/* Alfabeto a la izquierda */
.alphabet-sidebar {
    width: 50px;
    position: fixed;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.alphabet-sidebar ul {
    list-style: none;
    padding: 0;
}

.alphabet-sidebar li {
    margin: 5px 0;
    font-size: 18px;
    font-weight: bold;
}

.alphabet-sidebar a {
    color: #ffdd57;
    text-decoration: none;
}

.alphabet-sidebar a:hover {
    color: white;
}

/* Contenedor de negocios */
.main-container {
    margin-top: 20px;
}

/* Tarjetas de negocios */
.commerce-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 600px;
    text-align: left;
    animation: fadeIn 0.5s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

/* Mejor legibilidad del texto */
.commerce-card h2, .commerce-card p {
    color: black;
}

/* Botón de WhatsApp en Amarillo */
.whatsapp-button {
    display: block;
    background-color: #ffdd57;
    color: black;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    margin-top: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s;
}

.whatsapp-button:hover {
    background-color: white;
    transform: scale(1.05);
}

/* Emergencias destacadas en la lista */
.commerce-card[data-category="Emergencias"] {
    border: 3px solid red;
    animation: pulse 1.5s infinite;
}

/* Efecto de pulsación para Emergencias */
@keyframes pulse {
    0% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.8); }
    100% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
}

/* Adaptabilidad a móviles */
@media screen and (max-width: 768px) {
    .search-bar input {
        width: 90%;
    }

    .commerce-card {
        width: 90%;
    }

    .category-tabs {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
    }

    .category-tabs button {
        width: auto;
        flex: 1;
        margin: 5px;
    }

    .alphabet-sidebar {
        display: block;
        position: relative;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }

    .alphabet-sidebar ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    .alphabet-sidebar li {
        margin: 5px;
        font-size: 16px;
    }
}
