/* --- Variables & Configuración --- */
:root {
    --primary: #3A9D85;
    /* Verde Principal */
    --secondary: #285E70;
    /* Azul Petróleo */
    --accent: #473268;
    /* Morado */
    --dark: #1f1f1f;
    --grey: #f4f7f6;
    --text: #555;
    --white: #fff;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 90px 0;
}

.bg-light {
    background-color: var(--grey);
}

.bg-dark {
    background-color: #222;
    color: var(--white);
}

.bg-white {
    background-color: var(--white);
}

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

.text-white {
    color: var(--white);
}

/* --- Títulos y Tags --- */
.section-tag {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
    display: inline-block;
}

.tag-light {
    color: var(--primary);
}

.tag-respond {
    color: var(--secondary);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.bg-dark h2 {
    color: var(--white);
}

.separator {
    width: 50px;
    height: 3px;
    background-color: var(--primary);
    margin: 20px auto 50px;
}

/* --- Botones --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--dark);
}

/* --- Header --- */
#main-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

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

.logo {
    height: 35px;
}

.desktop-nav ul {
    display: flex;
    align-items: center;
}

.desktop-nav li {
    margin-left: 25px;
}

.desktop-nav a {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.desktop-nav a:hover {
    color: var(--primary);
}

.nav-highlight {
    color: var(--secondary) !important;
    font-weight: 700 !important;
}

.btn-nav {
    background: var(--secondary);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 4px;
}

.btn-nav:hover {
    background: var(--primary) !important;
    color: white !important;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.mobile-menu {
    display: none;
    background: var(--white);
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: var(--dark);
    font-weight: 500;
}

/* --- Hero Section --- */
.hero-section {
    height: 60vh;
    /* Un poco menos que pantalla completa para invitar al scroll */
    min-height: 600px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background: url(bg2.png);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content .subtitle {
    display: block;
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 700;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    font-weight: 300;
}

/* --- Servicios --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.service-box {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.service-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-box h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* --- Sección Respond.io / Split --- */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.lead-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
}

.check-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.check-list i {
    color: var(--primary);
    margin-right: 15px;
    margin-top: 5px;
    font-size: 1.1rem;
}

.split-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* --- Casos de Éxito Detallados --- */
.header-desc {
    max-width: 600px;
    margin: 0 auto 50px;
    opacity: 0.7;
}

.cases-grid-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.case-card-detail {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid #333;
}

.case-card-detail:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card-header-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.niche-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.problem {
    color: #bbb;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-left: 3px solid #555;
    padding-left: 10px;
}

.solution-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.solution-box i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 3px;
}

.solution-box strong {
    color: var(--primary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.solution-box p {
    color: #ddd;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.result-metrics {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.metric {
    text-align: center;
    width: 48%;
}

.metric span {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
}

.metric small {
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* --- Contacto --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-top: 25px;
    font-size: 1.1rem;
    font-weight: 500;
}

.info-item i {
    width: 45px;
    height: 45px;
    background: var(--grey);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    transition: all 0.3s;
}

.info-item:hover i {
    background: var(--secondary);
    color: white;
}

.contact-form-box {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    font-family: var(--font-body);
    outline: none;
    transition: border 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    background: #fff;
}

.full-width {
    width: 100%;
}

/* --- Footer --- */
footer {
    background: #151515;
    color: #999;
    padding-top: 70px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 50px;
}

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

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-col a {
    display: block;
    color: #999;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
    font-size: 1.2rem;
    color: #fff;
}

.footer-bar {
    border-top: 1px solid #222;
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    background: #111;
}

/* --- Responsive --- */
@media (max-width: 992px) {

    .split-layout,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }

    .split-image img {
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .btn-outline {
        margin-left: 0;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}




/* --- NUEVA SECCIÓN: n8n Power --- */
.bg-tech {
    background: linear-gradient(180deg, #1a1a1a 0%, #285E70 100%);
    color: white;
}

/* Pilares */
.n8n-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.pillar-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.pillar-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.pillar-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.pillar-card h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.pillar-card p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Demo Visual del Workflow */
.n8n-demo-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 50px 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-demo {
    background: var(--accent);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: inline-block;
}

.demo-intro h3 {
    color: white;
    margin-bottom: 10px;
}

.demo-intro p {
    color: #bbb;
    margin-bottom: 40px;
}

/* Diagrama de Flujo (Simulación n8n) */
.workflow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.node-box {
    background: white;
    width: 160px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.3s;
}

.node-box:hover {
    transform: scale(1.05);
}

.node-header {
    padding: 8px 12px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.node-body {
    padding: 15px;
    color: #333;
}

.node-body strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.node-body small {
    color: #777;
    font-size: 0.75rem;
    line-height: 1.2;
    display: block;
}

.connector {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}






.form-status {
    margin-top: 12px;
    font-size: 14px;
}

.form-status.loading {
    color: #555;
}

.form-status.success {
    color: #1b8a3a;
}

.form-status.error {
    color: #c0392b;
}






@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(5px);
    }

    100% {
        opacity: 0.3;
        transform: translateX(0);
    }
}

.demo-footer p {
    color: #ddd;
    font-weight: 500;
    margin-top: 20px;
}

/* Responsive para el flujo */
@media (max-width: 768px) {
    .workflow-container {
        flex-direction: column;
    }

    .connector {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    @keyframes pulse {
        0% {
            opacity: 0.3;
            transform: translateY(0) rotate(90deg);
        }

        50% {
            opacity: 1;
            transform: translateY(5px) rotate(90deg);
        }

        100% {
            opacity: 0.3;
            transform: translateY(0) rotate(90deg);
        }
    }
}