/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0a0f1f;
    --primary-orange: #FF6B00;
    --text-light: #FFFFFF;
    --text-medium: #adb5bd;
    --card-bg: #121a30;
    --border-color: #2a3652;
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Work Sans', sans-serif;
    --powered-by-bg: #FFFFFF; 
    --powered-by-text: #333333; 
    --btn-bg-offset: 2px; /* Variable para el offset del botón */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-color);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden; 
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    position: relative; /* Para asegurar que estén sobre SVGs de fondo si es necesario */
    z-index: 1;
}

h1 { font-size: 2.8rem; line-height: 1.2; }
h2 { font-size: 2.2rem; line-height: 1.3; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
    font-weight: 400;
    position: relative; /* Para asegurar que estén sobre SVGs de fondo si es necesario */
    z-index: 1;
}

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

a:not(.btn-consulta):hover { 
    color: #ff8533; 
}

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

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

section {
    padding: 60px 0;
    position: relative; /* Para los SVGs decorativos */
    overflow: hidden; /* Para que los SVGs no desborden si son grandes */
}

/* --- DECORADORES SVG PARA SECCIONES --- */
.section-with-svg-bg { /* Clase a añadir a las secciones con SVGs */
    position: relative;
}
.section-svg-decorator {
    position: absolute;
    z-index: 0; 
    opacity: 0.05; /* Opacidad base muy sutil */
    pointer-events: none; 
}
.section-svg-decorator.top-left { top: -30px; left: -30px; }
.section-svg-decorator.top-right { top: -30px; right: -30px; }
.section-svg-decorator.bottom-left { bottom: -30px; left: -30px; }
.section-svg-decorator.bottom-right { bottom: -30px; right: -30px; }

.section-svg-decorator svg {
    display: block;
    width: auto; 
    /* Aplicar opacidad directamente en el SVG en el HTML si es fill-opacity */
    /* ej: <svg ...><path fill-opacity="0.1" .../></svg> */
}
/* Animación de entrada para los SVGs */
.section-svg-decorator.animate-on-scroll {
    opacity: 0; /* Inicia invisible */
    transform: scale(0.7) rotate(-20deg); /* Inicia más pequeño y rotado */
    transition: opacity 0.9s ease-out, transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s;
}
.section-svg-decorator.animate-on-scroll.is-visible {
    opacity: 0.05; /* Opacidad final cuando es visible (ajustar según el SVG específico) */
    transform: scale(1) rotate(0deg); /* Estado final */
}
/* Si los SVGs tienen fill o stroke en el CSS, se puede controlar la opacidad aquí: */
.section-svg-decorator svg path,
.section-svg-decorator svg circle,
.section-svg-decorator svg rect {
    /* fill-opacity: 0.1; */ /* Ejemplo si se define el color de fill en el SVG */
    /* stroke-opacity: 0.2; */ /* Ejemplo si se define el color de stroke en el SVG */
}


.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
    position: relative; 
    z-index: 1;
}
.section-subtitle-alt {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-light);
    margin-top: -0.8rem;
    margin-bottom: 0.5rem;
    position: relative; 
    z-index: 1;
}

/* --- HEADER --- */
header {
    background-color: rgba(10, 15, 31, 0.85);
    backdrop-filter: blur(10px);
    padding: 10px 0; 
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-link {
    display: flex;
    align-items: center;
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-right: auto; 
}
.logo-link:hover {
    color: var(--text-light);
}

.logo {
    height: 40px;
    margin-right: 10px;
}

.main-nav { 
    margin-left: 20px; 
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
}
.nav-links li:first-child {
    margin-left: 0;
}

.nav-links a:not(.btn-consulta) {
    color: var(--text-medium);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 5px 0; 
}

.nav-links a:not(.btn-consulta):hover, .nav-links a.active:not(.btn-consulta) {
    color: var(--primary-orange);
}

.header-actions { 
    display: flex;
    align-items: center;
    margin-left: 25px; 
}

.nav-cta-always-visible .btn-consulta { 
    font-size: 15px;
    padding: 10px 20px;
}

.nav-cta-mobile-dropdown { 
    display: none; 
}

.nav-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 15px; 
}
.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    position: relative;
    transition: transform 0.3s ease-in-out;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out, bottom 0.3s ease-in-out;
}
.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.nav-open .hamburger { background-color: transparent; }
.nav-open .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-open .hamburger::after { transform: rotate(-45deg); bottom: 0; }


