/* Variables CSS para AdFibra */
:root {
    --primary: #004AFF;
    --secondary: #333333;
    --white: #FFFFFF;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark: #212529;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gradient-primary: linear-gradient(135deg, #004AFF 0%, #0066FF 100%);
}

/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--secondary);
    overflow-x: hidden;
    padding-top: 200px; /* Ajustado para acomodar la top-bar y navbar */
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0035c0;
}

/* Botones */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 74, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 74, 255, 0.4);
    background: linear-gradient(135deg, #0035c0 0%, #0052e6 100%);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 25px;
    padding: 10px 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 74, 255, 0.3);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Colores de utilidad */
.bg-primary {
    background: var(--gradient-primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* Top Bar */
.top-bar {
    background: var(--gradient-primary) !important;
    transition: all 0.3s ease;
    z-index: 1031;
    font-size: 0.9rem;
    position: fixed;
    width: 100%;
    top: 0;
}

.top-bar.top-bar-scrolled {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header y Navegación */
.header .navbar {
    transition: all 0.3s ease;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    margin-top: 40px; /* Espacio para la top-bar */
}

.navbar.navbar-scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--secondary) !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    transform: translateY(-1px);
}

.logo-img {
    transition: height 0.3s ease;
}

@media (max-width: 767.98px) {
    .logo-img {
        height: 45px !important;
    }
    
    body {
        padding-top: 180px; /* Ajustado para móviles */
    }
}

/* Dropdown menus */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 1rem 0;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--light-gray);
    color: var(--primary);
    transform: translateX(5px);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/hero-pattern.svg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Secciones */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Tarjetas de planes */
.plan-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.plan-card.featured {
    border: 3px solid var(--primary);
    transform: scale(1.05);
}

.plan-card.featured::before {
    content: 'MÁS POPULAR';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--gradient-primary);
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(45deg);
    z-index: 10;
}

.plan-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-price small {
    font-size: 1rem;
    opacity: 0.8;
}

.plan-data {
    font-size: 1.2rem;
    opacity: 0.9;
}

.plan-body {
    padding: 2rem;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features i {
    color: var(--success);
    margin-right: 0.5rem;
    width: 20px;
}

/* Botones flotantes */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.contract-float {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1000;
}

.contract-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 74, 255, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contract-btn:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 74, 255, 0.6);
}

.contract-btn i {
    margin-right: 0.5rem;
}

/* Mapa de cobertura */
.coverage-map {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Formularios */
.form-control {
    border-radius: 10px;
    border: 2px solid var(--light-gray);
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 74, 255, 0.25);
}

.form-select {
    border-radius: 10px;
    border: 2px solid var(--light-gray);
    padding: 12px 15px;
}

/* Badges y etiquetas */
.badge-promo {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Comparador de planes */
.plan-comparison {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.comparison-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.comparison-row {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-feature {
    font-weight: 500;
}

.comparison-value {
    color: var(--primary);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--dark) !important;
    margin-top: 80px;
}

.footer h5 {
    color: var(--primary) !important;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer a {
    color: #adb5bd;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 74, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Cookie consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 0;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .plan-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
    
    .whatsapp-float,
    .contract-float {
        right: 15px;
    }
    
    .contract-float {
        bottom: 80px;
    }
    
    .contract-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .contract-btn span {
        display: none;
    }
}

/* Utilidades adicionales */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-primary {
    border-color: var(--primary) !important;
}

.shadow-primary {
    box-shadow: 0 4px 15px rgba(0, 74, 255, 0.3) !important;
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}