﻿/* ═══════════════════════════════════════════════════════════════
   NUMERICA — Secciones de Imagen Humana
   Zonas de foto con placeholder elegante para las 4 product pages
   ═══════════════════════════════════════════════════════════════ */

/* ── Slot base ── */
.img-slot {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #edf1f7;
    display: block;
    width: 100%;
}

    .img-slot img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        border-radius: 20px;
        transition: none;
        transform: none !important;
    }

    .img-slot:hover img {
        transform: none !important;
    }

/* Placeholder */
.img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.8rem 1.5rem;
    gap: 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(var(--sub-primary-rgb, 80,80,80), 0.14);
    background: linear-gradient(135deg, rgba(var(--sub-primary-rgb, 80,80,80), 0.04), rgba(var(--sub-primary-rgb, 80,80,80), 0.09));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.img-slot img.loaded ~ .img-placeholder {
    display: none;
}

.img-placeholder-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(var(--sub-primary-rgb, 80,80,80), 0.1);
    color: rgba(var(--sub-primary-rgb, 80,80,80), 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.img-placeholder-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #3a4a5c;
    line-height: 1.4;
}

.img-placeholder-desc {
    font-size: 0.76rem;
    color: #7a8a9a;
    font-style: italic;
    line-height: 1.5;
    max-width: 240px;
}

.img-placeholder-path {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    color: rgba(var(--sub-primary-rgb, 80,80,80), 0.75);
    background: rgba(var(--sub-primary-rgb, 80,80,80), 0.08);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    word-break: break-all;
    max-width: 90%;
}

/* ── Foto lateral ── */
.img-side {
    height: 420px;
}

@media (max-width: 991.98px) {
    .img-side {
        height: 280px;
    }
}

/* Badge flotante sobre foto */
.img-float-badge {
    position: absolute;
    bottom: 1.2rem;
    left: 1.2rem;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    z-index: 3;
    max-width: calc(100% - 2.4rem);
}

.img-float-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(var(--sub-primary-rgb, 80,80,80), 0.12);
    color: rgba(var(--sub-primary-rgb, 80,80,80), 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.img-float-badge strong {
    display: block;
    font-size: 0.82rem;
    color: #0f2033;
    font-weight: 700;
}

.img-float-badge span {
    font-size: 0.72rem;
    color: #6b7d91;
}

/* ── Franja panorámica ── */
.img-panorama {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 340px;
}

    .img-panorama .img-slot {
        height: 100%;
        border-radius: 0;
    }

        .img-panorama .img-slot img {
            border-radius: 0;
            height: 340px;
        }

    .img-panorama .img-placeholder {
        border-radius: 0;
    }

.img-panorama-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg,rgba(5,14,28,.75) 0%,rgba(5,14,28,.3) 55%,transparent 100%);
    display: flex;
    align-items: center;
    padding: 2.5rem;
    border-radius: 24px;
    pointer-events: none;
}

    .img-panorama-overlay h3 {
        font-size: 1.55rem;
        font-weight: 800;
        color: #fff;
        margin-bottom: 0.5rem;
    }

    .img-panorama-overlay p {
        color: rgba(255,255,255,.8);
        font-size: 0.95rem;
        margin: 0;
        max-width: 380px;
    }

@media (max-width: 767.98px) {
    .img-panorama {
        height: 240px;
    }

        .img-panorama .img-slot img {
            height: 240px;
        }

    .img-panorama-overlay {
        padding: 1.5rem;
    }

        .img-panorama-overlay h3 {
            font-size: 1.15rem;
        }
}

/* ── Tarjeta testimonio con foto ── */
.img-testimonial-wrap {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.07);
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: transform 0.35s cubic-bezier(.16,1,.3,1), box-shadow 0.35s;
}

    .img-testimonial-wrap:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 44px rgba(0,0,0,0.11);
    }

.img-testimonial-photo {
    height: 200px;
    overflow: hidden;
    position: relative;
}

    .img-testimonial-photo .img-slot {
        height: 100%;
        border-radius: 0;
    }

        .img-testimonial-photo .img-slot img {
            border-radius: 0;
            height: 100%;
        }

    .img-testimonial-photo .img-placeholder {
        border-radius: 0;
    }

.img-testimonial-body {
    padding: 1.4rem 1.5rem;
}