/* --- ESTILOS BOTONES CAL.COM (OFFSET AJUSTADO) --- */
.btn-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.15));
    transition: filter 0.3s ease;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-consulta {
    position: relative;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 17px; 
    letter-spacing: 0.2px;
    color: white !important; 
    background: linear-gradient(170deg, #2B0D61, #3A1180);
    padding: 12px 26px; 
    border-radius: 6px;
    text-decoration: none !important;
    border: none;
    display: inline-block;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translate(var(--btn-bg-offset), var(--btn-bg-offset)); 
    background-color: #FF6B00;
    border-radius: 6px;
    z-index: 0;
    transform-origin: bottom left;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
}

.btn-container:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.btn-container:hover .btn-consulta {
    transform: scale(1.05);
    letter-spacing: 0.25px;
    box-shadow: 0 2px 10px rgba(58, 17, 128, 0.3);
}
.btn-container:hover .btn-bg {
    transform: scaleX(0) translate(var(--btn-bg-offset), var(--btn-bg-offset));
    opacity: 0;
}
.btn-container:active .btn-consulta {
    transform: scale(0.98);
    transition: transform 0.2s ease;
}

.btn-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 6px;
    opacity: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}
.btn-container:hover::after {
    opacity: 1;
}

.btn-consulta-inline {
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}
.btn-consulta-inline:hover {
    color: #ff8533;
}

/* --- HERO SECTION --- */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}
.hero-section .btn-container { 
    margin-top: 20px;
}

.hero-section h1 {
    margin-bottom: 1.5rem;
}
.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 1.5rem auto; 
}

/* --- POWERED BY SECTION (AJUSTES) --- */
.powered-by-section {
    background-color: var(--powered-by-bg); 
    padding: 40px 0; 
    overflow: hidden; 
}
.powered-by-title-container { 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; 
    margin-bottom: 2.5rem;
}
.n8n-static-logo {
    height: 30px; 
    width: auto;
}
.powered-by-title-container h3 { 
    color: var(--powered-by-text); 
    margin-bottom: 0; 
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logos-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative; 
}

.logos-slider-container::before,
.logos-slider-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px; 
    z-index: 2;
    pointer-events: none; 
}

.logos-slider-container::before { 
    left: 0;
    background: linear-gradient(to right, var(--powered-by-bg) 20%, transparent 100%);
}

.logos-slider-container::after { 
    right: 0;
    background: linear-gradient(to left, var(--powered-by-bg) 20%, transparent 100%);
}

.logos-slider {
    display: flex;
    /* (Ancho logo + margen*2) * num_logos_visibles_aprox * 2 (para duplicado) */
    /* 9 logos en el carrusel. Estimado: (logo 100px + margen 40px*2 = 180px) */
    width: calc(180px * 9 * 2); /* 180px por item * 9 logos * 2 sets */
    animation: scrollLogos 35s linear infinite; 
}

.logos-slider img {
    height: 40px; 
    margin: 0 40px; 
    filter: none; 
    opacity: 1;
    transition: transform 0.3s ease; 
    flex-shrink: 0; 
}

.logos-slider img:hover {
    transform: scale(1.1); 
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); 
    }
}
.logos-slider-container:hover .logos-slider {
    animation-play-state: paused;
}

/* --- CARDS GRID, IMPACT AREAS, ETC. --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
    position: relative; 
    z-index: 1;
}
.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.card h4 {
    color: var(--primary-orange);
    margin-bottom: 0.8rem;
}

.feature-list {
    margin-top: 3rem;
    position: relative; 
    z-index: 1;
}
.feature-item {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-orange);
}
.feature-item h4 {
    color: var(--text-light);
}

.cta-section {
    background-color: var(--card-bg);
}
.cta-section h2 {
    margin-bottom: 1rem;
}
.cta-section p {
    max-width: 600px;
    margin: 0 auto 1.5rem auto; 
}
.cta-section .btn-container { 
    margin-top: 10px;
}

.process-section .container > h2, .process-section .container > h3, .process-section .container > p,
.advantage-section .container > h2, .advantage-section .container > h3, .advantage-section .container > p,
.faq-section .container > h2, .faq-section .container > p {
    position: relative;
    z-index: 1;
}
.process-steps, .advantage-categories, .faq-list, .final-cta-text {
    position: relative;
    z-index: 1;
}

/* --- PROCESS SECTION --- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}
.step-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    border: 1px solid var(--border-color);
}
.step-number {
    background-color: var(--primary-orange);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: var(--font-primary);
    font-weight: 700;
    margin: -55px auto 20px auto; 
    border: 4px solid var(--bg-color); 
}
.step-card h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* --- ADVANTAGE SECTION --- */
.advantage-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 3rem;
}
.category > h4 { 
    font-size: 1.5rem;
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}
.advantage-item {
    margin-bottom: 1.5rem;
}
.advantage-item h5 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* --- FAQ SECTION --- */
.faq-list {
    max-width: 800px;
    margin: 2rem auto 0 auto;
}
.faq-item {
    background-color: var(--card-bg);
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    text-align: left;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question:hover {
    background-color: rgba(255, 107, 0, 0.1);
}
.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-orange);
    transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.faq-answer p {
    padding: 0 20px 20px 20px;
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-medium);
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding-bottom: 0;
}
.final-cta-text {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}
.faq-section .btn-container { 
    margin-top: 10px;
}


