/* 
   ZetaEne - Stylesheet 
   Diseño adaptado para móviles, con estética premium y glassmorphism.
*/

:root {
    /* 
      ¡ATENCIÓN! 
      Aquí puedes reemplazar estos colores hexadecimales por los exactos 
      de tu archivo "zn logo.ai". 
    */
    --brand-primary: #3b82f6;
    --brand-secondary: #8b5cf6;
    --brand-dark: #0f172a;

    /* Colores funcionales (Modo Claro) */
    --bg-color: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    /* ── TOKENS DE GLASSMORPHISM ──────────────────────────── */
    /* Usar estas variables en lugar de valores hardcodeados           */
    /* para garantizar consistencia visual en todo el proyecto.        */

    /* Fondos: opacidad calibrada por contexto */
    --glass-bg-subtle:  rgba(255, 255, 255, 0.06);  /* hero oscuro, tabla */
    --glass-bg-light:   rgba(255, 255, 255, 0.25);  /* tarjetas claras (farmacias) */
    --glass-bg-medium:  rgba(255, 255, 255, 0.70);  /* glass-panel estándar */
    --glass-bg-heavy:   rgba(255, 255, 255, 0.88);  /* duty-button, overlay buscador */

    /* Bordes */
    --glass-border-subtle: rgba(255, 255, 255, 0.10);
    --glass-border-light:  rgba(255, 255, 255, 0.35);
    --glass-border-strong: rgba(255, 255, 255, 0.50);

    /* Blur */
    --glass-blur-sm: blur(8px);
    --glass-blur-md: blur(12px);
    --glass-blur-lg: blur(16px);

    /* Sombras */
    --glass-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.07);
    --glass-shadow-md: 0 8px 32px rgba(0, 0, 0, 0.10);
    --glass-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
    /* ────────────────────────────────────────────────────────────── */

    /* Tokens de Modo Oscuro (toggle via JS) */
    --dm-bg-gradient-start: #0f0f1a;
    --dm-bg-gradient-mid:   #1a1030;
    --dm-bg-gradient-end:   #0a1628;
    --dm-glass-bg:    rgba(30, 30, 50, 0.75);
    --dm-glass-border: rgba(255, 255, 255, 0.08);
    --dm-text-main:   #e2e8f0;
    --dm-text-muted:  #94a3b8;
    --dm-header-bg:   rgba(15, 15, 30, 0.85);
}

/* =========================================
   MODO OSCURO — Aplica cuando <body class="dark-mode">
   ========================================= */
body.dark-mode {
    /* Redefine las variables del root para dark mode.
       Todos los elementos que usen var(--brand-dark) se actualizan solos. */
    --brand-dark:    #e040fb;   /* Magenta vibrante — alto contraste sobre fondo oscuro */
    --text-main:     #e2e8f0;   /* Gris muy claro — para texto normal */
    --text-muted:    #94a3b8;   /* Gris medio — para subtítulos */
    --glass-bg:      rgba(30, 30, 50, 0.75);
    --glass-border:  rgba(255, 255, 255, 0.08);
    --glass-shadow:  0 8px 32px 0 rgba(0, 0, 0, 0.35);

    color: var(--text-main);
    background-image: linear-gradient(
        135deg,
        var(--dm-bg-gradient-start) 0%,
        var(--dm-bg-gradient-mid) 50%,
        var(--dm-bg-gradient-end) 100%
    );
}

body.dark-mode .glass-panel {
    background: var(--dm-glass-bg);
    border-color: var(--dm-glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

body.dark-mode .header {
    background: var(--dm-header-bg);
    border-color: var(--dm-glass-border);
}

body.dark-mode .offcanvas-menu {
    background: rgba(20, 15, 40, 0.95);
    border-color: var(--dm-glass-border);
}

body.dark-mode .offcanvas-link {
    color: var(--dm-text-main);
    border-color: var(--dm-glass-border);
}

body.dark-mode .offcanvas-link:hover {
    color: var(--brand-primary);
}

body.dark-mode .hero-title,
body.dark-mode .page-title,
body.dark-mode .section-heading h2,
body.dark-mode .clasificado h3,
body.dark-mode .bus-card-info h3,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode .duty-pharmacy,
body.dark-mode strong {
    color: var(--brand-dark); /* #e040fb magenta en dark mode */
}

/* El logo-text usa gradient clip: override especial */
body.dark-mode .logo-text {
    background: linear-gradient(135deg, #e040fb, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .search-form {
    background: rgba(40, 35, 65, 0.9);
    border: 1px solid var(--dm-glass-border);
}

body.dark-mode #searchInput {
    color: var(--dm-text-main);
}

body.dark-mode #searchInput::placeholder {
    color: var(--dm-text-muted);
}

body.dark-mode .filter-pill {
    background: var(--dm-glass-bg);
    border-color: var(--dm-glass-border);
    color: var(--dm-text-main);
}

body.dark-mode .filter-pill:hover,
body.dark-mode .filter-pill.active {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .city-selector {
    background: rgba(30, 30, 50, 0.8);
    border-color: var(--dm-glass-border);
}

body.dark-mode .city-select-btn {
    color: var(--dm-text-muted);
}

body.dark-mode .city-select-btn.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.2));
    color: #c4b5fd;
}

body.dark-mode .duty-button {
    background: rgba(25, 20, 50, 0.85);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .duty-button .duty-pharmacy {
    color: var(--brand-dark); /* cian en dark mode */
}

body.dark-mode .next-bus-card:not(.primary-next) {
    background: var(--dm-glass-bg);
    border-color: var(--dm-glass-border);
}

body.dark-mode .next-bus-card:not(.primary-next) .next-bus-dest {
    color: var(--dm-text-main);
}

body.dark-mode .premium-card {
    background: linear-gradient(135deg, rgba(60, 45, 10, 0.8), rgba(40, 35, 60, 0.8)) !important;
}

body.dark-mode .blob-1 { opacity: 0.15; }
body.dark-mode .blob-2 { opacity: 0.1; }

/* =========================================
   TOGGLE BOTÓN SOL / LUNA
   ========================================= */
.dark-mode-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    line-height: 1;
}

