/* ========================================
   TopSaver Club - Estilos Página de Inicio
   ======================================== */

/* ========================================
   SECCIÓN HERO
   ======================================== */

.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 4rem 0 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100"><path d="M0,0v100h1000V0c-200,20-400,40-600,30C300,20,100,10,0,0z" fill="rgba(255,255,255,0.03)"/></svg>') repeat-x;
    background-size: 1000px 100px;
    animation: wave 30s linear infinite;
    opacity: 0.6;
}

.hero-badge {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    animation: pulse 2s infinite;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(98, 0, 234, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    line-height: 1.1;
    position: relative;
    z-index: 2;
}

.text-highlight {
    color: #ffd600;
    position: relative;
}

.text-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, transparent, rgba(255, 214, 0, 0.3), transparent);
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

/* ========================================
   BARRA DE BÚSQUEDA
   ======================================== */

.search-bar {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
    z-index: 2;
}

.search-form {
    position: relative;
}

.search-input {
    border-radius: 50px;
    padding: 1rem 130px 1rem 2rem;
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    background: white;
    transform: translateY(-2px);
}

.btn-buscar {
    position: absolute;
    right: 8px;
    top: 8px;
    border-radius: 50px;
    background: var(--primary-gradient);
    color: white;
    /* padding: 0.75rem 1.5rem; */
    border: none;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(98, 0, 234, 0.3);
}

.btn-buscar:hover {
    background: linear-gradient(135deg, #7c4dff 0%, #5e35b1 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(98, 0, 234, 0.4);
    color: white;
}

/* Sugerencias de búsqueda */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    margin-top: 8px;
    padding: 1rem 0;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item i {
    color: var(--primary-color);
    width: 16px;
}

/* ========================================
   ESTADÍSTICAS
   ======================================== */

.stats-container {
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-md);
    padding: 1.5rem 1rem;
    color: white;
    transition: all var(--transition-normal);
    text-align: center;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.stat-icon {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* ========================================
   SECCIÓN DE CONTENIDO PRINCIPAL
   ======================================== */

.section-header {
    margin-bottom: 2rem;
    position: relative;
}

.section-title {
    font-size: 2rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1rem;
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.link-ver-todas {
    color: var(--primary-color);
    font-size: 1rem;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.link-ver-todas:hover {
    color: var(--accent-color);
    transform: translateX(3px);
}

.link-ver-todas i {
    transition: transform var(--transition-fast);
}

.link-ver-todas:hover i {
    transform: translateX(3px);
}

/* ========================================
   SECCIÓN CTA
   ======================================== */

.cta-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    margin-top: 4rem;
    border-radius: 20px 20px 20px 20px;
}

.cta-section h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-1000px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
    75% { transform: scale(1.1); }
}

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

.stat-number.counting {
    animation: countUp 0.6s ease-out;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 4rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .search-input {
        padding: 0.875rem 110px 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-buscar {
        /* padding: 0.625rem 1rem; */
        font-size: 0.85rem;
    }
    
    .btn-buscar .d-none.d-sm-inline {
        display: none !important;
    }
    
    .stats-container {
        margin-top: 2rem;
    }
    
    .stat-card {
        padding: 1rem 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: start !important;
        gap: 1rem;
    }
    
    .promo-img-container {
        height: 180px;
    }
    
    .promo-card .card-body {
        padding: 1rem;
    }
    
    .empresa-mini-card {
        padding: 1rem 0.5rem;
    }
    
    .empresa-logo {
        width: 50px;
        height: 50px;
    }
    
    .cta-section .row {
        text-align: center;
    }
    
    .cta-section .col-md-4 {
        margin-top: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-bar {
        margin: 1.5rem auto;
    }
    
    .search-input {
        padding: 0.75rem 100px 0.75rem 1rem;
    }
    
    .btn-buscar {
        /* padding: 0.5rem 0.75rem; */
        right: 6px;
        top: 6px;
    }
    
    .stats-container .col-6 {
        margin-bottom: 1rem;
    }
    
    .favorite-btn {
        width: 35px;
        height: 35px;
    }
    
    .badge-promo {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
    }
}

/* ========================================
   MEJORAS DE ACCESIBILIDAD
   ======================================== */

.promo-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.empresa-mini-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .promo-card:hover .promo-img-container img {
        transform: scale(1.05);
    }
    
    .hero-section::before {
        animation: none;
    }
    
    .hero-badge {
        animation: none;
    }
    
    .favorite-btn.favorited i {
        animation: none;
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
    .promo-card {
        background: #2d2d2d;
        color: white;
    }
    
    .empresa-mini-card {
        background: #2d2d2d;
        color: white;
        border-color: #404040;
    }
    
    /* .empresa-icon {
        background: #404040;
    } */
    
    .promo-title,
    .empresa-mini-card .empresa-name {
        color: white;
    }
}

/* ========================================
   IMPRESIÓN
   ======================================== */

@media print {
    .hero-section,
    .favorite-btn,
    .btn-ver-mas,
    .load-more-btn,
    .cta-section {
        display: none;
    }
    
    .promo-card,
    .empresa-mini-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .section-title::after {
        display: none;
    }
}