/* --- RESET Y ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background: #211814;
    color: #f0f0f0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- EFECTOS DE PÁGINA Y FONDO --- */
body.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

body.fade-in.loaded {
    opacity: 1;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 2;
}


/* --- ESTILOS GENERALES Y CONTENEDOR --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER Y NAVEGACIÓN --- */
.header {
    background: rgba(33, 24, 20, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.logo-icon {
    color: #ff8c00;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #a0a0a0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff8c00;
    transition: width 0.3s ease-in-out;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- ESTILOS DE SECCIÓN --- */
section {
    padding: 100px 0;
    position: relative;
    transition: background-color 0.5s ease;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
    transition: text-shadow 0.5s ease-in-out, color 0.5s ease;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #b0b4ba;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- SECCIÓN HERO --- */
.hero {
    text-align: center;
    padding: 140px 0 120px;
    margin-top: 70px; /* Altura del header */
}

.hero-title {
    font-size: 3.8rem;
    line-height: 1.2;
}

.hero-subtitle {
    padding: 0 1rem;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.hero-cta {
    background: #ff8c00;
    color: #10101a;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 25px rgba(255, 140, 0, 0.5);
}

.hero-cta:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 40px rgba(255, 140, 0, 0.8);
}

/* --- ESTILO DE TARJETAS (CARD) --- */
.card {
    background: #2b211b;
    border: 1px solid #44372f;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:not(.solution-flipper):not(.benefit-flipper):not(.elevator-card):hover {
    transform: translateY(-8px);
    border-color: rgba(255, 140, 0, 0.6);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.card:not(.elevator-card):not(.solution-flipper):not(.benefit-flipper)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 80%);
    transform: skewX(-25deg);
    transition: left 0.85s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:not(.elevator-card):not(.solution-flipper):not(.benefit-flipper):hover::before {
    left: 100%;
}

.card h3 {
    color: #f0f0f0;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card p {
    color: #a0a0b0;
    font-size: 0.95rem;
}

.card h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ff8c00;
    margin-bottom: 1rem;
}

/* --- SECCIÓN CLARA --- */
.light-section {
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence baseFrequency='0.02 0.05' numOctaves='3' stitchTiles='stitch' type='fractalNoise'%3E%3Canimate attributeName='seed' from='0' to='100' dur='20s' repeatCount='indefinite'/%3E%3C/feTurbulence%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.08'/%3E%3C/feComponentTransfer%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 0.55 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.light-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;  
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.light-section .section-title {
    color: #212529;
    text-shadow: none;
}

.light-section .section-subtitle {
    color: #6c757d;
}

.light-section .card {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.light-section .card:not(.elevator-card)::before {
    background: linear-gradient(120deg, rgba(33, 37, 41, 0) 20%, rgba(33, 37, 41, 0.05) 50%, rgba(33, 37, 41, 0) 80%);
}

.light-section .card h3 {
    color: #212529;
}

.light-section .card p,
.light-section .impact-list li,
.light-section .card-back-description {
    color: #495057;
}

.light-section .card-front,
.light-section .card-back {
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.light-section .solution-flipper:hover,
.light-section .benefit-flipper:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* --- ICONOS METÁLICOS --- */
.icon-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(145deg, #e0e0e0, #ffffff);
    border: 1px solid #cccccc;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6),
                inset 0 -2px 4px rgba(0, 0, 0, 0.1),
                0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.4s ease, transform 0.3s ease, border-color 0.3s ease;
}

.light-section .icon-wrapper {
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    border-color: #dcdcdc;
}

.icon-img {
    width: 32px;
    height: 32px;
    filter: contrast(1.1);
}

.icon-emoji {
    font-size: 1.8rem;
    color: #555;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
}

.icon-glow {
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.8), 0 0 30px rgba(255, 140, 0, 0.4);
    transform: scale(1.05);
    border-color: #ff8c00;
}

/* --- ESTILOS POR SECCIÓN --- */
.challenges-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#challenges .card {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
    padding: 1.5rem;
}

#challenges .icon-wrapper {
    margin-bottom: 0;
}

.challenges-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.challenges-image img {
    width: 100%;
    display: block;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(33, 24, 20, 1), transparent);
    color: white;
    padding: 2rem;
}

.image-overlay h3 {
    font-size: 1.5rem;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.real-impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

#services .icon-wrapper {
    margin-left: auto;
    margin-right: auto;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    text-align: center;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.step p {
    color: #a0a0b0;
}

#how-it-works .icon-wrapper {
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

#how-it-works .icon-img {
    width: 40px;
    height: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* --- ESTILOS TARJETAS CON GIRO 3D (FLIPPER) --- */
.solution-flipper, .benefit-flipper {
    perspective: 1500px;
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 16px;
    transition: box-shadow 0.4s ease-in-out;
}

.solution-flipper { min-height: 380px; }
.benefit-flipper { min-height: 250px; }

.solution-flipper:not(.light-section .solution-flipper):hover,
.benefit-flipper:not(.light-section .benefit-flipper):hover {
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.6), 0 0 35px rgba(255, 140, 0, 0.4);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    background: #2b211b;
    border: 1px solid #44372f;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.solution-flipper .card-front,
.solution-flipper .card-back {
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* GIRO Y para Soluciones */
.solution-flipper .card-front { transform: rotateY(0deg); }
.solution-flipper .card-back { transform: rotateY(180deg); }
.solution-flipper:hover .card-front { transform: rotateY(-180deg); }
.solution-flipper:hover .card-back { transform: rotateY(0deg); }

/* GIRO X para Beneficios */
.benefit-flipper .card-front { transform: rotateX(0deg); }
.benefit-flipper .card-back { transform: rotateX(180deg); }
.benefit-flipper:hover .card-front { transform: rotateX(-180deg); }
.benefit-flipper:hover .card-back { transform: rotateX(0deg); }

#benefits .card-front {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
}

#benefits .card-front .icon-wrapper {
    margin: 0;
}

.benefit-flipper .card-back {
    justify-content: center;
    align-items: center;
}

.card-back {
    text-align: left;
}

.card-back-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-back h6 {
    color: #ff8c00;
    font-weight: 700;
    margin-bottom: 0.5rem;
    width: 100%;
}

.impact-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.impact-list li {
    font-size: 0.85rem;
    color: #b0b4ba;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.impact-list li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    margin-right: 0.5rem;
    line-height: 1.5;
}

#benefits.light-section .icon-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e0e0e0 100%);
    border: 1px solid #d0d0d0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#benefits.light-section .icon-emoji {
    color: #6c757d;
}

/* --- ESTILOS DE FORMULARIO MODAL --- */
.cta-button {
    background: #ff8c00;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background: #e07a00;
    transform: scale(1.05);
}

.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#payment-overlay {
    z-index: 3000; /* Asegura que el overlay de pago esté por encima del otro */
}