/* --- FOOTER --- */
footer {
    background-color: var(--card-bg);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-info {
    max-width: 400px;
}
.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.footer-logo img {
    height: 30px;
    margin-right: 8px;
}
.footer-logo span {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
}
.footer-links {
    text-align: right;
}
.footer-links p {
    margin-bottom: 0.5rem;
}
.footer-links a {
    display: inline-block;
    margin-left: 15px;
    color: var(--text-medium);
}
.footer-links a:hover {
    color: var(--primary-orange);
}

/* --- ANIMATIONS ON SCROLL --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
/* No animar los decoradores SVG con esta regla general, tienen la suya */
.section-svg-decorator.animate-on-scroll {
    /* Se anula aquí para que no entre en conflicto con su propia animación */
    opacity: 0; /* Su estado inicial se maneja por su propia regla .animate-on-scroll */
    transform: scale(0.7) rotate(-20deg);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Estado visible para los decoradores SVG */
.section-svg-decorator.animate-on-scroll.is-visible {
    opacity: 0.05; /* Opacidad final cuando es visible (ajustar según el SVG específico) */
    transform: scale(1) rotate(0deg); /* Estado final */
}


/* --- RESPONSIVE --- */
@media (max-width: 992px) { 
    .main-nav {
        display: none; 
    }
    .nav-links.nav-open .nav-cta-mobile-dropdown { 
        display: block;
        text-align: center; 
        padding: 10px 0;
    }
    .nav-links.nav-open .nav-cta-mobile-dropdown .btn-consulta {
        font-size: 16px; 
        padding: 12px 24px;
    }

    .nav-toggle {
        display: block; 
    }
    
    .nav-links { 
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
        border-top: 1px solid var(--border-color);
        max-height: 0;
        overflow-y: auto; 
        transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    }
    .nav-links.nav-open {
        max-height: calc(100vh - 70px); 
        padding: 10px 0;
    }

    .nav-links li {
        margin: 10px 0; 
        width: 100%; 
        text-align: center; 
    }
    .nav-links li:first-child {
        margin-top: 10px; 
    }
    
    .nav-cta-always-visible {
        display: inline-block; 
    }
     .nav-cta-always-visible .btn-consulta {
        font-size: 14px; 
        padding: 8px 16px;
    }

    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    .logos-slider img { height: 35px; margin: 0 30px; }
    .logos-slider-container::before, .logos-slider-container::after { width: 60px; }
    .n8n-static-logo { height: 25px; }
    .section-svg-decorator svg { max-width: 90px; max-height: 90px; }
}

@media (max-width: 768px) {
    .hero-section { min-height: 70vh; padding-top: 80px;}
    .hero-section p { font-size: 1.1rem; }

    .cards-grid, .process-steps, .advantage-categories {
        grid-template-columns: 1fr; 
    }
    .category { margin-bottom: 20px; }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-info { margin-bottom: 20px; }
    .footer-links { text-align: center; }
    .footer-links a { margin: 5px 10px; }

    .btn-consulta {
        font-size: 16px; 
        padding: 11px 22px;
    }
    /* El --btn-bg-offset ya es 2px, se mantiene ese valor */
    
    .logos-slider img { height: 30px; margin: 0 25px; }
    .n8n-static-logo { height: 22px; }
    .section-svg-decorator svg { max-width: 70px; max-height: 70px; } 
}

@media (max-width: 480px) { 
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    .section-subtitle { font-size: 1rem; }
    .hero-section p { font-size: 1rem; }
    
    .btn-consulta {
        font-size: 14px;
        padding: 10px 20px;
    }
    .nav-cta-always-visible .btn-consulta { 
        font-size: 13px;
        padding: 7px 12px;
    }
     .nav-toggle { margin-left: 10px; } 
    
    .logos-slider img { height: 28px; margin: 0 20px; }
    .logos-slider-container::before, .logos-slider-container::after { width: 40px; }
    .n8n-static-logo { height: 20px; }
    .section-svg-decorator svg { max-width: 50px; max-height: 50px; }
}