.img-testimonial-quote {
    font-style: italic;
    color: #3a4e62;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    padding-left: 1rem;
    position: relative;
}

    .img-testimonial-quote::before {
        content: '\201C';
        position: absolute;
        left: -0.1rem;
        top: -0.4rem;
        font-size: 3rem;
        line-height: 1;
        font-style: normal;
        color: rgba(var(--sub-primary-rgb, 80,80,80), 0.18);
        font-family: Georgia, serif;
    }

.img-testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.img-author-initial {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(var(--sub-primary-rgb, 80,80,80), 0.85), rgba(var(--sub-primary-rgb, 80,80,80), 0.55));
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(var(--sub-primary-rgb, 80,80,80), 0.25);
}

.img-author-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1a2633;
}

.img-author-role {
    font-size: 0.74rem;
    color: #8a9aaa;
}

/* ── Galería de 3 escenas ── */
.img-scene-gallery {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
    gap: 1rem;
    align-items: start;
}

.img-scene-primary,
.img-scene-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.img-scene-item {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    height: auto;
}

    .img-scene-item .img-slot {
        height: auto;
        border-radius: 0;
    }

        .img-scene-item .img-slot img {
            border-radius: 0;
            height: 100%;
        }

    .img-scene-item .img-placeholder {
        border-radius: 0;
    }

.img-scene-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.1rem;
    background: linear-gradient(0deg,rgba(5,14,28,.8) 0%,transparent 100%);
    color: #fff;
}

    .img-scene-caption strong {
        display: block;
        font-size: 0.86rem;
        font-weight: 700;
        margin-bottom: 0.1rem;
    }

    .img-scene-caption span {
        font-size: 0.73rem;
        color: rgba(255,255,255,.65);
    }

@media (max-width: 575.98px) {
    .img-scene-gallery {
        grid-template-columns: 1fr;
    }

    .img-scene-primary,
    .img-scene-stack {
        gap: 1rem;
    }

    .img-scene-item {
        height: auto;
    }
}

/* ── Foto de contacto ── */
.img-contact {
    height: 240px;
    border-radius: 18px;
}

/* ── Proporciones segun especificaciones-imagenes.docx ── */
.img-slot[class*="img-spec-"] {
    height: auto;
}

.img-slot.img-side.img-spec-side-efact {
    aspect-ratio: 800 / 840;
}

.img-slot.img-side.img-spec-side-efact img {
    object-position: 72% center;
}

.img-slot.img-side.img-spec-side-econtax {
    aspect-ratio: 800 / 840;
}

.img-slot.img-side.img-spec-side-edeclara {
    aspect-ratio: 800 / 760;
}

.img-slot.img-contact.img-spec-contact {
    aspect-ratio: 800 / 480;
}

.img-panorama.img-spec-panorama-efact {
    height: auto;
    aspect-ratio: 1400 / 680;
}

.img-panorama.img-spec-panorama-efact .img-slot {
    height: 100%;
    border-radius: 0;
}

.img-panorama.img-spec-panorama-efact .img-slot img {
    height: 100%;
    object-position: center 34%;
}

.img-testimonial-photo.img-spec-testimonial {
    height: auto;
    aspect-ratio: 600 / 400;
}

.img-testimonial-photo.img-spec-testimonial .img-slot {
    height: 100%;
}

.img-testimonial-photo.img-spec-testimonial .img-slot img {
    height: 100%;
    object-position: center 18%;
    background: #eef2f7;
}

.img-slot.img-spec-scene-main {
    height: auto;
    aspect-ratio: 800 / 840;
}

.img-slot.img-spec-scene-secondary {
    height: auto;
    aspect-ratio: 600 / 400;
}

.img-bg-section.img-spec-bg-efact {
    min-height: 0;
    aspect-ratio: 1920 / 680;
}

.img-bg-section.img-spec-bg-efact .img-bg-photo {
    object-position: center 30%;
}

.img-bg-section.img-spec-bg-econtax {
    min-height: 0;
    aspect-ratio: 1920 / 840;
}

.img-bg-section.img-spec-bg-edeclara {
    min-height: 0;
    aspect-ratio: 1920 / 720;
}

.img-bg-section.img-spec-bg-epeople {
    min-height: 0;
    aspect-ratio: 1920 / 880;
}

/* ── Grid de equipo ── */
.img-team-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 0.85rem;
}

.img-team-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3/4;
}

    .img-team-item .img-slot {
        height: 100%;
        border-radius: 0;
    }

        .img-team-item .img-slot img {
            border-radius: 0;
            height: 100%;
        }

    .img-team-item .img-placeholder {
        border-radius: 0;
    }

