/* ============================================
   INDEX PAGE STYLES - SOUL
   ============================================ */

/* Logo en Navbar */
.logo-img {
    height: 40px;
    width: auto;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--soul-dark-blue);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/hero-banner.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 0, 45, 0.35);
    z-index: 2;
}

.hero-graphic {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(97, 79, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 2;
    opacity: 0.6;
}

/* Crear efecto de puntos blancos en círculo */
.hero-graphic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 50%;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-family: var(--font-dm-sans);
    font-weight: normal;
    font-size: 60px;
    line-height: 1;
    color: var(--soul-white);
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    margin-bottom: 2.5rem !important;
}

.hero-title strong {
    color: #FFFFFF;
    font-weight: 800;
}

.hero-subtitle {
    font-family: var(--font-dm-sans);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--soul-text-light);
    margin-bottom: 2.5rem !important;
}

.hero-section .btn-soul-primary {
    margin-top: 0.75rem !important;
}

/* Clients Section */
.clients-section {
    background-color: transparent;
    padding: 4rem 0;
    overflow: hidden;
}

/* Marquesina a ancho completo (rompe el container) */
.clients-section .clients-marquee-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

.clients-title {
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 2rem;
    color: var(--soul-white);
    margin-bottom: 2rem;
}

.clients-title em {
    font-style: italic;
}

.clients-marquee-wrapper {
    overflow: hidden;
    position: relative;
}

.clients-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.clients-marquee-content {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    width: max-content;
    animation: marquee 12.5s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.client-logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    margin: 0;
    min-width: 180px;
    width: auto;
    max-width: 220px;
    height: 80px;
}

.client-logo-img {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 220px;
    filter: brightness(1) invert(0);
    opacity: 0.9;
    transition: opacity 0.3s ease;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.client-logo-img:hover {
    opacity: 1;
}

/* Pausar animación en hover (opcional) */
.clients-marquee-wrapper:hover .clients-marquee-content {
    animation-play-state: paused;
}

/* Respetar prefers-reduced-motion (entonces se ven las dos copias estáticas) */
@media (prefers-reduced-motion: reduce) {
    .clients-marquee-content {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
}

/* Solo mobile: logos más compactos para ver varios en pantalla */
@media (max-width: 768px) {
    .client-logo-item {
        min-width: 140px;
        max-width: 160px;
        height: 60px;
        padding: 0 1rem;
    }

    .client-logo-img {
        object-fit: contain;
    }
}

/* Services Section */
.services-section {
    background-color: var(--soul-dark-blue);
    padding: 5rem 0;
}

.services-title {
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 2.5rem;
    text-align: center;
}

.services-title-purple {
    display: block;
    font-size: 28px;
    color: var(--soul-purple);
}
.services-title-line2 {
    color: var(--soul-white);
    font-size: 45px;
    font-weight: 700;
}

.services-title-italic {
    font-style: italic;
}

/* Service card: giro alrededor del eje vertical (rotateY); la card entera rota como una puerta */
.service-card {
    position: relative;
    height: 100%;
    min-height: 380px;
    overflow: hidden;
    perspective: inherit;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    background-color: var(--soul-dark-blue);
    border: 1px solid var(--soul-white);
    border-radius: 6px;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    inset: 0;
    padding: 4.5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--soul-dark-blue);
    border-radius: 6px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.service-card-front {
    z-index: 2;
}

.service-card-back {
    z-index: 1;
    justify-content: flex-start;
    align-items: stretch;
    transform: rotateY(180deg);
}

.service-card:hover .service-card-front {
    z-index: 1;
}

.service-card:hover .service-card-back {
    z-index: 2;
}

.service-card-front .service-card-title {
    order: 1;
    margin-bottom: 3rem;
}

.service-card-front .service-icon {
    order: 2;
}

.service-card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 198px;
    height: 263px;
    background-color: var(--soul-purple);
    border-radius: 3px;
    filter: blur(100px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

/* Estado 2 (dorso): sin fondo en degradé */
.service-card-back .service-card-glow {
    display: none;
}

.service-card-back .service-card-title {
    position: relative;
    z-index: 1;
    margin-bottom: 0.75rem;
}

.service-card-divider {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--soul-white);
    margin: 0 0 1.25rem;
    opacity: 0.8;
}

.service-card-back .service-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.service-icon-bottom {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1;
}

/* En el dorso la cara está rotateY(180deg), así que right se ve a la izquierda: usar left para alinear a la derecha */
.service-card-back .service-icon-bottom {
    right: auto;
    left: 0;
}

.service-icon-bottom .service-icon-img {
    float: right;
    width: 68px;
    height: auto;
}

.service-icon {
    position: relative;
    z-index: 1;
    text-align: center;
}

.service-icon-img {
    width: 80px;
    height: auto;
    filter: brightness(0) invert(1);
}

.service-card-title {
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--soul-white);
    text-align: center;
}

.service-list {
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.service-list li {
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 1rem;
    color: var(--soul-white);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Sin giro si el usuario prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .service-card-inner {
        transition: none;
    }
    .service-card:hover .service-card-inner {
        transform: none;
    }
    .service-card-front {
        display: none;
    }
    .service-card-back {
        position: relative;
        transform: none;
    }
    .service-card-inner {
        min-height: 0;
    }
}

/* Awards Section - Fondo con parallax (fondo-circular.webp) */
.awards-section {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.section-parallax-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/fondo-home.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
}

.awards-section .section-parallax-bg {
    background-image: url('../img/fondo-circular.webp');
}

.awards-section .container,
.cases-section .container {
    position: relative;
    z-index: 1;
}

/* Cases Section - Mismo fondo parallax */
.cases-section {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
    background-color: #000;
}

.cases-section .section-parallax-bg {
    display: none;
}

@media (max-width: 768px) {
    .section-parallax-bg {
        background-attachment: scroll;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-parallax-bg {
        background-attachment: scroll;
    }
}

.awards-section-title {
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 47px;
    color: #fff;
    text-align: center;
    margin-bottom: 0;
}

.award-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 96px;
    object-fit: contain;
    display: inline-block;
    opacity: 0.9;
}


.cases-section-title {
    font-family: var(--font-inter);
    font-weight: 600;
    text-align: center;
    margin-bottom: 0;
}

.cases-title-light {
    display: block;
    font-size: 27px;
    color: #614fff;
    font-weight: 800;
}

.cases-title-bold {
    display: block;
    font-size: 45px;
    color: #fff;
    font-weight: 600;
}

/* Carrusel Casos de Éxito - diseño Figma */
#casesCarousel {
    padding-bottom: 5rem;
}

#casesCarousel .carousel-inner {
    overflow: visible;
}

