/* =========================================
   PÁGINA DE INICIO
   ========================================= */

/* =========================================
   HERO (Grid dividido)
   ========================================= */
.hero-section {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.hero-layout-grid {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    padding: 120px 5vw 60px 5vw;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-content: end;
    align-items: end;
    gap: 20px;
}

.hero-main-right {
    grid-column: 7 / 13;
    padding-bottom: 5vh;
}

.hero-bottom-left {
    grid-column: 1 / 7;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--nc-blue);
    padding-bottom: 5vh;
}

.hero-text-nc {
    font-size: clamp(2rem, 3vw, 68px);
    font-weight: 500;
    line-height: 110%;
    letter-spacing: -0.04em;
    color: var(--nc-blue);
}

.hero-text-nc .reveal-wrap,
.hero-text-nc .reveal-text {
    display: block;
}

.hero-subtitle {
    max-width: 30rem;
    line-height: 1.45;
    color: var(--nc-blue-soft);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

/* Recuadro resaltado */
.highlight-nc-wrapper {
    position: relative;
    display: inline-block;
    isolation: isolate;
    padding: 0 0.15em;
    margin: 0 2px;
    vertical-align: bottom;
}

.highlight-bg {
    position: absolute;
    inset: 0;
    background-color: var(--nc-blue);
    z-index: -1;
    transform-origin: left;
}

.highlight-text {
    color: var(--color-neutral-50);
    position: relative;
    z-index: 1;
}

@media (max-width: 1024px) {
    .hero-main-right { grid-column: 5 / 13; }
    .hero-bottom-left { grid-column: 1 / 5; }
}

@media (max-width: 768px) {
    .hero-layout-grid {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 60px;
    }
    .hero-main-right,
    .hero-bottom-left {
        grid-column: 1 / -1;
        padding-bottom: 0;
    }
    .hero-bottom-left { font-size: 1rem; }
    .hero-text-nc { font-size: clamp(1.8rem, 8vw, 44px); }
}

/* =========================================
   MARCAS (muestra de clientes + botón a /clientes/)
   ========================================= */
.brands-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8vh 5vw;
    text-align: center;
}

.brands-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--nc-blue);
}

.brand-row {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2.5rem;
    align-items: center;
    justify-items: center;
    width: 100%;
    max-width: 1200px;
    margin-top: 40px;
}

.brand-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3.5rem;
}

/* Los logos son blancos: se tiñen con --nc-blue y se resaltan al pasar el mouse */
.brand-slot img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: var(--nc-blue-filter);
    opacity: 0.55;
    transition: opacity 0.4s ease;
}

.brand-slot img:hover { opacity: 1; }

.brands-btn {
    margin-top: 45px;
}

@media (max-width: 1024px) {
    .brand-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .brand-slot { height: 3rem; }
}

/* =========================================
   SERVICIOS
   ========================================= */
.visora-services-list {
    background-color: #ffffff;
    padding: 100px 5vw 5vh 5vw;
    color: var(--nc-blue);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-margin-top: 0;
}

.services-header-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto 10vh auto;
    gap: 15px;
}

.intro-wrap {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.services-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.intro-wrap p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1;
    margin-bottom: 25px;
    font-weight: 300;
}

.services-rows-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.service-row {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--color-neutral-200);
    padding: 3.5vh 0;
    gap: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.service-row:last-child {
    border-bottom: 1px solid var(--color-neutral-200);
}

.service-num {
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 500;
    flex: 0 0 60px;
    transition: color 0.4s ease;
}

.service-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-title {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 500;
    line-height: 1;
    margin-bottom: 15px;
    letter-spacing: -0.03em;
    transition: color 0.4s ease;
}

/* Nombre en inglés como etiqueta pequeña junto al nombre que busca el cliente */
.service-tag {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--color-neutral-200);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0;
    vertical-align: middle;
    color: var(--nc-blue-soft);
}

.service-link {
    align-self: flex-start;
    margin-top: 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nc-blue);
    text-underline-offset: 4px;
}

.service-divider {
    width: 100%;
    height: 1px;
    background-color: var(--color-neutral-200);
    margin-bottom: 15px;
    transition: background-color 0.4s ease;
}

.service-sublist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 30px;
    list-style: none;
}

.service-sublist li {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--nc-blue-soft);
}

