/* =================================
   VARIABLES Y ESTILOS GENERALES
   ================================= */
:root {
    --primary-color: #F7931A;
    --secondary-color: #1a202c; /* Negro más suave */
    --accent-color: #2d3748; /* Gris oscuro para fondos */
    --text-dark: #2d3748;
    --text-light: #e2e8f0;
    --bg-light: #ffffff;
    --bg-medium: #f7fafc;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --border-radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Tipografía jerárquica y responsive */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    line-height: 1.3;
    font-weight: 800;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); text-align: center; margin-bottom: 25px; }
h3 { font-size: clamp(1.5rem, 3vw, 1.8rem); margin-bottom: 20px; }
h4 { font-size: 1.25rem; margin-bottom: 10px; color: var(--secondary-color); }

p { margin-bottom: 1rem; max-width: 65ch; }
.section-intro { font-size: 1.15em; color: #4a5568; max-width: 70ch; margin: 0 auto 50px auto; text-align: center; }

section { padding: 100px 0; overflow: hidden; }

/* =================================
   HEADER - OSCURO Y ELEGANTE
   ================================= */
header {
    background-color: rgba(26, 32, 44, 0.9);
    backdrop-filter: blur(12px);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 1000;
}
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img {
    height: 40px; margin-right: 12px;
    background: none; background-color: transparent;
    mix-blend-mode: screen; 
}
.logo span { font-family: var(--font-heading); font-weight: 700; font-size: 1.4em; color: var(--text-light); }
.logo:hover img { filter: brightness(1.2); transform: scale(1.05); }

/* ESTILOS DE NAVEGACIÓN PRINCIPAL */
.main-nav ul { list-style: none; display: flex; align-items: center; }
.main-nav ul li { margin-left: 30px; }
.main-nav ul li a {
    color: var(--text-light); font-weight: 600; text-decoration: none;
    transition: color 0.3s ease;
}
.main-nav ul li a:not(.btn-nav) { position: relative; padding-bottom: 5px; }
.main-nav ul li a:not(.btn-nav)::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px; background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.main-nav ul li a:hover:not(.btn-nav) { color: var(--primary-color); }
.main-nav ul li a:hover:not(.btn-nav)::after { width: 100%; }
.btn-nav {
    padding: 8px 20px; border: 2px solid var(--primary-color); border-radius: var(--border-radius);
    color: var(--primary-color); font-weight: 700;
}
.btn-nav:hover { background-color: var(--primary-color); color: #fff; }

/* BOTÓN HAMBURGUESA - INVISIBLE EN ESCRITORIO */
.nav-toggle { display: none; }

/* =================================
   BOTONES
   ================================= */
.btn {
    display: inline-block; padding: 15px 35px; border-radius: var(--border-radius);
    font-weight: 700; font-family: var(--font-heading);
    transition: all 0.3s ease; text-align: center; cursor: pointer; border: none;
    font-size: 1rem; text-decoration: none;
}
.primary-btn {
    background-color: var(--primary-color); color: #fff;
    box-shadow: 0 4px 15px rgba(247, 147, 26, 0.2);
}
.primary-btn:hover {
    background-color: #e08012; transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(247, 147, 26, 0.3);
}
.secondary-btn {
    background-color: transparent; border: 2px solid var(--secondary-color);
    color: var(--secondary-color); padding: 10px 20px; font-size: 0.9rem;
    width: 100%;
}
.secondary-btn:hover { background-color: var(--secondary-color); color: #fff; }

/* =================================
   ESTILOS DE SECCIÓN
   ================================= */

section:nth-of-type(odd) { background-color: var(--bg-light); }
section:nth-of-type(even) { background-color: var(--bg-medium); }

section#hero, section#mision {
    position: relative; padding: 120px 0;
    background-color: var(--accent-color);
    background-image: linear-gradient(45deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: var(--text-light);
}
section#hero .container, section#mision .container {
    position: relative; z-index: 2; text-align: center;
}
section#hero h1, section#hero .subtitle, section#mision h2, section#mision p {
    color: #fff;
}
section#hero .section-intro {
    color: #fff;
    opacity: 0.9; /* Le devolvemos la opacidad que tenía para que no sea tan brillante como el H1 */
}
section#hero .subtitle, section#mision p {
    opacity: 0.9;
}
.particles-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
#particles-js { height: 100% !important; width: 100% !important; }

.problem-section .container { max-width: 800px; text-align: center; }
.pain-points li {
    font-size: 1.1rem; margin-bottom: 20px;
    background: linear-gradient(to right, #F7931A1A, transparent);
    padding: 10px 10px 10px 40px; border-left: 3px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    list-style: none; position: relative; text-align: left;
}
.pain-points li::before { content: '❓'; position: absolute; left: 10px; top: 11px; font-size: 1.2rem; }

.product-section .container { text-align: center; }
.checklist li { font-size: 1.1rem; margin-bottom: 15px; display: flex; align-items: flex-start; list-style: none; }
.checklist .icon { color: var(--primary-color); margin-right: 15px; margin-top: 2px; }
.methodology-steps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; margin-top: 40px; text-align: center;
}
.step {
    padding: 30px; border: 1px solid #e5e7eb; border-radius: var(--border-radius);
    background-color: #fff; box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.step-number {
    width: 50px; height: 50px; line-height: 50px; border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), #ffaf5a);
    color: #fff; font-family: var(--font-heading); font-weight: 700;
    font-size: 1.5rem; margin: 0 auto 20px auto;
}

