/* 📱 CSS MÓVIL MEJORADO - FONDO NEGRO NATIVO Y FILTROS OPTIMIZADOS */

/* ================================
   FONDO NEGRO NATIVO MÓVIL
   ================================ */

@media (max-width: 768px) {
    /* Menú móvil con fondo negro nativo */
    .mobile-menu-container,
    #mobile-menu {
        background: #000000 !important; /* FONDO NEGRO NATIVO */
        color: #ffffff;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
    }

    /* Navbar móvil con fondo negro */
    .navbar-default {
        background: #000000 !important;
        border-color: #333;
    }

    /* Eliminar fondos de gradiente en móvil */
    .mobile-menu-section {
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
    }

    /* Títulos de sección en blanco */
    .section-title {
        color: #ffffff !important;
        font-weight: 600;
        font-size: 14px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .section-title i {
        color: #007bff;
    }
}

/* ================================
   FILTROS AVANZADOS MÓVIL
   ================================ */

.mobile-search-container {
    margin-bottom: 20px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05) !important; /* FONDO MÁS OSCURO */
    border-radius: 25px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#menu-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    outline: none;
}

#menu-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

/* Filtros de ubicación y zona */
.mobile-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    color: white;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    width: 14px;
    text-align: center;
    opacity: 0.8;
}

.mobile-select {
    background: rgba(255, 255, 255, 0.05) !important; /* FONDO MÁS OSCURO */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 10px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.mobile-select option {
    background: #000000 !important; /* FONDO NEGRO PARA OPCIONES */
    color: white;
    padding: 8px;
}

/* Botón de proximidad */
.proximity-action {
    margin-top: 10px;
}

.proximity-btn {
    width: 100%;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 12px;
    padding: 15px;
    color: white;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.proximity-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.proximity-btn:hover::before {
    left: 100%;
}

.proximity-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.proximity-btn i {
    font-size: 20px;
    margin-bottom: 2px;
}

.proximity-btn span {
    font-size: 14px;
    font-weight: 700;
}

.proximity-btn small {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 400;
}

/* ================================
   CATEGORÍAS MÓVIL MEJORADAS
   ================================ */

.mobile-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 12px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 90px;
    justify-content: center;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-btn:hover::before {
    opacity: 1;
}

.category-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.category-btn:active {
    transform: scale(0.98);
}

.category-btn i {
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-btn span {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.category-btn .counter {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    backdrop-filter: blur(5px);
}

/* Colores específicos por categoría */
.category-chicas {
    background: linear-gradient(135deg, #ff6b9d, #e06395);
}

.category-chicos {
    background: linear-gradient(135deg, #4facfe, #00c2ff);
}

.category-travestis {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}

.category-masajes {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
}

/* ================================
   GRID MÓVIL CON BADGES DISTANCIA
   ================================ */

@media (max-width: 768px) {
    /* Grid de anuncios móvil */
    .grid-anuncios-unificado {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
        padding: 10px;
    }

    .anuncio-card {
        position: relative;
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .anuncio-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    /* Badge de distancia móvil */
    .distancia-badge-mobile {
        position: absolute;
        top: 8px;
        right: 8px;
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 10px;
        font-weight: 700;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
        backdrop-filter: blur(5px);
        display: flex;
        align-items: center;
        gap: 2px;
    }

    .distancia-badge-mobile i {
        font-size: 8px;
    }

    /* Imagen del anuncio */
    .anuncio-imagen {
        width: 100%;
        height: 120px;
        object-fit: cover;
        background: #f8f9fa;
    }

    /* Contenido del anuncio */
    .anuncio-contenido {
        padding: 10px;
    }

    .anuncio-titulo {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin-bottom: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .anuncio-ubicacion {
        font-size: 11px;
        color: #666;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .anuncio-ubicacion i {
        font-size: 10px;
        color: #007bff;
    }
}

/* ================================
   RESPONSIVE PARA PANTALLAS PEQUEÑAS
   ================================ */

@media (max-width: 480px) {
    .mobile-filters-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mobile-categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .category-btn {
        padding: 14px 10px;
        min-height: 80px;
    }

    .category-btn i {
        font-size: 20px;
    }

    .category-btn span {
        font-size: 12px;
    }

    .grid-anuncios-unificado {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 8px;
    }
}

/* ================================
   ANIMACIONES Y TRANSICIONES
   ================================ */

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.6);
    }
}

.mobile-menu-section {
    animation: slideInFromBottom 0.3s ease-out;
}

.proximity-btn:focus {
    animation: pulseGlow 2s infinite;
}

/* ================================
   MODO OSCURO COMPATIBLE
   ================================ */

@media (prefers-color-scheme: dark) {
    .anuncio-card {
        background: #2c3e50;
        color: white;
    }

    .anuncio-titulo {
        color: white;
    }

    .anuncio-ubicacion {
        color: #bbb;
    }

    .mobile-select {
        background: rgba(0, 0, 0, 0.3);
    }

    .mobile-select option {
        background: #1a1a1a;
    }
}