/* Video oculto que se abre al pasar el mouse */
.service-media {
    width: 0;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

.service-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-row:hover .service-media {
    width: 260px;
    opacity: 1;
}

.service-row:hover .service-title,
.service-row:hover .service-num {
    color: var(--nc-blue);
}

.service-row:hover .service-divider {
    background-color: var(--nc-blue);
}

@media (max-width: 1024px) {
    .service-row { gap: 15px; }
    .service-row:hover .service-media { width: 200px; }
}

@media (max-width: 768px) {
    .visora-services-list { padding: 10vh 5vw; }
    .service-row { flex-direction: column; padding: 4vh 0; align-items: flex-start; }
    .service-num { margin-bottom: 10px; }
    .service-sublist { grid-template-columns: 1fr; }

    .service-media {
        width: 100%;
        height: 0;
        transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, margin-top 0.4s;
    }

    .service-row:hover .service-media {
        width: 100%;
        height: 160px;
        margin-top: 20px;
    }
}

/* =========================================
   GALERÍA SCROLL INFINITO (6 COLUMNAS)
   ========================================= */
.infinite-gallery-section {
    width: 100%;
    height: 1000px;
    overflow: hidden;
    background-color: #ffffff;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.infinite-gallery-section .services-header-intro {
    margin-bottom: 6vh;
    padding: 0 20px;
}

.gallery-filters {
    justify-content: center;
}

.gallery-btn {
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.h-short { height: 200px; }
.h-medium { height: 350px; }
.h-tall { height: 500px; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* Se atenúan en vez de ocultarse para no romper la altura de las columnas */
.gallery-item.hidden {
    opacity: 0.1;
    filter: grayscale(100%);
    pointer-events: none;
}

.gallery-container {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    gap: 15px;
    width: 100%;
    max-width: 1600px;
    padding: 0 5vw;
    align-items: flex-start;
    flex-grow: 1;
    overflow: hidden;
}

.gallery-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 0.7;
    width: 12%;
    animation: scrollUpAnim 40s linear infinite;
}

/* Pausa el scroll infinito al pasar el mouse */
.gallery-col:hover {
    animation-play-state: paused !important;
}

@keyframes scrollUpAnim {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@media (max-width: 1200px) {
    .gallery-col:nth-child(5),
    .gallery-col:nth-child(6) { display: none !important; }
    .gallery-col { flex: none !important; width: 25% !important; }
}

@media (max-width: 768px) {
    .gallery-col:nth-child(4) { display: none !important; }
    .gallery-col { width: 33.33% !important; }
}

@media (max-width: 480px) {
    .infinite-gallery-section {
        height: auto;
        overflow: visible;
        padding: 5vh 0;
    }

    .gallery-filters {
        gap: 10px;
        font-size: 16px;
        margin-bottom: 30px;
    }

    .gallery-container {
        gap: 8px;
        padding: 0 10px;
    }

    /* 3 columnas fijas y sin animación en teléfonos */
    .gallery-col {
        gap: 8px;
        animation: none !important;
        transform: none !important;
    }

    .h-short { height: 110px; }
    .h-medium { height: 160px; }
    .h-tall { height: 220px; }
}

/* =========================================
   ESTADÍSTICAS (4 COLUMNAS)
   ========================================= */
.visora-stats-compact {
    background-color: #ffffff;
    padding: 10vh 5vw;
    color: var(--nc-blue);
}

.stats-compact-container {
    max-width: 1600px;
    margin: 0 auto;
}

.stats-compact-header {
    margin-bottom: 60px;
}

.stats-compact-header .header-content {
    max-width: 800px;
}

.stats-compact-header .label-accent {
    display: block;
    margin-bottom: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.stats-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--nc-blue);
    margin-bottom: 20px;
}

.stats-compact-header p {
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--nc-blue-soft);
    font-weight: 500;
}

.stats-compact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    border-top: 3px solid var(--nc-blue);
    padding-top: 40px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.stat-number-wrap {
    font-size: clamp(3.2rem, 5vw, 5.5rem);
    font-weight: 500;
    line-height: 0.85;
    letter-spacing: -0.05em;
    color: var(--nc-blue);
    margin-bottom: 30px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s ease;
    transform-origin: left;
}

.stat-divider {
    width: 100%;
    height: 1px;
    background-color: var(--color-neutral-200);
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.stat-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--nc-blue);
}

.stat-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--nc-blue-soft);
}

.stat-card:hover .stat-number-wrap {
    color: var(--nc-blue);
    transform: scale(1.08);
}

.stat-card:hover .stat-divider {
    background-color: var(--nc-blue);
}

@media (max-width: 1200px) {
    .stats-compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px 40px;
    }
}

@media (max-width: 600px) {
    .stats-compact-grid {
        grid-template-columns: 1fr;
        border-top: 2px solid var(--nc-blue);
    }
    .stat-number-wrap {
        font-size: 4.5rem;
    }
}