@keyframes animated-circuit {
    from { background-position: 0 0; } to { background-position: -200px 0; }
}
section#servicios { position: relative; }
section#servicios::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 0; opacity: 0.07;
    background-image: repeating-linear-gradient(-45deg, var(--accent-color), var(--accent-color) 2px, transparent 2px, transparent 40px);
    animation: animated-circuit 8s linear infinite;
}
.services-section .container { position: relative; z-index: 1; }
.service-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.service-card {
    background-color: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px);
    padding: 35px 30px; border-radius: var(--border-radius);
    box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; text-align: center;
    border-top: 4px solid var(--primary-color);
}
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.service-card p { flex-grow: 1; color: #4a5568; }
.service-card .ideal-for { font-style: italic; color: #718096; margin: 20px 0; font-size: 0.9rem; flex-grow: 0; }
.service-card .btn { margin-top: auto; }

.fiscalidad-section .container { max-width: 800px; text-align: center; }

.faq-accordion { max-width: 800px; margin: 40px auto 0 auto; }
.faq-category { margin-top: 40px; font-size: 1.5rem; border-bottom: 2px solid #e5e7eb; padding-bottom: 10px; }
.faq-category:first-of-type { margin-top: 0; }
.faq-item { border-bottom: 1px solid #e5e7eb; }
.faq-question {
    width: 100%; background: none; border: none;
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; text-align: left;
    font-family: var(--font-heading); font-size: 1.1rem;
    font-weight: 600; cursor: pointer; color: var(--text-dark);
}
.faq-toggle { font-size: 1.5rem; color: var(--primary-color); transition: transform 0.3s ease; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.faq-answer p { padding: 0 10px 20px 10px; margin: 0; color: #4a5568; }
.faq-item.active .faq-toggle { transform: rotate(45deg); }
.faq-item.active .faq-answer { max-height: 300px; /* Aumentado para dar más espacio */ }

.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }
.testimonial-card {
    background: #fff; padding: 30px;
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow); border-radius: var(--border-radius);
}
.testimonial-text { font-style: italic; color: #4a5568; position: relative; padding-left: 20px; }
.testimonial-text::before {
    content: '“'; position: absolute; left: -10px; top: -20px;
    font-size: 3rem; color: var(--primary-color); opacity: 0.5;
}
.testimonial-author { font-weight: 700; text-align: right; margin-top: 20px; }

.trust-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px; text-align: center; margin-top: 50px;
}
.trust-item h3 { font-size: 1.3rem; }
.trust-item p { font-size: 0.95rem; color: #52616B; }
.trust-icon {
    width: 80px; height: 80px; margin: 0 auto 20px auto;
    background-color: #F7931A1A; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.trust-icon svg { width: 45px; height: 45px; color: var(--primary-color); }
.trust-item:hover .trust-icon { transform: scale(1.1) rotate(-5deg); background-color: #F7931A33; }

.contact-section .container { max-width: 700px; text-align: center; }
#contactForm {
    margin-top: 30px; background-color: #fff; padding: 40px;
    border-radius: var(--border-radius); box-shadow: var(--shadow); text-align: left;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--secondary-color); font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 14px; border: 1px solid #d1d5db; border-radius: 5px;
    font-family: var(--font-body); font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color); outline: none;
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.2);
}
#contactForm button[type="submit"] { width: 100%; font-size: 1.1rem; }
.form-message { margin-top: 20px; padding: 15px; border-radius: 5px; text-align: center; display: none; }
.form-message.success { background-color: #dcfce7; color: #166534; border: 1px solid #86efac; }
.form-message.error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.honeypot-field {
    position: absolute;
    left: -5000px;
    visibility: hidden;
}

/* FOOTER */
footer {
    background-color: var(--secondary-color); color: var(--text-light);
    padding: 40px 0; text-align: center;
}
footer .container {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 20px;
}
footer p { margin: 0; opacity: 0.7; }
.footer-nav ul { list-style: none; display: flex; gap: 25px; }
.footer-nav ul li a { color: var(--text-light); opacity: 0.7; transition: opacity 0.3s ease; text-decoration: none; }
.footer-nav ul li a:hover { opacity: 1; }

/* =================================
   RESPONSIVE DESIGN
   ================================= */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
        position: relative;
    }
    .nav-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-light);
        margin: 5px 0;
        transition: all 0.3s ease-in-out;
    }
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--secondary-color);
        transition: right 0.4s ease-in-out;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
    }
    .main-nav.is-open {
        right: 0;
    }
    .main-nav ul {
        flex-direction: column;
        padding: 0;
    }
    .main-nav ul li {
        margin: 20px 0;
    }
    .main-nav ul li a {
        font-size: 1.5rem;
    }
    .main-nav .btn-nav {
        font-size: 1.2rem;
        padding: 12px 25px;
    }
    .nav-toggle.is-open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.is-open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    header .container {
        flex-wrap: nowrap;
    }
    footer .container { flex-direction: column; }
    .testimonial-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    section { padding: 60px 0; }
    .btn { padding: 12px 25px; }
    #contactForm { padding: 25px; }
}