.dark-mode-toggle:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body.dark-mode .dark-mode-toggle {
    background: rgba(30, 25, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Legibilidad garantizada del widget de farmacia */
.duty-button {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07) !important;
}

body.dark-mode .duty-button {
    background: rgba(25, 20, 50, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: linear-gradient(135deg, #e4dff5 0%, #d8cbf7 50%, #c4e0f9 100%);
    background-attachment: fixed;
    transition: background 0.5s ease;
}

body.bg-delivery {
    background-image: linear-gradient(135deg, #ffc107 0%, #ff9800 50%, #f44336 100%);
    background-attachment: fixed;
}

/* Background animated blobs para darle un aspecto dinámico y moderno */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--brand-primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--brand-secondary);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 10%) scale(1.1);
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    width: 100%;
    order: 3;
    padding-bottom: 0.25rem;
}

.nav-pill {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-pill:hover,
.nav-pill:active {
    background: var(--brand-dark);
    color: white;
    border-color: var(--brand-dark);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo {
    height: 40px;
    width: auto;
    border-radius: 0;
    object-fit: contain;
    background-color: transparent;
}

.logo-text {
    /* ... tus otras líneas ... */
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary));
    background-clip: text;
    /* <--- AGREGÁ ESTA LÍNEA */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.city-badge {
    background: var(--brand-dark);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--brand-dark);
}

.hero-title span {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    background-clip: text;
    /* <--- AGREGÁ ESTA LÍNEA */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Glassmorphism Panel base */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

/* Search Container */
.search-container {
    width: 100%;
    max-width: 600px;
    padding: 0.5rem;
    margin-top: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

.search-form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 18px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
}

.search-icon {
    color: var(--text-muted);
}

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-main);
    background: transparent;
}

#searchInput::placeholder {
    color: #94a3b8;
}

.search-button {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-button:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* =========================================
   ACCESOS RÁPIDOS — App Launcher Grid
   ========================================= */
.categories {
    width: 100%;
}

/* Grid: 4 columnas en desktop, 4 en tablet, 4 en móvil ancho, 2 en móvil angosto */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem;
    }
}

@media (max-width: 520px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.6rem;
    }
}

@media (max-width: 340px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem;
    }
}

/* Tarjeta de acceso rápido */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    border-radius: 20px;
    gap: 0.55rem;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.22s ease;
    position: relative;
    overflow: hidden;
}

.category-card:hover,
.category-card:active {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 30px rgba(31, 38, 135, 0.14);
}

/* Contenedor del ícono — cuadrado redondeado con color de marca */
.app-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.22s ease;
    overflow: hidden;
}

.category-card:hover .app-icon-wrap {
    transform: scale(1.08) rotate(3deg);
}

/* Imagen del ícono (PNG/SVG) */
.app-icon-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    /* Para íconos de línea blanca sobre fondo de color */
    filter: brightness(0) invert(1);
}