#casesCarousel.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#casesCarousel.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Altura igual para todos los slides (evita que varíe al cambiar de caso) */
#casesCarousel .carousel-item {
    min-height: 420px;
}

#casesCarousel .carousel-item .row {
    min-height: 420px;
}

.cases-slide-label {
    font-family: var(--font-inter);
    font-size: 0.95rem;
    color: #614fff;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.cases-slide-title {
    font-family: var(--font-inter);
    font-size: 2.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.cases-slide-description {
    font-family: var(--font-dm-sans);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cases-slide-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cases-slide-list li {
    font-family: var(--font-dm-sans);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.cases-slide-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: #614fff;
    border-radius: 50%;
}

.cases-slide-img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Indicadores del carrusel: logos (imágenes) en lugar de bullets */
.cases-carousel-indicators {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 10;
}

.cases-indicator-btn {
    width: 80px;
    height: 80px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.25s ease, filter 0.25s ease;
    opacity: 0.8;
}

.cases-indicator-btn:hover,
.cases-indicator-btn.active {
    opacity: 1;
}

/* Logos inactivos en blanco y negro (solo CSS, sin nuevas imágenes) */
.cases-indicator-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.25s ease;
}

.cases-indicator-btn.active .cases-indicator-img,
.cases-indicator-btn:hover .cases-indicator-img {
    filter: grayscale(0);
}

/* Contact Section - Fondo con imagen (capa opaca anula el parallax global solo aquí) */
.contact-section {
    position: relative;
    padding: 5rem 0;
    background-image: url('../img/fondo-contacto.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-form-wrapper {
    border-radius: 6px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-form-wrapper .form-label {
    color: #000;
}

.contact-form-wrapper .form-control {
    background-color: #ffffff;
    border: 1px solid var(--soul-border);
    color: #000;
}

.contact-form-wrapper .form-control::placeholder {
    color: #999;
    font-weight: 300;
}

.contact-form-cta {
    font-family: var(--font-dm-sans);
    font-size: 14px;
    color: #000;
    text-align: center;
    margin-bottom: 0;
}

.form-helper-text-small {
    font-family: var(--font-dm-sans);
    font-weight: 400;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.form-footer-text {
    font-family: var(--font-dm-sans);
    font-weight: 400;
    font-size: 0.75rem;
    color: #666;
    margin-top: 1rem;
}

.contact-title {
    font-family: var(--font-dm-sans);
    font-weight: 900;
    font-size: 55px;
    line-height: 1.2;
    color: #fff;
    text-align: left;
    padding: 0 40px;
}

.text-link {
    color: #0066ff;
    font-family: var(--font-dm-sans);
    font-size: 0.75rem;
    text-decoration: underline;
}

.text-link:hover {
    color: var(--soul-purple);
}

/* Alertas del formulario */
.alert {
    border-radius: 6px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-dm-sans);
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
}

.was-validated .form-control:valid {
    border-color: #198754;
}

/* Animaciones */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-section .col-lg-6:first-child {
    animation: slideInLeft 0.8s ease-out;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .contact-title {
        font-size: 2.5rem;
        margin-top: 2rem;
        text-align: left;
    }
    
    .services-title {
        font-size: 2rem;
    }
    
    .hero-graphic {
        width: 300px;
        height: 300px;
        right: 5%;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh !important;
        align-items: flex-start !important;
        padding: 3rem 0;
    }
    
    .hero-section .row.align-items-center.min-vh-100 {
        align-items: flex-start !important;
        min-height: 0 !important;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .services-title,
    .awards-section-title,
    .cases-section-title {
        font-size: 1.5rem;
    }
    
    .services-title-line2 {
        font-size: 2.25rem;
    }
    
    /* Servicios: swipe horizontal en mobile; se ve el inicio de la siguiente card */
    .services-section .row.g-4 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 1rem;
        margin-left: calc(-1 * var(--bs-gutter-x, 0.75rem));
        margin-right: calc(-1 * var(--bs-gutter-x, 0.75rem));
        padding-left: var(--bs-gutter-x, 0.75rem);
        padding-right: var(--bs-gutter-x, 0.75rem);
        padding-bottom: 0.25rem;
    }
    .services-section .row.g-4 .col-md-4 {
        flex: 0 0 auto;
        width: 85%;
        max-width: 320px;
    }
    .service-card {
        margin-bottom: 0;
    }
    /* En mobile las cards muestran siempre el dorso (lista de servicios) */
    .services-section .service-card .service-card-inner {
        transform: rotateY(180deg);
    }
    .services-section .service-card:hover .service-card-inner {
        transform: rotateY(180deg);
    }
    .service-card-front,
    .service-card-back {
        padding: 2rem 1.5rem;
    }
    
    /* Reconocimientos: logos en fila horizontal con swipe en mobile */
    .awards-section .row.g-4 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 1.5rem;
        margin-left: calc(-1 * var(--bs-gutter-x, 0.75rem));
        margin-right: calc(-1 * var(--bs-gutter-x, 0.75rem));
        padding-left: var(--bs-gutter-x, 0.75rem);
        padding-right: var(--bs-gutter-x, 0.75rem);
        padding-bottom: 0.25rem;
        justify-content: flex-start;
    }
    .awards-section .row.g-4 [class*="col"] {
        flex: 0 0 auto;
        width: auto;
        min-width: 120px;
        max-width: 140px;
    }
    .awards-section .row.g-4 .award-logo-img {
        max-height: 72px;
    }
    
    /* Ocultar barra de scroll en zonas swipe (Chrome, Safari, Edge) */
    .services-section .row.g-4::-webkit-scrollbar,
    .awards-section .row.g-4::-webkit-scrollbar {
        display: none;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    .hero-graphic {
        display: none;
    }
    
    .cases-slide-title {
        font-size: 1.75rem;
    }
    
    .cases-indicator-btn {
        width: 56px;
        height: 56px;
    }
    
    #casesCarousel {
        padding-bottom: 4rem;
    }
}
