/* 
 * IAGestión - Estilos Personalizados
 * Basado en el diseño de Inmoweb.es
 */

:root {
    --primary-color: #269dd9;
    --primary-rgb: 38, 157, 217;
    --bs-primary: #269dd9;
    --bs-primary-rgb: 38, 157, 217;
    --secondary-color: #1a7ba8;
    --dark-color: #2b2b2a;
    --light-color: #f8fafc;
    --accent-gray: #9e9e9e;
    --light-gray: #c8c7c7;
    --gradient: linear-gradient(135deg, #269dd9 0%, #1a7ba8 100%);
    --gradient-wow: linear-gradient(135deg, #269dd9 0%, #1a7ba8 100%);
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
}

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

.dropdown-item:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* Botones Unificados WOW */
.btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 2.2rem;
}

.btn-primary,
.btn-primary-custom,
.btn-hero-primary {
    background: #269dd9 !important;
    background: var(--gradient-wow) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(38, 157, 217, 0.4) !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary:hover,
.btn-primary-custom:hover,
.btn-hero-primary:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 15px 35px rgba(38, 157, 217, 0.6) !important;
    color: white !important;
}

.btn-primary::after,
.btn-primary-custom::after,
.btn-hero-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-primary:hover::after,
.btn-primary-custom:hover::after,
.btn-hero-primary:hover::after {
    left: 100%;
}

.btn-light:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

.btn-secondary,
.btn-hero-secondary,
.btn-outline-light {
    background: transparent !important;
    border: 2px solid white !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.btn-secondary:hover,
.btn-hero-secondary:hover,
.btn-outline-light:hover {
    background: white !important;
    color: var(--primary-color) !important;
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-3px) scale(1.02) !important;
}

.btn-light {
    background: white !important;
    color: var(--primary-color) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.btn-light:hover {
    background: #f8fafc !important;
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Override para btn-hero-primary específico si se quiere blanco en fondos oscuros */
.hero-buttons .btn-hero-primary {
    background: white !important;
    color: var(--primary-color) !important;
}

.hero-buttons .btn-hero-primary:hover {
    background: #fdfdfd !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: white;
    padding-top: 100px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

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

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

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: var(--light-color);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(38, 157, 217, 0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-description {
    color: #64748b;
    line-height: 1.7;
}

/* Advantage Section */
.advantage-section {
    padding: 6rem 0;
    background: white;
}

.advantage-item {
    display: flex;
    align-items: start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.advantage-item:hover {
    background: var(--light-color);
    transform: translateX(10px);
}

.advantage-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.advantage-content h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.advantage-content p {
    color: #64748b;
    margin: 0;
}

.advantage-image {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* CTA Section */
.cta-section {
    background: var(--gradient);
    padding: 6rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

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

.cta-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

/* Stats Section */
.stats-section {
    background: var(--dark-color);
    color: white;
    padding: 4rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.footer {
    background: #0f172a;
    color: white;
    padding: 4rem 0 2rem;
}

.footer h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    line-height: 40px;
    text-align: center;
    color: white;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

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

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

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

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

    .section-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .navbar-nav .nav-link {
        text-align: center;
        padding: 0.75rem 0;
    }

    .navbar-nav .btn-primary-custom {
        margin-top: 1rem;
        width: 100%;
    }
}

/* Estadísticas de Apertura */
.stats-comparison {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.stat-bar-container {
    margin-bottom: 2rem;
}

.stat-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-custom {
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-ia {
    background: var(--gradient);
    height: 100%;
}

.progress-bar-wa {
    background: #25D366;
    /* WhatsApp Green */
    height: 100%;
}

.progress-bar-comp {
    background: #94a3b8;
    height: 100%;
}

/* Calculadora */
.calculator-box {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.calc-input-group {
    margin-bottom: 2rem;
}

.calc-input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.calc-range {
    width: 100%;
    margin-bottom: 0.5rem;
}

.calc-result-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.calc-result-card.ia-premium {
    background: rgba(38, 157, 217, 0.05);
    border-left-color: var(--primary-color);
}

.calc-result-card.wa-premium {
    background: rgba(37, 211, 102, 0.05);
    border-left-color: #25D366;
}

.calc-result-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-color);
}

.calc-result-label {
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mega Menu Custom Styles */
@media (min-width: 992px) {
    .navbar-nav .nav-item.dropdown.mega-menu {
        position: static;
    }

    .navbar-nav .dropdown-menu.mega-menu-content {
        width: 100vw;
        max-width: 1100px;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        border: none;
        border-radius: 24px;
        box-shadow: 0 40px 100px rgba(0, 0, 0, 0.15);
        padding: 3rem;
        margin-top: 15px;
        display: block !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .navbar-nav .nav-item.dropdown.mega-menu:hover .mega-menu-content {
        opacity: 1;
        visibility: visible;
        margin-top: 0;
    }

    .mega-menu-columns {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .mega-menu-column-title {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 800;
        color: #94a3b8;
        margin-bottom: 1.5rem;
        padding-left: 1rem;
    }

    .mega-menu-item {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        padding: 1rem;
        border-radius: 16px;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        text-decoration: none;
        color: #1e293b;
        margin-bottom: 0.5rem;
    }

    .mega-menu-item:hover {
        background: #f8fafc;
        transform: translateX(10px);
        color: var(--primary-color) !important;
    }

    .mega-menu-icon {
        width: 48px;
        height: 48px;
        background: rgba(38, 157, 217, 0.08);
        color: var(--primary-color);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        flex-shrink: 0;
        transition: all 0.3s ease;
    }

    .mega-menu-item:hover .mega-menu-icon {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1) rotate(5deg);
    }

    .mega-menu-text {
        display: flex;
        flex-direction: column;
    }

    .mega-menu-title {
        font-weight: 700;
        font-size: 1rem;
        margin-bottom: 0.1rem;
    }

    .mega-menu-desc {
        font-size: 0.8rem;
        color: #64748b;
        font-weight: 400;
    }

    .border-end-lg {
        border-right: 1px solid #f1f5f9;
        padding-right: 1.5rem;
    }
}

/* Mobile Dropdown Optimization */
@media (max-width: 991px) {
    .dropdown-menu.mega-menu-content {
        border: none;
        box-shadow: none !important;
        padding: 0 1rem !important;
        background: transparent !important;
        display: none;
    }

    .dropdown-menu.mega-menu-content.show {
        display: block;
    }

    .mega-menu-column-title {
        font-size: 0.7rem;
        margin: 1.5rem 0 0.5rem 0;
        color: var(--primary-color) !important;
        display: block !important;
    }

    .mega-menu-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid #f1f5f9;
        border-radius: 0;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-decoration: none;
        color: var(--dark-color) !important;
    }

    .mega-menu-desc {
        display: none;
    }

    .mega-menu-icon {
        width: 32px;
        height: 32px;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 1rem;
        color: var(--primary-color);
    }
}

/* Global Branding Overrides */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

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

a:hover {
    color: var(--secondary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.badge.bg-primary {
    background: var(--gradient-wow) !important;
}

/* WOW Shadow for cards using primary */
.shadow-primary-wow {
    box-shadow: 0 20px 40px rgba(38, 157, 217, 0.15) !important;
}