/* Emoji de fallback (se muestra si falla la imagen) */
.app-icon-emoji {
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Label de la sección */
.app-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

@media (max-width: 520px) {
    .app-icon-wrap {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    .app-icon-img {
        width: 28px;
        height: 28px;
    }
    .app-icon-emoji {
        font-size: 1.4rem;
    }
    .app-label {
        font-size: 0.67rem;
    }
    .category-card {
        padding: 0.85rem 0.4rem;
    }
}

/* Paleta de colores para los íconos */
.app-icon-wrap--blue    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.app-icon-wrap--orange  { background: linear-gradient(135deg, #f97316, #ea580c); }
.app-icon-wrap--sky     { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.app-icon-wrap--teal    { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.app-icon-wrap--indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.app-icon-wrap--pink    { background: linear-gradient(135deg, #ec4899, #db2777); }
.app-icon-wrap--amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.app-icon-wrap--purple  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* Dark Mode */
body.dark-mode .category-card {
    background: var(--dm-glass-bg);
    border-color: var(--dm-glass-border);
}
body.dark-mode .app-label {
    color: var(--dm-text-main);
}

/* Responsive Design for Mobile */




/* Subpage Styles (Farmacias, etc) */
.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--brand-primary);
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.table-container {
    padding: 2rem;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
}

.data-table th,
.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.data-table th {
    font-weight: 700;
    color: var(--brand-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.data-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.3);
}

.data-table a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.data-table a:hover {
    color: var(--brand-secondary);
    text-decoration: underline;
}

.tel-link {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    color: var(--brand-primary) !important;
}

.tel-link:hover {
    background: var(--brand-primary);
    color: white !important;
    text-decoration: none !important;
}



/* Duty Button Styles */
.today-duty-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.duty-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.duty-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    /* Green tint */
}

.pulse-indicator {
    display: block;
    width: 12px;
    height: 12px;
    background-color: #10b981;
    /* Green */
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.duty-label {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.duty-pharmacy {
    font-size: 1.1rem;
    color: var(--brand-dark);
    font-weight: 700;
}

/* --- Colectivos Styles --- */
.section-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-heading h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark);
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Próximos colectivos (Banner Destacado) */
.next-buses-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.next-bus-card {
    flex: 1;
    min-width: 250px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--brand-secondary);
}

.next-bus-card.primary-next {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border-left: none;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.next-bus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.next-bus-header strong {
    font-size: 1.5rem;
}

.time-left {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.next-bus-card:not(.primary-next) .time-left {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary);
}

.next-bus-dest {
    font-size: 1.1rem;
    font-weight: 700;
}

.next-bus-emp {
    font-size: 0.9rem;
    opacity: 0.9;
}

.next-bus-card:not(.primary-next) .next-bus-dest {
    color: var(--brand-dark);
}

.next-bus-card:not(.primary-next) .next-bus-emp {
    color: var(--text-muted);
}

/* Filtros en forma de píldora */
.filters-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.scroll-hide::-webkit-scrollbar {
    display: none;
}

.scroll-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.filter-pill {
    white-space: nowrap;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.filter-pill:hover {
    background: white;
    transform: translateY(-2px);
}

.filter-pill.active {
    background: var(--brand-dark);
    color: white;
    border-color: var(--brand-dark);
}

/* Tarjetas del Listado Principal */
.buses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.bus-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: 16px;
    transition: transform 0.2s ease;
    text-align: left;
}

.bus-card:hover {
    transform: translateY(-4px);
}

.bus-card-time {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-primary);
    min-width: 75px;
}

.bus-card-info h3 {
    font-size: 1.1rem;
    color: var(--brand-dark);
    margin-bottom: 0.25rem;
}

.bus-company {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Alertas / Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* --- Footer Styles --- */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.footer-center h4 {
    color: var(--brand-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.footer-nav a:hover {
    color: var(--brand-primary);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s;
}

.social-icons a:hover {
    color: var(--brand-primary);
    transform: scale(1.1);
}

.footer-whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.footer-whatsapp-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

#footerCopyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}



/* --- ESTILOS PARA LA SECCIÓN CLASIFICADOS --- */
.grid-container-clasificados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.category-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--brand-primary);
    background: rgba(59, 130, 246, 0.1);
    /* Usa el azul de tu raíz */
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0.5rem 0;
}

.clasificado {
    padding: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.clasificado:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}



/* --- CSS ESPECÍFICO PARA EL LAYOUT DE CLASIFICADOS --- */

/* --- SLIDER CON DESPLAZAMIENTO LATERAL --- */
.banner-slider-container {
    width: 100%;
    max-width: 1200px;
    height: 350px;
    margin: 0 auto 3rem auto;
    overflow: hidden;
    /* Esto oculta los banners que están "fuera de la ventana" */
    position: relative;
    border-radius: 24px;
    padding: 0 !important;
}

.slides-wrapper {
    display: flex;
    /* Pone los banners uno al lado del otro */
    width: 300%;
    /* 3 banners = 300% de ancho */
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* La magia del movimiento */
}

.mySlides {
    flex: 0 0 33.333%;
    /* Cada banner ocupa exactamente un tercio del tren */
    width: 33.333%;
    height: 100%;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Mantenemos el ajuste perfecto que pediste */
    display: block;
}



.mySlides {
    display: none;
    width: 100%;
    height: 100%;
}

.mySlides img {
    width: 100%;
    /* Obliga a la imagen a ser tan ancha como el contenedor */
    height: 100%;
    /* Obliga a la imagen a ser tan alta como el contenedor */
    object-fit: cover;
    /* Truco de magia: la imagen se recorta un poquito pero NO se estira feo */
    object-position: center;
    /* Centra la parte importante de la publicidad */
    display: block;
}

/* --- Adaptación para Celulares --- */


/* Buscador centralizado */
.centered-search-section {
    margin-bottom: 4rem;
}

/* Adaptación del contenedor principal para dos columnas */
.classifieds-layout-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    /* Columna sidebar de 280px y el resto para anuncios */
    gap: 3rem;
    align-items: start;
}

/* Sidebar izquierda */
.sidebar-filters-column {
    position: sticky;
    top: 100px;
    /* Ajusta la altura del header sticky de index.css [cite: 5] */
}

.sticky-sidebar {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sticky-sidebar h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 1rem 0;
}

/* Píldora destacado de publicar */
.publish-pill-link {
    width: 100%;
    text-align: center;
    background: var(--brand-dark) !important;
    /* Forzamos color oscuro */
    color: white !important;
    padding: 1.2rem;
}

/* Lista vertical de filtros */
.filter-pills-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-pill {
    white-space: nowrap;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.9rem;
}

.filter-pill:hover,
.filter-pill.active {
    background: white;
    transform: translateX(5px);
    /* Pequeño movimiento a la derecha al hover */
    color: var(--brand-primary);
    border-color: rgba(var(--primary-rgb), 0.3);
}

/* Grilla de anuncios adaptada a 3 columnas */
.ads-main-column {
    flex: 1;
}

/* Unimos los estilos que ya tenías y agregamos los de la grilla */
.grid-container-clasificados {
    display: grid;
    /* Forzamos 3 columnas fijas en PC [cite: image] [cite: image_2.png] */
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

/* --- Adaptación de la tarjeta clasificado estilo image_2.png --- */
.ad-photo-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    padding: 12px;
    background: #ffffff; /* Fondo blanco para que los logos respiren y resalten */
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.05); /* Borde ultra sutil */
}

.ad-photo {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.clasificado {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.clasificado h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Ajuste temporal de tamaño para etiquetas y horarios (incluye emojis) */
.category-tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.hours {
    font-size: 0.75rem !important;
}

.description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Botón WhatsApp de ancho completo estilo image_2.png [cite: 5] */
.whatsapp-btn-full {
    width: 100%;
    background: #25D366;
    color: white !important;
    padding: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s;
    margin-top: auto;
    /* Empuja el botón al fondo si la tarjeta crece [cite: 5] */
}

.whatsapp-btn-full:hover {
    transform: scale(1.03);
}

/* Minicategoría estilo image_2.png */
.tag-blue {
    color: #3b82f6;
    /* Azul brillante como en image_2.png [cite: image_2.png] [cite: 5] */
    background: rgba(59, 130, 246, 0.1);
}

/* --- Adaptaciones Responsive para Celulares --- */




/* --- AJUSTES PARA CELULARES (Mobile First) --- */


/* --- GRILLA DE BANNERS ESTÁTICOS --- */
.top-banners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columnas iguales */
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

.banner-static {
    height: 200px;
    /* Altura controlada para que no ocupe toda la pantalla */
    overflow: hidden;
    position: relative;
    padding: 0 !important;
    /* La imagen toca los bordes del cristal */
    transition: transform 0.3s ease;
}

.banner-static:hover {
    transform: translateY(-5px);
    /* Pequeño efecto al pasar el mouse */
}

.banner-static img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

/* Adaptación para Celulares */


.clasificado {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    /* Le damos una altura mínima para que sean uniformes */
    padding: 1.5rem;
}

.clasificado h3 {
    font-size: 1.4rem;
    color: var(--brand-primary);
    /* Resaltamos más el nombre ya que no hay foto */
}

/* --- PLACEHOLDER DE EMOJI PARA NEGOCIOS SIN FOTO --- */
.emoji-fallback {
    width: 100%;
    height: 180px;
    /* Misma altura que le damos a las fotos */
    background: rgba(255, 255, 255, 0.03);
    /* Un fondo apenas visible */
    border: 1px dashed rgba(255, 255, 255, 0.1);
    /* Borde punteado delicado */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    /* Emoji gigante */
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.clasificado:hover .emoji-fallback {
    transform: scale(1.05);
    /* Pequeña animación al pasar el mouse */
}

/* =========================================
   9. BANNERS PUBLICITARIOS (VIP)
   ========================================= */
.top-banners-section {
    margin-bottom: 2rem;
    width: 100%;
}

.top-banners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.banner-static {
    position: relative;
    display: block;
    width: 100%;
    height: 160px;
    /* Altura ideal para banners horizontales */
    border-radius: 16px;
    overflow: hidden;
    background: var(--glass-bg);
    /* Fondo clarito por si falla la foto */
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-static:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.banner-static img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Hace que la foto llene el cuadro sin deformarse */
}

.banner-caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

/* Adaptación exclusiva de banners para Celulares */

/* --- Nueva Estructura del Layout Principal (Index) --- */
.highlights-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.categories-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    justify-content: center;
}

.category-compact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: var(--text-main);
    background: var(--glass-bg);
    border: 2px solid transparent;
}

.category-compact-btn:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.bottom-banners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.banner-column {
    display: flex;
    flex-direction: column;
}

/* =========================================
   MEDIA QUERIES UNIFICADAS (Mobile First & Reponsive)
   ========================================= */

/* Tablets y Celulares Grandes (max-width: 900px) */
@media (max-width: 900px) {

    /* 1. Grillas a 1 columna para evitar amontonamientos (EXCEPTO CLASIFICADOS y CATEGORIAS) */
    .top-banners-grid,
    .bottom-banners-grid,
    .highlights-row {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* 1.5 Corrección Estricta para Página de Comercios/Clasificados */
    .classifieds-layout-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem;
    }

    .grid-container-clasificados {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .clasificado {
        padding: 0.75rem !important;
        min-height: auto !important;
    }

    .ad-photo-wrapper,
    .emoji-fallback {
        height: 80px !important;
        aspect-ratio: auto !important;
        margin-bottom: 0.5rem !important;
        padding: 8px !important; /* Padding ligeramente menor en móvil */
    }

    .clasificado h3 {
        font-size: 1rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.2;
    }

    .description {
        font-size: 0.75rem !important;
        margin-bottom: 0.8rem !important;
    }

    /* 2. Ajuste de proporciones generales (Reducir paddings) */
    .main-content {
        padding: 0 1rem;
    }

    .glass-panel {
        padding: 1.25rem;
        /* Achicamos el padding interno de las tarjetas */
    }

    /* 3. Deslizamiento Táctil (Scroll Horizontal suave y sin barra) */
    .main-nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        gap: 1rem;
        width: 100%;
        /* Ocultar barra de scroll nativa */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .main-nav::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    /* Panel de Filtros ocupando 100% y horizontal */
    .sidebar-filters-column {
        position: relative;
        top: 0;
        width: 100% !important;
        margin-bottom: 1.5rem;
    }

    .filter-pills-list {
        display: flex;
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .filter-pills-list::-webkit-scrollbar {
        display: none;
    }

    .filter-pill {
        width: auto !important;
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    /* Ajuste de Banners */
    .banner-slider-container {
        height: 200px !important;
        margin-bottom: 1.5rem;
    }

    .banner-static {
        height: 160px;
    }
}

/* Celulares Estándar y Pequeños (max-width: 600px) */
@media (max-width: 600px) {

    /* Ajustes finales de encabezado y buscador */
    .header {
        padding: 1rem 0.5rem;
        flex-wrap: wrap;
        /* Permite que los elementos se acomoden sin romperse */
        gap: 0.5rem;
    }

    .hero-title {
        font-size: 1.8rem !important;
        /* Texto principal más proporcionado */
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* Buscador adaptativo */
    .search-form {
        flex-direction: column;
        padding: 0.5rem;
        border-radius: 20px;
    }

    .search-icon {
        display: none;
        /* Ocultamos la lupita para ganar espacio al input */
    }

    #searchInput {
        width: 100%;
        text-align: center;
        padding: 1.2rem;
        font-size: 1rem;
    }

    .search-button {
        width: 100%;
        padding: 1rem;
        border-radius: 14px;
        margin-top: 0.5rem;
    }

    /* Ajuste de textos internos de tarjetas para celulares */
    .clasificado h3,
    .category-card h2 {
        font-size: 1.2rem;
    }

    .description {
        font-size: 0.85rem;
    }

    /* Alturas de imágenes en móviles */
    .banner-slider-container {
        height: 160px !important;
    }

    .banner-static {
        height: 130px;
    }

    /* Títulos generales */
    .page-title {
        font-size: 1.8rem;
    }

    /* Footer a 1 sola columna centrada */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-left,
    .footer-right {
        align-items: center;
    }
}

/* =========================================
   10. SELECTOR MULTI-CIUDAD (GLOBAL)
   ========================================= */
.city-selector {
    display: flex;
    gap: 0.25rem;
    background: rgba(241, 245, 249, 0.8); /* Slate 100 light grey */
    border: 1px solid var(--glass-border);
    padding: 0.25rem;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.city-select-btn {
    border: none;
    background: transparent;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b; /* Gris medio/claro */
}

.city-select-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--brand-dark);
}

.city-select-btn.active {
    background: linear-gradient(135deg, #cffafe, #ede9fe); /* Cian/Lavanda Pastel */
    color: #1e1b4b; /* Indigo oscuro elegante */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

@media (max-width: 600px) {
    .city-selector {
        width: 100%;
        justify-content: space-between;
        order: 2;
        margin-top: 0.5rem;
    }
    .city-select-btn {
        flex: 1;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* =========================================
   11. FILTROS DE LOCALIDAD (SOBRE LA GRILLA)
   ========================================= */
.location-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease-out;
}

.loc-pill {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.loc-pill:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--brand-dark);
}

.loc-pill.active {
    background: linear-gradient(135deg, #cffafe, #ede9fe); /* Cian/Violeta pastel */
    color: #1e1b4b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: transparent;
}

/* =========================================
   12. DELIVERY BADGES Y PROMOS
   ========================================= */
.delivery-status-badge {
    position: absolute;
    top: 12px;
    right: 50px; /* Dejar espacio para el botón de compartir */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
    z-index: 5;
}

.delivery-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981; /* Verde esmeralda */
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.delivery-text {
    font-size: 0.68rem;
    font-weight: 800;
    color: #065f46; /* Verde oscuro */
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.delivery-status-badge.closed {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(254, 242, 242, 0.85); /* Red pastel */
}

.delivery-dot.closed-dot {
    background-color: #ef4444; /* Rojo */
    box-shadow: none;
    animation: none;
}

.delivery-text.closed-text {
    color: #991b1b;
}

.delivery-promo-box {
    background: linear-gradient(135deg, rgba(207, 250, 254, 0.5), rgba(237, 233, 254, 0.5));
    border: 1px dashed rgba(139, 92, 246, 0.4);
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.delivery-promo-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    line-height: 1.3;
}

/* =========================================
   13. OFFCANVAS MENU (SIDEBAR)
   ========================================= */
.hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: var(--brand-dark);
    transition: transform 0.2s ease;
    border-radius: 8px;
}
.hamburger-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

.offcanvas-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
}
.offcanvas-menu.active {
    left: 0;
}

.offcanvas-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.offcanvas-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.offcanvas-link {
    display: block;
    padding: 1rem 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--glass-border);
    transition: padding-left 0.2s ease, color 0.2s ease;
}
.offcanvas-link:last-of-type {
    border-bottom: none;
}
.offcanvas-link:hover {
    color: var(--brand-primary);
    padding-left: 0.5rem;
}

.offcanvas-delivery-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #34d399, #10b981); /* Menta / Esmeralda */
    color: white;
    font-weight: 800;
    text-align: center;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.offcanvas-delivery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* =========================================
   14. LAYOUT DE COLUMNAS (BANNERS)
   ========================================= */
.classifieds-layout-container.with-banners {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .classifieds-layout-container.with-banners {
        grid-template-columns: 200px 1fr 200px;
    }
}

.classifieds-layout-container.with-left-banner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .classifieds-layout-container.with-left-banner {
        grid-template-columns: 200px 1fr;
    }
}

.left-banner, .right-banner {
    display: none;
    position: sticky;
    top: 80px;
}

@media (min-width: 1024px) {
    .left-banner, .right-banner {
        display: block;
    }
}

/* =========================================
   15. TARJETAS PREMIUM (DESTACADAS)
   ========================================= */
.premium-card {
    border: 1.5px solid rgba(245, 158, 11, 0.4) !important; /* Dorado cálido sutil */
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.85), rgba(255, 255, 255, 0.75)) !important; /* Vidrio templado con calidez */
    box-shadow: 0 10px 32px 0 rgba(245, 158, 11, 0.12), var(--glass-shadow) !important;
    position: relative;
}

/* Brillo en el borde superior */
.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.8), transparent);
    border-radius: 0 0 100px 100px;
    pointer-events: none;
}

.premium-card:hover {
    border-color: rgba(245, 158, 11, 0.65) !important;
    box-shadow: 0 20px 40px 0 rgba(245, 158, 11, 0.2), 0 8px 16px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-10px) scale(1.01) !important;
}

/* =========================================
   16. VARIABLES FALTANTES (agregadas al :root global aquí para
       compatibilidad sin romper el :root existente)
   ========================================= */
:root {
    --hosp-teal: #63bfa3; /* Color teal para sección de salud */
}

/* =========================================
   17. STATUS WIDGETS (farmacia + clima)
   ========================================= */
.status-widgets-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

#farmaciasContainer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Widget de Clima */
.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.weather-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.weather-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 220px;
}

.weather-temp {
    font-size: 1.1rem;
    color: var(--brand-dark);
    font-weight: 800;
    line-height: 1;
}

.weather-phrase {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: left;
    margin-top: 0.2rem;
    max-height: 1.4em;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.weather-phrase:hover,
.weather-phrase:focus,
.weather-phrase:active {
    white-space: normal;
    max-height: 80px;
}

.weather-phrase:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

body.dark-mode .weather-widget {
    background: rgba(30, 25, 55, 0.9);
    border-color: var(--dm-glass-border);
}

/* =========================================
   18. HIGHLIGHT BOXES (Evento, Comercio, Profesional)
   ========================================= */
.highlight-box {
    display: flex;
    flex-direction: column;
}

.highlight-box__title {
    font-size: 1.2rem;
    color: var(--brand-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.highlight-box__inner {
    flex: 1;
}

/* =========================================
   19. ICON WRAPPER — Modificadores de color
   ========================================= */
.icon-wrapper--blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--brand-primary);
    font-size: 1.5rem;
}

.icon-wrapper--teal {
    background-color: rgba(99, 191, 163, 0.1);
    color: var(--hosp-teal);
    font-size: 1.5rem;
}

.icon-wrapper--purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    font-size: 1.5rem;
}

/* =========================================
   20. FOOTER — Clases estructurales
   ========================================= */
.footer-main {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem 1.5rem 2rem;
    margin-top: 3rem;
    width: 100%;
    box-sizing: border-box;
}

body.dark-mode .footer-main {
    background: rgba(15, 12, 35, 0.85);
    border-color: var(--dm-glass-border);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.footer-brand__logo {
    width: 45px;
    height: auto;
    border-radius: 0;
    object-fit: contain;
    background-color: transparent;
}

.footer-brand__name {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--brand-dark);
}

.footer-tagline {
    color: #333333;
    font-size: 0.95rem;
    margin: 0;
}
body.dark-mode .footer-tagline {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links__title {
    color: var(--brand-dark);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-links a {
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-links a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
    opacity: 0.95;
}

body.dark-mode .footer-links a {
    color: var(--text-muted);
}

body.dark-mode .footer-links a:hover {
    color: var(--brand-dark);
}

.footer-whatsapp-cta {
    background-color: #25D366;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-whatsapp-cta:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: white;
}

.footer-bottom-row {
    max-width: 1200px;
    margin: 2.5rem auto 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: #333333;
    margin: 0;
}
body.dark-mode .footer-copy {
    color: var(--text-muted);
}

.footer-credits {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-credits__sep {
    color: #d1d5db;
}

.footer-credits__logo {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.8;
}

.footer-disclaimer {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    text-align: center;
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.4;
    padding: 0 1rem;
}

/* =========================================
   21. BANNERS — Modificadores de columna
   ========================================= */
.bottom-banners-grid .banner-static {
    height: 180px;
    border-radius: 12px;
}

.banner-column-btn {
    display: inline-flex;
    width: 100%;
    margin-top: 0.5rem;
    justify-content: center;
    border-radius: 12px;
}

/* =========================================
   22. HERO — Modificadores de página
   ========================================= */
.hero--home {
    padding: 1rem 0 2rem 0;
}

.hero-title--home {
    font-size: 2.2rem;
}

/* =========================================
   23. OFFCANVAS MENU — Clases de layout interno
   ========================================= */
.offcanvas-brand {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offcanvas-brand__logo {
    width: 40px;
    height: auto;
    object-fit: contain;
    background-color: transparent;
    border-radius: 0;
    flex-shrink: 0;
}

.offcanvas-brand__name {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--brand-dark);
}

.offcanvas-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* =========================================
   24. CATEGORY CARD — Herencia de colores
   ========================================= */
.category-card h2 {
    color: var(--brand-dark);
}

.category-card p {
    color: var(--text-muted);
}

/* =========================================
   25. PAGINACIÓN "VER MÁS"
   ========================================= */
.ver-mas-container {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.btn-ver-mas {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.35);
    letter-spacing: 0.3px;
}

.btn-ver-mas:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.45);
}

.btn-ver-mas:active {
    transform: translateY(-1px);
}

.btn-ver-mas .arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-ver-mas:hover .arrow {
    transform: translateY(3px);
}

/* =========================================
   26. DARK MODE PRE-RENDER (movido de inline en index.html)
   ========================================= */
.dark-mode-pre body {
    background-image: linear-gradient(135deg, #0f0f1a 0%, #1a1030 50%, #0a1628 100%) !important;
}

/* =========================================================
   AVISO LEGAL (DISCLAIMER CARD) - PASTEL GLASSMORPHISM
   ========================================================= */
.disclaimer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 30px 40px;
    margin: 30px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    border: 1.5px solid rgba(139, 92, 246, 0.25); /* Borde morado pastel muy suave */
    box-shadow: 0 8px 32px 0 rgba(139, 92, 246, 0.12), var(--glass-shadow); /* Destello morado pastel */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.disclaimer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.22), var(--glass-shadow);
}

.disclaimer-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-glow 3s infinite ease-in-out;
}

