:root {
    --primary: #0f4dbc;
    --primary-dark: #082d6e;
    --accent: #00d2ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --bg-dark: #050a18;
    --grad-main: linear-gradient(135deg, #050a18 0%, #1d428a 100%);
    --grad-accent: linear-gradient(90deg, #0f4dbc 0%, #00d2ff 100%);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(15, 77, 188, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(15, 77, 188, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 77, 188, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(115deg, transparent 0%, transparent 40%, rgba(0, 210, 255, 0.02) 40%, rgba(0, 210, 255, 0.02) 40.5%, transparent 40.5%),
        linear-gradient(115deg, transparent 0%, transparent 45%, rgba(15, 77, 188, 0.02) 45%, rgba(15, 77, 188, 0.02) 45.5%, transparent 45.5%),
        linear-gradient(115deg, transparent 0%, transparent 58%, rgba(0, 210, 255, 0.02) 58%, rgba(0, 210, 255, 0.02) 58.5%, transparent 58.5%);
    background-attachment: fixed;
    z-index: -1;
    pointer-events: none;
}

/* Gray Scale Sections */
.section-gray-fade {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #1a1a1a 40%, #1a1a1a 60%, var(--bg-dark) 100%);
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.section-gray-fade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 86c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm66 3c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-46-45c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm54 24c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM58 69c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-2-54c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM30 42c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-6 20c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm66 28c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-70 2c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm58-76c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-36 80c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-8-82c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm44 40c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm-12 20c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1zm28-40c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.8;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}


/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
.navbar-glass {
    background: rgba(5, 10, 24, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar-brand img {
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 600 !important;
    padding: 0.5rem 1.5rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background: var(--grad-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background-image: linear-gradient(rgba(5, 10, 24, 0.8), rgba(5, 10, 24, 0.8)), url('../images/proceso/proceso6.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 4.5rem; /* Slightly smaller for better balance */
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

/* Decorative Tech Elements */
.tech-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
    animation: pulse-dot 3s infinite ease-in-out;
    pointer-events: none;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
}

.tech-line-vert {
    position: absolute;
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    opacity: 0.3;
    pointer-events: none;
}

.hero-subtitle {
    font-size: 1.5rem; /* More balanced size */
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0.9;
}

.hero-buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Form Section */
.section-form {
    padding: 100px 0;
}

.register-card {
    padding: 40px;
    margin: 20px;
}

.form-control-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
    color: white;
    outline: none;
}

.btn-modern {
    background: var(--grad-accent);
    border: none;
    color: white;
    font-weight: 700;
    padding: 15px 40px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.6);
    color: white;
}

.btn-outline-modern {
    background: transparent;
    border: 2px solid var(--accent);
    color: white;
    font-weight: 700;
    padding: 13px 40px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-modern:hover {
    background: var(--accent);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

/* Service Cards */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-15px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.service-card i {
    transition: all 0.4s ease;
}

.service-card:hover i {
    transform: scale(1.2) rotate(5deg);
    color: white;
}

/* Commercial Partners Carousel */
.partners-section {
    padding: 80px 0;
    overflow: hidden; /* Hide overflow for the marquee */
}

.partners-marquee-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
}

.partners-marquee-inner {
    display: flex;
    width: max-content;
    animation: scroll 80s linear infinite; /* Slowed down from 40s to 80s */
}

.partners-marquee-inner:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.partner-item {
    padding: 0 50px; /* Increased padding for more space between logos */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.partner-item:hover {
    transform: scale(1.1);
}

.partner-item img {
    height: 60px; /* Consistent height for logos */
    width: auto;
    filter: none; /* No more grayscale */
    max-width: 150px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .partner-item {
        padding: 0 25px; /* Less padding on mobile to avoid overflow issues */
    }
    .partner-item img {
        height: 45px; /* Slightly smaller on mobile */
    }
}

/* Info Sections */
.info-section {
    padding: 100px 0;
}

.info-content {
    padding: 40px;
}

.section-tag {
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.mission-vision-card {
    text-align: center;
    padding: 40px;
    height: 100%;
}

.mission-vision-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.footer-contact li {
    margin-bottom: 15px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.footer-contact i {
    color: var(--accent);
    width: 25px;
}

/* Client Grid */
.clients-section {
    padding: 100px 0;
    background: rgba(15, 77, 188, 0.03);
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.client-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    height: 120px;
}

.client-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.bg-white-logo {
    background-color: white !important;
    padding: 8px 15px !important;
    border-radius: 8px;
    display: inline-block;
}

.client-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.section-gray-fade img {
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.1));
    transition: all 0.3s ease;
}

.section-gray-fade img:hover {
    filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.3)) saturate(1.2);
}

.client-card:hover img {
    transform: scale(1.05);
}

/* Project Showcase */
.project-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: all 0.5s ease;
}

.project-image-container:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0, 210, 255, 0.2);
}

.project-image-container img {
    transition: all 0.5s ease;
    width: 100%;
    height: auto;
    display: block;
}

.project-image-container:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
}

