/* ===================================
   SOLUCIONES PAGE STYLES
   =================================== */

/* Hero Section with Parallax */
.soluciones-hero {
    position: relative;
    min-height: 500px;
    height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* PARALLAX ACTIVADO EN MOBILE */
    background-attachment: fixed;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(124, 58, 237, 0.75) 0%, 
        rgba(31, 41, 55, 0.6) 50%,
        rgba(247, 147, 30, 0.75) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    padding: var(--space-2xl) 0;
}

.soluciones-hero .hero-title {
    font-family: var(--font-primary);
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.soluciones-hero .title-light {
    font-weight: 300;
}

.soluciones-hero .title-heavy {
    font-weight: 700;
}

.soluciones-hero .hero-description {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Tabs Section - Sticky behavior con degradado de fondo */
.tabs-section {
    background: linear-gradient(135deg, 
        rgba(124, 58, 237, 0.15) 0%, 
        rgb(255, 255, 255) 20%,  
        rgb(255, 255, 255) 80%,  
        rgba(247, 147, 30, 0.15) 100%);
    padding: 0;
    position: sticky;
    top: 70px;
    z-index: 200;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: top var(--transition-normal);
}

.header-hidden .tabs-section {
    top: 0;
}

/* Wrapper para las tabs con fade effect */
.tabs-nav-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Fade gradients en los extremos - revelando el degradado colorido */
.tabs-nav-wrapper::before,
.tabs-nav-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.tabs-nav-wrapper::before {
    left: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 15%,
        rgba(255, 255, 255, 0.85) 30%,
        rgba(255, 255, 255, 0.7) 45%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0.3) 75%,
        rgba(255, 255, 255, 0.1) 90%,
        rgba(255, 255, 255, 0) 100%);
}

.tabs-nav-wrapper::after {
    right: 0;
    background: linear-gradient(to left, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.95) 15%,
        rgba(255, 255, 255, 0.85) 30%,
        rgba(255, 255, 255, 0.7) 45%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0.3) 75%,
        rgba(255, 255, 255, 0.1) 90%,
        rgba(255, 255, 255, 0) 100%);
}

/* Mostrar fade cuando hay overflow */
.tabs-nav-wrapper.has-overflow-left::before {
    opacity: 1;
}

.tabs-nav-wrapper.has-overflow-right::after {
    opacity: 1;
}

.tabs-nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.tabs-nav:active {
    cursor: grabbing;
}

.tabs-nav::-webkit-scrollbar {
    display: none;
}

.tab-button {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--white);
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    user-select: none;
    -webkit-user-drag: none;
}

.tab-button i {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: all var(--transition-normal);
}

.tab-button:hover {
    background: var(--gray-50);
    color: var(--primary-purple);
}

.tab-button:hover i {
    transform: scale(1.1);
    color: var(--primary-orange);
}

/* PROBLEMA 1 CORREGIDO: Tab activa mantiene fondo blanco SÓLIDO */
.tab-button.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-orange);
    background: rgba(255, 255, 255, 1); /* Opaco al 100% */
}

.tab-button.active i {
    color: var(--primary-orange);
    transform: scale(1.1);
}
/* Hero Section with Parallax */
.soluciones-hero {
    position: relative;
    min-height: 500px;
    height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* PARALLAX ACTIVADO EN MOBILE */
    background-attachment: fixed;
    z-index: 1;
}
/* Content Section */
.content-section {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    padding: 80px 0;
    min-height: 60vh;
}

.solution-content {
    background: var(--white);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    max-width: 900px;
    margin: 0 auto;
    transition: opacity 0.3s ease-in-out;
}

.content-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-500);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Typography within content */
.solution-content h1 {
    font-family: var(--font-primary);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-purple);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-orange);
}

.solution-content h2 {
    font-family: var(--font-primary);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary-orange);
    margin-top: 50px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

.solution-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 70%;
    background: var(--primary-orange);
    border-radius: 3px;
}

.solution-content h3 {
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gray-800);
    margin-top: 36px;
    margin-bottom: 16px;
}

.solution-content p {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 24px;
}

.solution-content ul,
.solution-content ol {
    margin-bottom: 28px;
    padding-left: 0;
    list-style: none;
}

.solution-content li {
    font-size: 17px;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 16px;
    padding-left: 36px;
    position: relative;
}

.solution-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-orange) 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.solution-content li::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 8px;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.solution-content strong {
    color: var(--primary-purple);
    font-weight: 600;
}

.solution-content em {
    color: var(--primary-orange);
    font-style: normal;
    font-weight: 500;
}

.solution-content br {
    line-height: 2;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-orange) 100%);
    padding: 90px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-title {
    font-family: var(--font-primary);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-description {
    font-size: 19px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    border-radius: var(--border-radius-full);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.05);
}

.cta-button i {
    width: 18px;
    height: 18px;
    transition: all var(--transition-normal);
}

.cta-button.primary {
    background: var(--white);
    color: var(--primary-purple);
    border: 2px solid var(--white);
}

.cta-button.primary:hover {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4), 0 0 20px rgba(37, 211, 102, 0.3);
    color: var(--white);
}