.disclaimer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.disclaimer-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 15px;
}

.disclaimer-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-main);
    font-weight: 500;
}

/* Animación sutil de respiración para el ícono destacador */
@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 12px 4px rgba(139, 92, 246, 0.4);
    }
}

/* Modo Oscuro - Adaptación de Alto Contraste */
body.dark-mode .disclaimer-card {
    border-color: rgba(224, 64, 251, 0.35); /* Magenta/Morado neón vibrante */
    box-shadow: 0 8px 32px 0 rgba(224, 64, 251, 0.2), var(--glass-shadow);
}

body.dark-mode .disclaimer-card:hover {
    box-shadow: 0 12px 40px 0 rgba(224, 64, 251, 0.3), var(--glass-shadow);
}

body.dark-mode .disclaimer-icon {
    background: rgba(224, 64, 251, 0.15);
}

/* Diseño Responsivo (Mobile-First) */
@media (max-width: 768px) {
    .disclaimer-card {
        padding: 20px 25px;
        gap: 1rem;
    }
    
    .disclaimer-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
}

/* =========================================
   ESTILO DE BOTONES DE CATEGORÍA PRINCIPAL (HOME)
   Glassmorphism y animación de elevación
   ========================================= */
#homeCategoriesGrid .category-card {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05), var(--glass-shadow) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                background-color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease !important;
}