.img-team-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.65rem 0.8rem;
    background: linear-gradient(0deg,rgba(5,14,28,.88) 0%,transparent 100%);
    color: #fff;
}

    .img-team-label strong {
        display: block;
        font-size: 0.78rem;
        font-weight: 700;
    }

    .img-team-label span {
        font-size: 0.68rem;
        color: rgba(255,255,255,.6);
    }

@media (max-width: 575.98px) {
    .img-team-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════
   FOTO DE FONDO DE SECCIÓN — con overlay de color y texto encima
   ═══════════════════════════════════════════════════════════════ */

.img-bg-section {
    position: relative;
    overflow: hidden;
    background: #0a1628; /* fallback mientras carga */
}

/* La foto de fondo */
.img-bg-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
    transition: none;
    transform: none !important;
}

/* Placeholder de fondo */
.img-bg-placeholder {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    background: linear-gradient(145deg, rgba(var(--sub-primary-rgb, 80,80,80), 0.06), rgba(var(--sub-primary-rgb, 80,80,80), 0.12));
    border: 1px solid rgba(var(--sub-primary-rgb, 80,80,80), 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

    .img-bg-placeholder .ph-icon {
        font-size: 2rem;
        color: rgba(var(--sub-primary-rgb, 80,80,80), 0.4);
    }

    .img-bg-placeholder .ph-label {
        font-size: 0.8rem;
        font-weight: 700;
        color: #5a6a7a;
    }

    .img-bg-placeholder .ph-path {
        font-family: 'Space Mono', monospace;
        font-size: 0.68rem;
        background: rgba(255,255,255,0.8);
        padding: 0.25rem 0.6rem;
        border-radius: 5px;
        color: rgba(var(--sub-primary-rgb, 80,80,80), 0.8);
    }

/* Ocultar placeholder si la foto cargó */
.img-bg-photo.loaded ~ .img-bg-placeholder {
    display: none;
}

/* Overlay de color sobre la foto — el contenido va sobre esto */
.img-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* El contenido de la sección va sobre el overlay */
.img-bg-section > .container,
.img-bg-section > .py-5 > .container {
    position: relative;
    z-index: 2;
}

.img-bg-section .container {
    position: relative;
    z-index: 2;
}

/* ── Variantes de overlay por producto ── */
.img-bg-efact {
    --bg-overlay: linear-gradient(135deg, rgba(3,18,38,0.88) 0%, rgba(11,61,145,0.75) 100%);
}

.img-bg-econtax {
    --bg-overlay: linear-gradient(135deg, rgba(2,27,24,0.88) 0%, rgba(0,107,94,0.75) 100%);
}

.img-bg-edeclara {
    --bg-overlay: linear-gradient(135deg, rgba(18,8,36,0.88) 0%, rgba(78,39,181,0.72) 100%);
}

.img-bg-epeople {
    --bg-overlay: linear-gradient(135deg, rgba(25,10,3,0.86) 0%, rgba(139,52,17,0.75) 100%);
}

/* Overlay aplicado via var */
.img-bg-section .img-bg-overlay {
    background: var(--bg-overlay, rgba(5,14,28,0.82));
}

/* ── Bloque de stat grande sobre fondo ── */
.img-bg-stat-row {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 3rem 0;
}

.img-bg-stat {
    text-align: center;
    color: #fff;
}

.img-bg-stat-number {
    display: block;
    font-family: 'DM Serif Display', 'Syne', serif;
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1;
    color: #fff;
    margin-bottom: 0.4rem;
    letter-spacing: -0.04em;
    text-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.img-bg-stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.84);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.img-bg-stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.2);
    align-self: stretch;
    min-height: 60px;
}

@media (max-width: 767.98px) {
    .img-bg-stat-divider {
        display: none;
    }

    .img-bg-stat-row {
        gap: 1.5rem;
    }
}

/* ── Bloque de texto sobre fondo ── */
.img-bg-text-block {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 1rem;
    color: #fff;
}

    .img-bg-text-block h2 {
        font-size: clamp(1.6rem, 3.5vw, 2.8rem);
        font-weight: 800;
        color: #fff;
        margin-bottom: 1rem;
        line-height: 1.15;
    }

    .img-bg-text-block p {
        color: rgba(255,255,255,0.78);
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }

/* ── Sección de tamaño compacto (para fondos entre secciones) ── */
.img-bg-section.compact {
    min-height: 320px;
}

.img-bg-section.tall {
    min-height: 480px;
}
