/* ========== VARIABLES GLOBALES MEJORADAS ========== */
:root {
    /* === COLORES PRINCIPALES (coherentes con el gradiente) === */
    --primary-600: #5a67d8;      /* Base primary (azul) */
    --primary-700: #4c51bf;      /* Hover primary */
    --secondary-600: #764ba2;    /* Color secundario del gradiente (morado) */
    
    /* === GRADIENTES === */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient-hover: linear-gradient(135deg, #5a67d8 0%, #633a86 100%);
    
    /* === FONDOS Y SUPERFICIES === */
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-glass-dark: rgba(255, 255, 255, 0.98);
    --bg-surface: #ffffff;
    
    /* === TEXTOS (mejor contraste WCAG) === */
    --text-primary: #1a202c;      /* Texto principal - más oscuro para mejor contraste */
    --text-secondary: #4a5568;    /* Texto secundario */
    --text-muted: #718096;        /* Texto deshabilitado/muted - mejor contraste que #636e72 */
    
    /* === COLORES DE ESTADO === */
    --success: #25D366;
    --success-dark: #128C7E;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* === SOMBRAS (jerarquía visual) === */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* === BORDES === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* === TRANSICIONES === */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* === ALIAS (para mantener compatibilidad con código existente) === */
    --glass-bg: var(--bg-glass);
    --glass-bg-dark: var(--bg-glass-dark);
    --text-main: var(--text-primary);
    --primary-color: var(--primary-600);
    --primary-hover: var(--primary-700);
    --success-color: var(--success);
    --shadow-soft: var(--shadow-md);
    --shadow-strong: var(--shadow-lg);
    --radius: var(--radius-md);
    --transition: var(--transition-base);
}

/* ========== RESET Y BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Datatype", monospace;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--primary-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER & BANNER ========== */
.main-header {
    width: 100%;
}

.banner {
    width: 100%;
    height: 300px;
    background-image: url('../img/banner.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    pointer-events: none;
}

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

/* ========== SECCIÓN DE BIENVENIDA ========== */
.welcome-section {
    margin: 40px 0;
}

.text-card {
    background: var(--glass-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.text-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.welcome-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    font-weight: 600;
}

.welcome-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ========== SECCIÓN DE CONDUCTORES ========== */
.drivers-section {
    margin: 40px 0 60px;
}

.driver-category {
    margin-bottom: 50px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.category-header i {
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.category-header:hover i {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.4);
}

.category-header h2 {
    font-size: 1.8rem;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.category-count {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
}

/* Grid de tarjetas */
.drivers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* ========== TARJETAS DE CONTACTO ========== */
.contact-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out forwards;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
    transform-origin: left;
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(90, 103, 216, 0.2);
}

.contact-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--color-gray-200, #e2e8f0);
    padding-bottom: 12px;
}

.vehicle-badge {
    font-size: 0.85rem;
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.contact-info i {
    width: 30px;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.contact-info p:hover i {
    transform: scale(1.1);
}

.contact-info i.fa-whatsapp {
    color: var(--success-color);
}

.contact-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ========== BOTONES ========== */
.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-call {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-call:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-whatsapp {
    background: var(--success-color);
    color: white;
}

.btn-whatsapp:hover {
    background: var(--success-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.loading-spinner i {
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ========== FOOTER ========== */
.main-footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    margin-top: auto;
    padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    text-align: center;
    max-width: 1280px;
    margin: 0 auto;
}

.main-footer p {
    color: white;
    font-size: 0.9rem;
}

.footer-tagline {
    font-size: 0.85rem;
    margin-top: 8px;
    opacity: 0.8;
}

.footer-credits {
    margin-top: 15px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.credit-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    display: inline-block;
}

.credit-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width var(--transition-base);
}

.credit-link:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.credit-link:hover::after {
    width: 100%;
}

/* ========== ANUNCIOS ADSENSE ========== */
.ad-container {
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
}

.adsbygoogle {
    background: var(--bg-glass);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    min-height: 90px;
}

.ad-test-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--color-gray-200, #f0f0f0);
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-top: 8px;
    text-align: center;
}

.ad-notice {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 10px;
}

.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* ========== PUBLICIDAD LOCAL ========== */
.local-ad-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    margin: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.local-ad-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(90, 103, 216, 0.2);
}

.local-ad-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
}

.local-ad-card:hover .local-ad-icon {
    transform: scale(1.05);
}

.local-ad-icon i {
    font-size: 2rem;
    color: white;
}

.local-ad-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.local-ad-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1rem;
}

.local-ad-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.local-ad-note {
    font-size: 0.8rem;
    color: var(--warning) !important;
    margin-top: 15px;
}

.local-ad-card-small {
    padding: 20px;
    background: var(--bg-glass-dark);
}

.local-ad-card-small h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.local-ad-card-small p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

/* ========== ANUNCIOS LOCALES (CARRUSEL) ========== */
.anuncios-titulo {
    font-size: 1.5rem;
    color: white;
    margin: 30px 0 20px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.anuncios-titulo i {
    color: var(--warning);
}

.anuncio-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.anuncio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(90, 103, 216, 0.2);
}

.anuncio-header {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--color-gray-200, rgba(0, 0, 0, 0.05));
}

.anuncio-header i {
    font-size: 1.5rem;
    width: 35px;
    text-align: center;
    color: var(--primary-color);
}

.anuncio-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.anuncio-body {
    padding: 15px;
    flex: 1;
}

.anuncio-body h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.anuncio-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 10px;
}

.anuncio-address {
    font-size: 0.8rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.anuncio-address i {
    color: var(--primary-color);
    font-size: 0.7rem;
}

.anuncio-footer {
    padding: 12px 15px;
    border-top: 1px solid var(--color-gray-200, #e2e8f0);
    display: flex;
    gap: 10px;
}

.anuncio-btn {
    flex: 1;
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
}

/* ========== CARRUSEL ========== */
.anuncios-carousel-container {
    position: relative;
    margin: 20px 0 40px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.anuncios-carousel-track {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.anuncios-carousel-slides {
    display: flex;
    transition: transform var(--transition-base);
}

.carousel-slide {
    flex: 0 0 100%;
    display: flex;
    gap: 5%;
    padding: 2% 5%;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow-soft);
}

.carousel-btn:hover {
    background: var(--bg-surface);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-strong);
}

.carousel-prev {
    left: 0%;
}

.carousel-next {
    right: 0%;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-dot.active {
    width: 25px;
    border-radius: 5px;
    background: white;
}

.anuncios-carousel-container .anuncio-card {
    flex: 1;
    min-width: 0;
    margin: 0;
}

/* ========== ANIMACIONES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carousel-slide .anuncio-card {
    animation: slideIn var(--transition-base) ease-out;
}

/* ========== ACCESIBILIDAD ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.btn:focus-visible,
.contact-card a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========== MEDIA QUERIES AGRUPADAS ========== */

/* Tablet y móviles grandes (max-width: 768px) */
@media (max-width: 768px) {

    /* Contenedor */
    .container {
        padding: 0 15px;
    }

    /* Bienvenida */
    .text-card {
        padding: 25px;
    }

    .welcome-title {
        font-size: 1.8rem;
    }

    .welcome-description {
        font-size: 1rem;
    }

    /* Conductores */
    .category-header h2 {
        font-size: 1.4rem;
    }

    .drivers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-card h3 {
        font-size: 1.2rem;
    }

    /* Anuncios AdSense */
    .ad-container {
        margin: 15px auto;
        padding: 0 15px;
    }

    .adsbygoogle {
        min-height: 70px;
    }

    .ad-test-badge {
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    /* Publicidad local */
    .local-ad-card {
        padding: 20px;
    }

    .local-ad-content h3 {
        font-size: 1.2rem;
    }

    .local-ad-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .local-ad-buttons .btn {
        width: 100%;
    }

    .local-ad-icon {
        width: 50px;
        height: 50px;
    }

    .local-ad-icon i {
        font-size: 1.5rem;
    }

    /* Anuncios locales */
    .anuncios-titulo {
        font-size: 1.2rem;
    }

    /* Carrusel */
    .carousel-slide {
        flex-direction: column;
        gap: 15px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .carousel-dot.active {
        width: 20px;
    }
}

/* Móviles pequeños (max-width: 480px) */
@media (max-width: 480px) {
    .text-card {
        padding: 20px;
    }

    .contact-info p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .carousel-slide {
        gap: 15px;
    }
}

/* ========== ESTILOS PARA TEMA OSCURO (ACTIVADO POR SWITCH) ========== */

/* Definición de variables para tema oscuro */
body.dark-theme {
    --bg-glass: rgba(0, 0, 0, 0.85);
    --bg-glass-dark: rgba(0, 0, 0, 0.9);
    --bg-surface: rgba(30, 30, 40, 0.95);
    --text-primary: #f5f5f5;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* IMPORTANTE: Sobrescribir el gradiente del fondo */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    background-attachment: fixed;
}

/* Ajustes específicos para tema oscuro */
body.dark-theme .contact-card,
body.dark-theme .local-ad-card,
body.dark-theme .anuncio-card {
    border-color: var(--border-color);
    background: var(--bg-surface);
}

body.dark-theme .contact-card h3 {
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-theme .category-header i {
    background: rgba(0, 0, 0, 0.5);
}

body.dark-theme .ad-test-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

body.dark-theme .anuncio-header,
body.dark-theme .anuncio-footer {
    border-color: var(--border-color);
}

body.dark-theme .btn-call {
    background: var(--primary-600);
}

body.dark-theme .btn-call:hover {
    background: var(--primary-700);
}

body.dark-theme .text-card {
    background: var(--bg-glass);
}

body.dark-theme .welcome-description {
    color: var(--text-secondary);
}

body.dark-theme .contact-info p {
    color: var(--text-secondary);
}

body.dark-theme .contact-info i {
    color: var(--primary-600);
}

body.dark-theme .anuncio-body h3 {
    color: var(--text-primary);
}

body.dark-theme .anuncio-description {
    color: var(--text-secondary);
}

body.dark-theme .local-ad-content h3 {
    color: var(--text-primary);
}

body.dark-theme .local-ad-content p {
    color: var(--text-secondary);
}

body.dark-theme .local-ad-card-small h4 {
    color: var(--text-primary);
}

body.dark-theme .local-ad-card-small p {
    color: var(--text-secondary);
}

body.dark-theme .theme-switch-wrapper {
    background: var(--bg-glass);
    border-color: var(--border-color);
}

body.dark-theme .theme-label {
    color: var(--text-primary);
}

body.dark-theme .carousel-btn {
    background: var(--bg-glass);
    color: var(--primary-600);
}

body.dark-theme .carousel-btn:hover {
    background: var(--bg-surface);
}

body.dark-theme .loading-spinner {
    color: white;
}

body.dark-theme .main-footer {
    background: rgba(0, 0, 0, 0.6);
}

body.dark-theme .credit-link {
    color: white;
}

body.dark-theme .credit-link::after {
    background: var(--primary-gradient);
}

body.dark-theme .ad-notice {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-theme .adsbygoogle {
    background: var(--bg-glass);
}

/* ========== SWITCH DE TEMA ========== */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-glass);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-muted);
    transition: var(--transition-base);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.slider i {
    font-size: 14px;
    color: white;
    z-index: 1;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-base);
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

input:checked + .slider {
    background-color: var(--primary-600);
}

.theme-label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Botón simple alternativo */
.btn-theme {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
    padding: 10px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.btn-theme:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-theme i {
    font-size: 1rem;
}

/* Transiciones suaves para cambio de tema */
body,
.contact-card,
.local-ad-card,
.anuncio-card,
.text-card,
.btn,
.category-header i,
.anuncio-header,
.anuncio-footer {
    transition: background-color var(--transition-base), 
                color var(--transition-base), 
                border-color var(--transition-base),
                box-shadow var(--transition-base);
}

/* Estilos para tema oscuro (clase que se activa con JS) */
body.dark-theme {
    --bg-glass: rgba(0, 0, 0, 0.85);
    --bg-glass-dark: rgba(0, 0, 0, 0.9);
    --bg-surface: rgba(30, 30, 40, 0.95);
    --text-primary: #f5f5f5;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .contact-card,
body.dark-theme .local-ad-card,
body.dark-theme .anuncio-card {
    border-color: var(--border-color);
}

body.dark-theme .contact-card h3 {
    border-bottom-color: var(--border-color);
}

body.dark-theme .category-header i {
    background: rgba(0, 0, 0, 0.5);
}

body.dark-theme .ad-test-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

body.dark-theme .anuncio-header,
body.dark-theme .anuncio-footer {
    border-color: var(--border-color);
}

body.dark-theme .btn-call {
    background: var(--primary-600);
}

body.dark-theme .btn-call:hover {
    background: var(--primary-700);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .theme-switch-wrapper {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
    }
    
    .theme-switch {
        width: 50px;
        height: 26px;
    }
    
    .slider:before {
        height: 20px;
        width: 20px;
    }
    
    input:checked + .slider:before {
        transform: translateX(24px);
    }
    
    .theme-label {
        display: none;
    }
    
    .btn-theme {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .btn-theme span {
        display: none;
    }
}