#homeCategoriesGrid .category-card:hover,
#homeCategoriesGrid .category-card:focus,
#homeCategoriesGrid .category-card:active {
    transform: translateY(-3px) !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 12px 30px rgba(31, 38, 135, 0.12) !important;
}

#homeCategoriesGrid .app-label {
    display: block !important;
    text-align: center !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin-top: 0.5rem !important;
    transition: color 0.25s ease !important;
}

/* Modo oscuro específico para las tarjetas de la home */
body.dark-mode #homeCategoriesGrid .category-card {
    background: rgba(30, 41, 59, 0.45) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode #homeCategoriesGrid .category-card:hover {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode #homeCategoriesGrid .app-label {
    color: var(--dm-text-main) !important;
}

/* =========================================
   FORZADO DE GRILLA PARA INICIO (3 COLUMNAS MÓVIL)
   Aplica únicamente al grid principal de la home
   ========================================= */
@media (max-width: 768px) {
    #homeCategoriesGrid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 0 0.25rem !important;
        box-sizing: border-box !important;
    }
    
    #homeCategoriesGrid .category-card {
        width: auto !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0.85rem 0.4rem !important;
        gap: 0.4rem !important;
    }

    #homeCategoriesGrid .home-cat-icon {
        width: 55px !important;
        height: 55px !important;
        object-fit: contain !important;
        margin: 0 auto !important;
    }

    #homeCategoriesGrid .app-label {
        font-size: 0.75rem !important;
    }
}