.form-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.request-form {
    position: fixed;
    width: 90%;
    max-width: 400px;
    top: 50%;
    left: 50%;
    background-color: #2b211b;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #44372f;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.5) perspective(500px) rotateX(-20deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, visibility 0.4s ease;
}

#payment-form {
    z-index: 3001;
    max-width: 500px;  
    gap: 20px;  
}

.request-form.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1) perspective(500px) rotateX(0deg);
}

.request-form h3 {
    text-align: center;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 1.5rem;
}

.request-form input {
    padding: 12px;
    border: 1px solid #44372f;
    border-radius: 4px;
    background-color: #3a302a;
    color: #f0f0f0;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.request-form input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.3);
}

.request-form .submit-button {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 15px;  
    border-radius: 6px;  
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;  
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.request-form .submit-button:hover {
    background-color: #e07a00;
}

.request-form .close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #a0a0a0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.request-form .close-button:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

/* --- FOOTER --- */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #ffffff;
}

.footer-tagline,
.footer-copyright {
    color: #a0a0a0;
}

.footer-tagline {
    margin-bottom: 0.5rem;
}

.footer-copyright {
    font-size: 0.9rem;
}

/* --- MENÚ MÓVIL Y RESPONSIVE --- */
.nav-toggle { display: none; }
.nav-mobile-menu { display: none; }