.cta-button.primary:hover i {
    transform: rotate(10deg) scale(1.1);
    animation: wiggleCTA 0.5s ease-in-out;
}

@keyframes wiggleCTA {
    0%, 100% {
        transform: rotate(10deg) scale(1.1);
    }
    25% {
        transform: rotate(5deg) scale(1.1);
    }
    75% {
        transform: rotate(15deg) scale(1.1);
    }
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 3px solid var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-purple);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.cta-button.secondary:hover i {
    transform: rotate(-10deg) scale(1.1);
    animation: bounceCTA 0.6s ease-in-out;
}

@keyframes bounceCTA {
    0%, 100% {
        transform: rotate(-10deg) scale(1.1);
    }
    50% {
        transform: rotate(-5deg) scale(1.2);
    }
}

/* ===================================
   DEMO MODAL STYLES
   =================================== */

.demo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.demo-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white);
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-normal);
}

.demo-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
    transform: rotate(90deg);
}

.modal-close i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-purple);
    margin-bottom: 12px;
    text-align: center;
}

.modal-subtitle {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-600);
    margin-bottom: 32px;
    text-align: center;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    font-family: var(--font-secondary);
    font-size: 16px;
    color: var(--gray-800);
    transition: all var(--transition-fast);
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.modal-input::placeholder {
    color: var(--gray-400);
}

.modal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 16px 32px;
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-full);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.modal-button:hover {
    background: var(--secondary-purple);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.modal-button i {
    width: 20px;
    height: 20px;
}

body.modal-open {
    overflow: hidden;
}

/* ===================================
   FOOTER CREDITS STYLES
   =================================== */

.footer-credits {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-credits p {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 0;
    text-align: left;
}

.footer-credits a {
    color: var(--primary-purple);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer-credits a:hover {
    color: var(--secondary-purple);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 767px) {
    .soluciones-hero {
        min-height: 400px;
        height: 60vh;
    }
    
    .parallax-background {
        background-attachment: scroll;
        background-position: center center;
    }
    
    .soluciones-hero .hero-title {
        font-size: 40px;
        margin-bottom: 16px;
    }
    
    .soluciones-hero .hero-description {
        font-size: 17px;
    }
    
    .tabs-section {
        top: 70px;
    }
    
    .header-hidden .tabs-section {
        top: 0;
    }
    
    .tabs-nav-wrapper::before,
    .tabs-nav-wrapper::after {
        width: 40px;
    }
    
    .tabs-nav {
        justify-content: flex-start;
    }
    
    .tab-button {
        min-width: 140px;
        padding: 16px 12px;
        font-size: 13px;
    }
    
    .tab-button span {
        font-size: 12px;
    }
    
    .tab-button i {
        width: 22px;
        height: 22px;
    }
    
    .content-section {
        padding: 50px 0;
    }
    
    .solution-content {
        padding: 40px 24px;
        border-radius: 20px;
    }
    
    .solution-content h1 {
        font-size: 32px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .solution-content h2 {
        font-size: 26px;
        margin-top: 40px;
        margin-bottom: 16px;
    }
    
    .solution-content h3 {
        font-size: 22px;
        margin-top: 30px;
    }
    
    .solution-content p,
    .solution-content li {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .solution-content li {
        padding-left: 32px;
    }
    
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-title {
        font-size: 34px;
    }
    
    .cta-description {
        font-size: 17px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .cta-button {
        justify-content: center;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .cta-button i {
        width: 16px;
        height: 16px;
    }

    .modal-content {
        padding: 40px 30px;
        width: 95%;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .modal-input {
        padding: 14px 18px;
        font-size: 15px;
    }

    .modal-button {
        padding: 14px 28px;
        font-size: 15px;
    }

    .modal-button i {
        width: 18px;
        height: 18px;
    }

    .footer-credits {
        margin-top: 24px;
        padding-top: 20px;
    }

    .footer-credits p {
        font-size: 13px;
        text-align: center;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .soluciones-hero .hero-title {
        font-size: 64px;
    }
    
    .soluciones-hero .hero-description {
        font-size: 19px;
    }
    
    .tab-button {
        min-width: 170px;
        padding: 18px 14px;
    }
    
    .solution-content {
        padding: 50px 40px;
    }
    
    .solution-content h1 {
        font-size: 38px;
    }
    
    .solution-content h2 {
        font-size: 30px;
    }
}

@media (min-width: 1024px) {
    .soluciones-hero .hero-title {
        font-size: 72px;
    }
    
    .soluciones-hero .hero-description {
        font-size: 22px;
    }
    
    .tabs-nav-wrapper::before,
    .tabs-nav-wrapper::after {
        width: 80px;
    }
    
    .tab-button {
        min-width: 180px;
        padding: 22px 18px;
        font-size: 15px;
    }
    
    .tab-button i {
        width: 26px;
        height: 26px;
    }
    
    .solution-content h1 {
        font-size: 48px;
    }
    
    .solution-content h2 {
        font-size: 34px;
    }
    
    .cta-title {
        font-size: 52px;
    }
}