/* =========================================
   LAYOUT DESKTOP PARA BOTONERA DE CATEGORÍAS (4 + 2)
   Aplica para pantallas mayores a 768px
   ========================================= */
@media (min-width: 769px) {
    #homeCategoriesGrid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1.75rem !important;
        max-width: 960px !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    
    #homeCategoriesGrid .category-card {
        flex: 0 0 calc(25% - 1.5rem) !important;
        min-width: 160px !important;
        max-width: 200px !important;
        height: 180px !important;
        padding: 1.5rem 1rem !important;
        justify-content: center !important;
        gap: 0.8rem !important;
    }

    #homeCategoriesGrid .home-cat-icon {
        width: 85px !important;
        height: 85px !important;
        object-fit: contain !important;
        margin: 0 auto !important;
        transition: transform 0.25s ease !important;
    }

    #homeCategoriesGrid .category-card:hover .home-cat-icon {
        transform: scale(1.1) rotate(2deg) !important;
    }

    #homeCategoriesGrid .app-label {
        font-size: 1.05rem !important;
        font-weight: 800 !important;
    }
}

/* =========================================
   ESTILOS PARA LA NUEVA SECCIÓN DE EMERGENCIAS
   ========================================= */
.salud-emergencias-lista {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.salud-emergencia-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    gap: 0.5rem;
}

