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

body {
    font-family: 'Inter', sans-serif;
    background-color: #0B0F2A;
    color: #f0f0f0;
    line-height: 1.5;
    scroll-behavior: smooth;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

:root {
    --primary-dark: #101646;
    --primary-blue: #0043d6;
    --whatsapp: #25D366;
    --gray: #cbd5e1;
    --white: #ffffff;
}

/* ===== HEADER ===== */
.header {
    background: rgba(11, 15, 42, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 24px;
    gap: 1rem;
}
.logo-area {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo-img {
    max-width: 180px;
    height: auto;
    display: block;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: 2rem;
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    margin: 0;
    padding: 0;
}
.nav-list a {
    text-decoration: none;
    font-weight: 600;
    color: white;
    transition: color 0.2s;
}
.nav-list a:hover { color: var(--primary-blue); }
.cta-wsp-header {
    background: var(--whatsapp);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    margin-left: auto;
}
.cta-wsp-header:hover { background: #128C7E; transform: scale(1.02); }
@media (max-width: 880px) {
    .menu-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: #0B0F2A;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        margin-left: 0;
    }
    .nav-menu.active { left: 0; }
    .nav-list { flex-direction: column; gap: 1.5rem; width: 100%; }
    .cta-wsp-header { margin-top: 1.5rem; align-self: flex-start; margin-left: 0; }
}

/* ===== HERO Y PARTÍCULAS ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 6rem 0;
    background: radial-gradient(ellipse at 50% 30%, #101646 0%, #0B0F2A 80%);
    overflow: hidden;
}
.particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}
.hero h1 {
    font-size: 2.8rem;
    color: white;
    max-width: 900px;
    margin: 0 auto 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 15px rgba(0,0,0,0.4);
}
.hero-h2 {
    font-size: 1.5rem;
    color: #b9c8ff;
    margin-bottom: 1rem;
}
.hero-text {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #e2e8f0;
    font-size: 1.1rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-blue);
    color: white;
    padding: 14px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-3px); }
.btn-secondary { background: var(--whatsapp); }

/* Animaciones entrada hero */
.animate-h1 {
    animation: slideInRight 1s ease-out forwards;
}
.animate-h2 {
    animation: slideInLeft 1s ease-out 0.2s forwards;
    opacity: 0;
}
.animate-p {
    animation: slideInRight 1s ease-out 0.4s forwards;
    opacity: 0;
}
@keyframes slideInRight {
    0% { transform: translateX(100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes slideInLeft {
    0% { transform: translateX(-100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* ===== SECCIONES GENERALES ===== */
section {
    padding: 5rem 0;
    position: relative;
    background-color: inherit;
}
.servicios { background: #101646; }
.sobre-mi { background: #0B0F2A; }
.beneficios { background: #101646; }
.proceso { background: #0B0F2A; }
.faq { background: #101646; }
.portafolio { background: #0B0F2A; }
.testimonios { background: #101646; }
.final-cta { background: #101646; text-align: center; border-radius: 40px 40px 0 0; margin-top: 2rem; padding: 5rem 0; }

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}
.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background: var(--primary-blue);
    margin: 0.8rem auto 0;
}

/* Animación de entrada para tarjetas y testimonios */
.service-card, .beneficio-card, .paso, .portfolio-card, .testimonial-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.5s cubic-bezier(0.2, 0.9, 0.4, 1.2), transform 1.5s cubic-bezier(0.2, 0.9, 0.4, 1.2);
}
.service-card.visible, .beneficio-card.visible, .paso.visible, .portfolio-card.visible, .testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delays escalonados (igual que antes) */
.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }
.service-card:nth-child(7) { transition-delay: 0.6s; }
.service-card:nth-child(8) { transition-delay: 0.7s; }
.service-card:nth-child(9) { transition-delay: 0.8s; }
.service-card:nth-child(10) { transition-delay: 0.9s; }
.service-card:nth-child(11) { transition-delay: 1.0s; }
.beneficio-card:nth-child(1) { transition-delay: 0s; }
.beneficio-card:nth-child(2) { transition-delay: 0.15s; }
.beneficio-card:nth-child(3) { transition-delay: 0.3s; }
.beneficio-card:nth-child(4) { transition-delay: 0.45s; }
.beneficio-card:nth-child(5) { transition-delay: 0.6s; }
.paso:nth-child(1) { transition-delay: 0s; }
.paso:nth-child(2) { transition-delay: 0.2s; }
.paso:nth-child(3) { transition-delay: 0.4s; }
.paso:nth-child(4) { transition-delay: 0.6s; }
.portfolio-card:nth-child(1) { transition-delay: 0s; }
.portfolio-card:nth-child(2) { transition-delay: 0.15s; }
.portfolio-card:nth-child(3) { transition-delay: 0.3s; }
.portfolio-card:nth-child(4) { transition-delay: 0.45s; }
.portfolio-card:nth-child(5) { transition-delay: 0.6s; }
.portfolio-card:nth-child(6) { transition-delay: 0.75s; }

/* ===== GRIDS ===== */
.servicios-grid, .beneficios-grid, .proceso-grid {
    display: grid;
    gap: 2rem;
}
.servicios-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.beneficios-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.proceso-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.portfolio-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 2rem;
}
.service-card, .beneficio-card, .paso {
    background: white;
    border-radius: 24px;
    padding: 1.8rem;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.service-card i, .beneficio-card i, .paso i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: inline-block;
}
.service-card h3, .beneficio-card h3, .paso h3 { color: #101646; }
.service-card p, .beneficio-card p, .paso p { color: #1e293b; }
.service-card:hover, .beneficio-card:hover, .paso:hover, .portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.3);
}

/* ===== SOBRE MÍ ===== */
.sobre-container {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}
.sobre-img {
    flex: 1;
    min-width: 240px;
}
.sobre-img img {
    width: 100%;
    border-radius: 32px;
    box-shadow: 0 20px 30px rgba(0,0,0,0.3);
}
.sobre-texto { flex: 2; }
.sobre-texto h2 { color: white; font-size: 2rem; margin-bottom: 0.5rem; }
.sobre-texto h3 { color: #7aa2f7; margin-bottom: 1rem; }
.sobre-texto p { margin-bottom: 1rem; color: #e2e8f0; }

/* ===== FAQ ACORDEÓN ===== */
.faq-item {
    background: #f1f5f9;
    margin-bottom: 1rem;
    border-radius: 20px;
    overflow: hidden;
}
.faq-question {
    padding: 1.2rem 1.8rem;
    cursor: pointer;
    font-weight: 700;
    background: white;
    border-left: 4px solid var(--primary-blue);
    color: #101646;
}
.faq-question:hover { background: #e2e8f0; }
.faq-answer {
    max-height: 0;
    padding: 0 1.8rem;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
    color: #1e293b;
}
.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.8rem 1.2rem 1.8rem;
    border-top: 1px solid #cbd5e1;
}

/* ===== PORTAFOLIO CARDS ===== */
.portfolio-card {
    background: white;
    border-radius: 28px;
    overflow: hidden;
}
.portfolio-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #334155;
}
.portfolio-card h3 { padding: 1rem 1rem 0; color: #101646; }
.portfolio-card p { padding: 0 1rem; color: #334155; }
.portfolio-btn {
    margin: 1rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
}
.portfolio-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 200px !important;
}
.portfolio-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===== TESTIMONIOS (CUADRÍCULA ESTÁTICA) ===== */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
.testimonial-card {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #1e293b;
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.testimonial-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-blue);
}
.testimonial-text {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.5;
    margin: 1rem 0;
}
.testimonial-stars {
    color: #f5b042;
    font-size: 1.2rem;
    margin: 0.8rem 0;
    letter-spacing: 4px;
}
.testimonial-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #101646;
}
.testimonial-role {
    font-size: 0.85rem;
    color: #64748b;
}

/* ===== POPUP GALERÍA (portafolio) ===== */
.popup-overlay {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.popup-container {
    background: white;
    max-width: 80%;
    max-height: 85%;
    border-radius: 24px;
    overflow: auto;
    position: relative;
    padding: 1rem;
}
.popup-container h3 {
    color: #101646;
    text-align: center;
    margin-bottom: 1rem;
}
.popup-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.gallery-thumb {
    width: 180px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
}
.popup-close {
    position: absolute;
    top: 12px; right: 20px;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}
.lightbox-overlay {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
}
.lightbox-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 90%;
}
.lightbox-img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
}
.lightbox-close {
    position: absolute;
    top: -50px;
    right: -10px;
}
.lightbox-prev { position: absolute; left: -70px; }
.lightbox-next { position: absolute; right: -70px; }
@media (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 10px; right: 10px; }
}

/* ===== SCROLL TOP BUTTON ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
}
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}
.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== FINAL CTA ===== */
.final-cta .btn-secondary {
    margin-top: 2rem;
}

/* ===== FOOTER ===== */
.footer {
    background: #050814;
    color: #cbd5e1;
    padding: 3rem 0 1.5rem;
    margin-top: 0;
    display: block;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}
.footer-left { flex: 1; }
.logo-circle-footer {
    width: 55px; height: 55px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}
.footer-frase { max-width: 300px; line-height: 1.4; color: #94a3b8; }
.footer-right {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}
.footer-right a { color: #cbd5e1; text-decoration: none; }
.social-links { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 0.5rem; }
.copyright {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}
.hecho-con-amor {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.hecho-con-amor i { margin: 0 4px; }

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #1e293b;
    color: white;
    padding: 16px 24px;
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 1100;
}
.cookie-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 12px;
}
.accept { background: var(--whatsapp); color: white; }
.reject { background: #6c757d; color: white; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .sobre-container { flex-direction: column; }
    .cookie-banner { flex-direction: column; text-align: center; }
    .final-cta .btn-secondary { margin-top: 2rem; }
    .footer-container { flex-direction: column; text-align: center; align-items: center; }
    .footer-left { align-items: center; }
    .footer-frase { text-align: center; margin: 0 auto; }
    .footer-right { text-align: center; align-items: center; margin-top: 1rem; }
    .social-links { justify-content: center; }
    .scroll-top-btn { width: 40px; height: 40px; font-size: 1.2rem; bottom: 20px; right: 20px; }
    section { padding: 3rem 0; }
    .hero { padding: 4rem 0; min-height: auto; }
    .final-cta { padding: 3rem 0; }
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    .testimonios-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .testimonial-card {
        padding: 1.5rem;
    }
    .testimonial-img {
        width: 80px;
        height: 80px;
    }
    .testimonial-text {
        font-size: 0.9rem;
    }
    .logo-img {
        max-width: 140px;
    }
}