.badge-accent {
    background: var(--grad-accent);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
}

.border-glass {
    border-color: var(--glass-border) !important;
}

/* Scroll-Storytelling Section */
.storytelling-container {
    position: relative;
    padding: 100px 0;
}

.sticky-image-container {
    position: sticky;
    top: 120px;
    height: 500px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.process-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 1.2s ease-out;
    transform: scale(1.1);
}

.process-image.active {
    opacity: 1;
    transform: scale(1);
}

.story-step {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-left: 20px;
}

.story-card {
    padding: 30px;
    margin-bottom: 50px;
    transition: all 0.5s ease;
    border-left: 4px solid transparent;
}

.story-card.active {
    border-left-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(15px);
}

.step-number {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 10px;
}

@media (max-width: 991px) {
    .storytelling-container {
        padding: 60px 0;
    }
    
    /* Crucial: permitimos que el sticky use toda la altura del row */
    .storytelling-container .col-lg-7,
    .storytelling-container .col-lg-5 {
        display: contents; 
    }

    .storytelling-container .row {
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .sticky-image-container {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 70px !important; /* Ajustado para que no choque con el notch o navbar */
        height: 300px !important;
        width: 100% !important;
        z-index: 100 !important;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        background-color: var(--bg-dark);
        margin-bottom: 20px !important;
        order: 1; /* La imagen primero */
    }
    
    .story-steps-wrapper {
        order: 2; /* Los textos después */
        position: relative;
    }

    .story-step {
        min-height: auto;
        padding: 40px 0; /* Más espacio para que se note el sticky */
    }
    .process-image {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s ease-in-out;
    }
    .process-image.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    .story-step {
        min-height: auto;
        padding-top: 20px;
        padding-bottom: 20px;
        padding-left: 0;
    }
    .story-card {
        padding: 20px;
        margin-bottom: 30px;
        background: rgba(255, 255, 255, 0.05);
        border-left: 3px solid transparent;
        border-radius: 15px;
    }
    .story-card.active {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.12);
        border-left-color: var(--accent);
    }
    .step-number {
        font-size: 0.8rem;
    }
    h3 {
        font-size: 1.25rem;
    }
}

/* Before/After Slider */
.comparison-slider {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-top: 50px;
}

.comparison-slider .image-before,
.comparison-slider .image-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.comparison-slider .image-after {
    width: 50%;
    border-right: 3px solid var(--accent);
    z-index: 2;
}

.comparison-slider .slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
    cursor: ew-resize;
}

.comparison-label {
    position: absolute;
    bottom: 20px;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 5px;
    z-index: 4;
}

.label-before { right: 20px; }
.label-after { left: 20px; }

/* Responsiveness */
@media (max-width: 991px) {
    .info-section .col-lg-6:nth-child(2) {
        margin-top: 30px;
    }
    .hero-section {
        text-align: center;
        padding-top: 100px;
        background-attachment: scroll; /* Better performance on mobile */
    }
    .hero-title {
        font-size: 3.5rem;
    }
    .hero-subtitle {
        font-size: 1.4rem;
    }
    .hero-section .glass-panel {
        margin-top: 50px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .hero-buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .btn-modern, .btn-outline-modern {
        padding: 12px 30px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #1ebd59;
    color: #FFF;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 2px 8px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.whatsapp-float i {
    margin: 0;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 30px;
    }
}