body.dark-mode .salud-emergencia-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.salud-emergencia-item__nombre {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.salud-emergencia-item__link {
    font-size: 0.9rem;
    font-weight: 800;
    color: #ef4444; /* Rojo para emergencias */
    text-decoration: none;
    background: rgba(239, 68, 68, 0.08);
    border: 1.5px solid rgba(239, 68, 68, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.salud-emergencia-item__link:hover {
    background: rgba(239, 68, 68, 0.16);
    transform: scale(1.03);
}

body.dark-mode .salud-emergencia-item__link {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
}

body.dark-mode .salud-emergencia-item__link:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Para items con múltiples números */
.salud-emergencia-item--multiple {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.salud-emergencia-item__nums {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.salud-emergencia-item--multiple .salud-emergencia-item__link {
    flex: 1 1 calc(50% - 0.25rem);
    text-align: center;
    min-width: 120px;
}


/* =========================================
   ÍCONOS DIRECTOS DE CATEGORÍA (home-cat-icon)
   Reemplaza el wrapper coloreado — imagen directa max 128px
   ========================================= */
.home-cat-icon {
    width: 80px;
    height: 80px;
    max-width: 128px;
    object-fit: contain;
    display: block;
    /* Sin filtro blanco — las imágenes se muestran a color completo */
    filter: none;
    transition: transform 0.25s ease;
}

.category-card:hover .home-cat-icon {
    transform: scale(1.08) rotate(2deg);
}

@media (max-width: 768px) {
    .home-cat-icon {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 400px) {
    .home-cat-icon {
        width: 48px;
        height: 48px;
    }
}

/* =========================================
   MODAL SALUD — Hospital & Farmacias de Turno
   ========================================= */

/* Overlay de fondo */
.salud-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: flex-end;       /* Sube desde abajo en móvil */
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (min-width: 600px) {
    .salud-modal-overlay { align-items: center; } /* Centrado en desktop */
}

.salud-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Caja del modal */
.salud-modal {
    background: #ffffff;
    width: 100%;
    max-width: 560px;
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
}

@media (min-width: 600px) {
    .salud-modal {
        border-radius: 24px;
        transform: translateY(20px) scale(0.97);
    }
}

.salud-modal-overlay.active .salud-modal {
    transform: translateY(0) scale(1);
}

body.dark-mode .salud-modal {
    background: #1a1a2e;
}

/* Cabecera */
.salud-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

body.dark-mode .salud-modal__header {
    border-color: rgba(255, 255, 255, 0.08);
}

.salud-modal__title-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.salud-modal__icon {
    font-size: 1.6rem;
    line-height: 1;
}

.salud-modal__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0;
}

body.dark-mode .salud-modal__title { color: #f1f5f9; }

.salud-modal__close {
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.salud-modal__close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

body.dark-mode .salud-modal__close {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

/* Scroll interior */
.salud-modal__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.25rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Bloque (Hospital / Farmacias / Emergencias) */
.salud-bloque__titulo {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
}

/* ── Tarjeta de ciudad (Hospital) ── */
.salud-ciudad-card {
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 5px solid transparent;
}

.salud-ciudad-card--teal {
    background: rgba(20, 184, 166, 0.08);
    border-left-color: #14b8a6;
}

.salud-ciudad-card--blue {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: #3b82f6;
}

body.dark-mode .salud-ciudad-card--teal { background: rgba(20, 184, 166, 0.12); }
body.dark-mode .salud-ciudad-card--blue { background: rgba(59, 130, 246, 0.12); }

.salud-ciudad-card__badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.07);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

body.dark-mode .salud-ciudad-card__badge { background: rgba(255,255,255,0.1); }

.salud-ciudad-card__nombre {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0 0 0.2rem 0;
    line-height: 1.2;
}

body.dark-mode .salud-ciudad-card__nombre { color: #f1f5f9; }

.salud-ciudad-card__horario {
    font-size: 1.05rem;
    font-weight: 700;
    color: #14b8a6;
    margin: 0 0 0.2rem 0;
}

.salud-ciudad-card--blue .salud-ciudad-card__horario { color: #3b82f6; }

.salud-ciudad-card__detalle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 0.6rem 0;
}

.salud-ciudad-card__link {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #14b8a6;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.salud-ciudad-card--blue .salud-ciudad-card__link { color: #3b82f6; }

.salud-ciudad-card__link:hover { opacity: 0.75; }

/* ── Botones de Farmacia de Turno ── */
.salud-farmacias-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 400px) {
    .salud-farmacias-grid { grid-template-columns: 1fr; }
}

.salud-farmacia-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.salud-farmacia-btn svg {
    position: absolute;
    bottom: 0.9rem;
    right: 0.9rem;
    opacity: 0.6;
}

.salud-farmacia-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.salud-farmacia-btn--teal {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    color: #0d9488;
}

.salud-farmacia-btn--blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

body.dark-mode .salud-farmacia-btn--teal {
    background: rgba(20, 184, 166, 0.18);
    color: #5eead4;
}

body.dark-mode .salud-farmacia-btn--blue {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

.salud-farmacia-btn__city {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.65;
}

.salud-farmacia-btn__label {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ── Emergencias ── */
.salud-emergencias-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}

@media (max-width: 360px) {
    .salud-emergencias-grid { grid-template-columns: 1fr; }
}

.salud-emergencia-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 0.5rem;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(239, 68, 68, 0.08);
    border: 2px solid rgba(239, 68, 68, 0.2);
    transition: transform 0.2s ease, background 0.2s ease;
    gap: 0.2rem;
}

.salud-emergencia-btn:hover {
    transform: scale(1.04);
    background: rgba(239, 68, 68, 0.14);
}

.salud-emergencia-btn--red   { background: rgba(239, 68, 68, 0.1);  border-color: rgba(239, 68, 68, 0.25);  }
.salud-emergencia-btn--blue  { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.25); }
.salud-emergencia-btn--dark  { background: rgba(30, 30, 50, 0.07);  border-color: rgba(30, 30, 50, 0.15);   }

body.dark-mode .salud-emergencia-btn,
body.dark-mode .salud-emergencia-btn--red,
body.dark-mode .salud-emergencia-btn--blue,
body.dark-mode .salud-emergencia-btn--dark {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.salud-emergencia-btn__num {
    font-size: 1.9rem;
    font-weight: 900;
    color: #ef4444;
    line-height: 1;
}

.salud-emergencia-btn--blue .salud-emergencia-btn__num { color: #3b82f6; }
.salud-emergencia-btn--dark .salud-emergencia-btn__num { color: var(--brand-dark); }

body.dark-mode .salud-emergencia-btn__num { color: #fca5a5; }
body.dark-mode .salud-emergencia-btn--blue .salud-emergencia-btn__num { color: #93c5fd; }
body.dark-mode .salud-emergencia-btn--dark .salud-emergencia-btn__num { color: #f1f5f9; }

.salud-emergencia-btn__lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}

/* =========================================
   CALL TO ACTION — PUBLICÁ AQUÍ / CONTACTO (HOME)
   ========================================= */
.home-cta-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px auto;
    width: 90%;
    max-width: 700px;
}

.home-cta-btn {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    background-color: #f3e8ff !important;
    border: 2px solid #d026b1 !important;
    color: #a21caf !important;
    font-weight: bold !important;
    text-decoration: none !important;
    padding: 10px 24px !important;
    border-radius: 25px !important;
    text-align: center !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: none !important;
}

.home-cta-btn:hover {
    background-color: #e9d5ff !important;
    transform: translateY(-2px);
}

/* =========================================
   EFEMÉRIDES DEL DÍA — Tarjeta dinámica
   ========================================= */
.efemerides-vertical-widget {
    display: none; /* JS lo muestra si hay efemérides */
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.2rem 1.4rem;
    border-radius: 20px;
    background-color: #C5DAF1;
    border: 1px solid rgba(164, 197, 232, 0.65);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06), var(--glass-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin: 0 auto 2rem auto;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.efemerides-vertical-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 38, 135, 0.1);
}

.efemerides-vertical-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #990000;
    letter-spacing: 0.8px;
    margin: 0;
    line-height: 1.2;
}

.efemerides-vertical-content {
    font-size: 0.88rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.45;
    width: 100%;
    cursor: pointer;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.9em;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.efemerides-vertical-content:hover,
.efemerides-vertical-content:focus,
.efemerides-vertical-content:active {
    display: block;
    overflow: visible;
    max-height: 200px;
    outline: none;
}

.efemerides-vertical-content:focus-visible {
    outline: 2px solid #990000;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Modo Oscuro */
body.dark-mode .efemerides-vertical-widget {
    background-color: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .efemerides-vertical-title {
    color: #f87171;
}

body.dark-mode .efemerides-vertical-content {
    color: #e2e8f0;
}

body.dark-mode .efemerides-vertical-content:focus-visible {
    outline-color: #f87171;
}

/* =========================================
   BANNER PROMOCIONAL (CTA) — En lugar de Visitas
   ========================================= */
.cta-banner-container {
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.cta-banner {
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)) padding-box, 
                linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)) border-box !important;
    border: 2px solid transparent !important;
    border-radius: 20px !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

body.dark-mode .cta-banner {
    background: linear-gradient(rgba(30, 25, 55, 0.85), rgba(30, 25, 55, 0.85)) padding-box, 
                linear-gradient(135deg, #e040fb, #3b82f6) border-box !important;
}

.cta-banner__content {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cta-banner__text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    line-height: 1.4;
}

.cta-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-banner__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: white;
}

/* ==========================================================
   MÓDULO DE PARTIDOS Y FIXTURE (TORNEO)
   ========================================================== */

/* ── BANNER DE PARTIDOS DINÁMICO ── */
.matches-banner-container {
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    width: 90%;
}

.matches-banner {
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0.65rem 1.25rem;
    gap: 1rem;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 50px !important; /* Force rounded pill */
    position: relative;
}

.matches-banner, .matches-banner * {
    text-decoration: none !important;
}

.matches-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow-md);
}

.matches-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.matches-banner-badge.badge-next {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.matches-banner-ticker {
    flex: 1;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
    scrollbar-width: none;
}

.matches-banner-ticker::-webkit-scrollbar {
    display: none;
}

.matches-banner-track {
    display: flex;
    align-items: center;
    width: 100%;
}

.matches-banner-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* ── FIXTURE DE TORNEO ── */
.fixture-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.fixture-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    width: 90%;
}

@media (min-width: 768px) {
    .fixture-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.match-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-md);
}

/* Highlights */
.match-card--today {
    border: 2px solid rgba(16, 185, 129, 0.5) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
}

body.dark-mode .match-card--today {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, var(--dm-glass-bg) 100%) !important;
}

.match-card--next {
    border: 2px solid rgba(59, 130, 246, 0.5) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
}

body.dark-mode .match-card--next {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, var(--dm-glass-bg) 100%) !important;
}

.match-card--past {
    opacity: 0.65;
}

.match-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.badge-today-solid {
    background: #10b981;
    color: white !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.badge-today-solid:hover {
    background-color: #059669 !important;
    transform: scale(1.05);
}

.badge-next-solid {
    background: #3b82f6;
    color: white;
}

.badge-past-solid {
    background: #64748b;
    color: white;
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

.match-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.match-team--right {
    flex-direction: row-reverse;
    text-align: right;
}

.team-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .team-logo-placeholder {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
}

.match-vs {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--brand-secondary);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.match-time-venue {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

body.dark-mode .match-time-venue {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.match-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--brand-primary);
    font-weight: 700;
}