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

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #1e293b;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
    cursor: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(37,99,235,0.3);
    border-radius: 50%;
    border-top-color: #2563eb;
    animation: spin 1s infinite;
}

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

/* ===== SCROLL PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    z-index: 1001;
    transition: width 0.1s;
}

/* ===== TIPOGRAFÍA ===== */
.section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    margin: 0.5rem auto 0;
    border-radius: 3px;
}

.section-subtitle {
    text-align: center;
    color: #475569;
    margin-bottom: 2rem;
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb, #7c3aed, #06b6d4);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.8rem 0;
    transition: all 0.3s;
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-img {
    height: 45px;
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: width 0.3s;
}

.nav-links li a:hover::before {
    width: 100%;
}

.nav-links li a:hover {
    color: #2563eb;
}

.menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(145deg, #f8fafc, #ffffff);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-content, .hero-image {
    flex: 1;
    min-width: 280px;
}

.hero-content h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.hero-content p {
    color: #475569;
    margin-bottom: 2rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(37,99,235,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37,99,235,0.4);
}

.btn-outline {
    border: 2px solid #2563eb;
    color: #2563eb;
    background: transparent;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

.dashboard-gif {
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 25px 45px -12px rgba(0,0,0,0.25);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== BENEFICIOS ===== */
.benefits {
    padding: 5rem 0;
    background: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s;
    cursor: pointer;
    border: 1px solid rgba(37,99,235,0.1);
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37,99,235,0.1), transparent);
    transition: left 0.5s;
}

.benefit-card:hover::before {
    left: 100%;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 40px -15px rgba(37,99,235,0.2);
}

.benefit-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.benefit-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* ===== ENERGY SAVING ===== */
.energy-saving {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.energy-content {
    position: relative;
    z-index: 1;
}

.energy-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
}

.energy-content p {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== SEGURIDAD ===== */
.security {
    padding: 5rem 0;
    background: #f1f5f9;
}

.security-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.security-text {
    flex: 1;
}

.security-text ul {
    list-style: none;
    margin: 1.5rem 0;
}

.security-text ul li {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.security-text ul li:hover {
    background: rgba(37,99,235,0.05);
    transform: translateX(5px);
}

.security-text ul li i {
    color: #2563eb;
    width: 24px;
}

.whatsapp-gifs {
    flex: 1;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.gif-placeholder {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
    width: 240px;
    transition: all 0.4s;
    cursor: pointer;
}

.gif-placeholder:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 35px -12px rgba(37,99,235,0.2);
}

.gif-placeholder img {
    width: 100%;
    border-radius: 12px;
}

/* ===== COMODIDAD ===== */
.comfort {
    padding: 5rem 0;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    text-align: center;
}

.comfort-content {
    max-width: 800px;
    margin: 0 auto;
}

.comfort-content h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* ===== ESCENAS ===== */
.scenes {
    padding: 5rem 0;
    background: #f8fafc;
}

.scenes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.scene-card {
    background: white;
    padding: 1.8rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.scene-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transform: scaleX(0);
    transition: transform 0.3s;
}

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

.scene-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15);
}

.scene-card i {
    font-size: 2rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    display: inline-block;
}

.scene-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* ===== AUTOMATIZACIONES ===== */
.automations {
    padding: 5rem 0;
    background: white;
}

.automations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.auto-card {
    background: linear-gradient(135deg, #f1f5f9, #ffffff);
    padding: 1.8rem;
    border-radius: 20px;
    transition: all 0.4s;
    border: 1px solid rgba(37,99,235,0.1);
    position: relative;
    overflow: hidden;
}

.auto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -12px rgba(37,99,235,0.15);
}

.auto-card i {
    font-size: 2rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.auto-card h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.auto-card p {
    color: #475569;
    line-height: 1.5;
}

/* Toggles para automatizaciones */
.auto-toggle {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 48px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.auto-toggle.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.auto-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.auto-toggle.active::before {
    transform: translateX(24px);
}

.auto-status {
    position: absolute;
    bottom: 0.8rem;
    right: 1rem;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(0,0,0,0.05);
    color: #64748b;
}

.auto-status.active {
    background: rgba(37,99,235,0.1);
    color: #2563eb;
}

/* ===== EFECTOS DE CURSOR ===== */
.cursor-effect {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 2px solid #2563eb;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
    opacity: 0.5;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #2563eb;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.15s, height 0.15s, background 0.15s;
    box-shadow: 0 0 8px rgba(37,99,235,0.8);
}

/* ===== APP SHOWCASE ===== */
.app-showcase {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
}

.app-showcase .section-title {
    color: white;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
}

.app-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.app-grid img {
    width: 200px;
    border-radius: 32px;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
    transition: all 0.4s;
    cursor: pointer;
}

.app-grid img:hover {
    transform: scale(1.08) translateY(-8px);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(37,99,235,0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    transition: all 0.3s;
}

.whatsapp-float i {
    font-size: 2rem;
    color: white;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
}

/* ===== NOTIFICACIÓN TOAST ===== */
.toast-notification {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s;
}

.toast-notification.show {
    transform: translateX(0);
}

/* ===== FOOTER ===== */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info {
    flex: 1;
}

.footer-logo {
    height: 50px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-contact h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-contact p {
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: #cbd5e1;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    font-size: 0.85rem;
}

.whatsapp-link {
    color: #cbd5e1;
    text-decoration: none;
}

.whatsapp-link:hover {
    color: #25D366;
    text-decoration: underline;
}

/* ===== EFECTO DE PARTÍCULAS ===== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #2563eb;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1s forwards;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 50px), var(--ty, -50px));
        opacity: 0;
    }
}

/* ===== ANIMACIONES EXTRA ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.8s forwards;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
    }
    .nav-links.active {
        display: flex;
    }
    .hero-grid {
        flex-direction: column-reverse;
        text-align: center;
    }
    .btn-group {
        justify-content: center;
    }
    .security-grid {
        flex-direction: column;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-contact p {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .app-grid img {
        width: 140px;
    }
    .cursor-effect, .cursor-dot {
        display: none;
    }
    .back-to-top, .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 20px;
    }
    .back-to-top {
        left: 20px;
    }
    .whatsapp-float {
        right: 20px;
    }
}