@media (max-width: 1024px) {
    .challenges-content {
        grid-template-columns: 1fr;
    }
    .challenges-image {
        max-width: 500px;
        margin: 2rem auto 0;
    }
}

@media (max-width: 768px) {
    .section-title { font-size: 2.2rem; }
    .hero-title { font-size: 2.8rem; }

    .nav-menu, .cta-container { display: none; }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 1100;
    }
    .nav-toggle span {
        width: 100%;
        height: 3px;
        background-color: #f0f0f0;
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    .nav-toggle.is-active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
    .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
    .nav-toggle.is-active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

    .nav-mobile-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        background: #2b211b;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 2rem 0;
        transform: translateY(-200%);
        transition: transform 0.4s ease-in-out;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .nav-mobile-menu.is-active { transform: translateY(0); }
    .nav-mobile-menu .nav-link { font-size: 1.2rem; }

    .process-steps, .benefits-grid, .real-impact-grid {
        grid-template-columns: 1fr;
    }

    #challenges .card, #benefits .card-front {
        flex-direction: column;
        text-align: center;
    }
    #challenges .icon-wrapper, #benefits .card-front .icon-wrapper {
        margin: 0 auto 1.5rem;
    }
}

/* --- TARJETA 'ELEVATOR' --- */
.elevator-card {
    padding: 0;
    cursor: pointer;
    min-height: 280px;
}

.elevator-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #3c2d25;
    opacity: 0;
    transition: opacity 0.5s ease-in-out 0.3s;
    z-index: 1;
}

.elevator-back h4 {
    color: #ff8c00;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.elevator-back h5 {
    color: #f0f0f0;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.elevator-back ul { list-style-type: none; padding: 0; margin: 0; }
.elevator-back ul li { font-size: 0.85rem; color: #b0b4ba; margin-bottom: 0.5rem; }

.elevator-front {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: opacity 0.3s ease;
}

.elevator-front::before,
.elevator-front::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50.5%;
    height: 100%;
    background: #2b211b;
    z-index: -1;
    transition: transform 0.6s cubic-bezier(0.86, 0, 0.07, 1);
}

.elevator-front::before { left: 0; }
.elevator-front::after { right: 0; }

.elevator-card:hover .elevator-front::before { transform: translateX(-100%); }
.elevator-card:hover .elevator-front::after { transform: translateX(100%); }
.elevator-card:hover .elevator-back { opacity: 1; }
.elevator-card:hover .elevator-front { opacity: 0; }

/* ======================= ESTILOS DE PRODUCTO DE PRUEBA ======================= */
.product-section {
    padding: 100px 0;
}

.product-card {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    gap: 2rem;
    align-items: center;
}

.product-image {
    flex-basis: 50%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-details {
    flex-basis: 50%;
    padding: 2rem;
    color: #212529;
}

.product-details h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #212529;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: #ff8c00;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-details .cta-button {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .product-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ======================= NUEVOS ESTILOS FORMULARIO STRIPE ======================= */
#payment-form .form-row {
    width: 100%;
}

#payment-form .form-row-split {
    display: flex;
    gap: 20px;
    width: 100%;
}

#payment-form .form-column {
    flex: 1;
}

#payment-form label {
    display: block;
    color: #a0a0b0;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Contenedor para los campos de Stripe */
#card-number-element,
#card-expiry-element,
#card-cvc-element {
    border: 1px solid #44372f;
    border-radius: 6px;
    padding: 15px;  
    background-color: #3a302a;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Estilos para cuando un campo de Stripe está en foco */
.StripeElement--focus {
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.3);
}

#card-errors {
    color: #fa755a;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
    min-height: 1rem;
}

#payment-form, #payment-overlay {
    opacity: 0;
    visibility: hidden;
}

#payment-form.visible, #payment-overlay.visible {
    opacity: 1;
    visibility: visible;
}