/* ===================================
   GALERÍA, LIGHTBOX, SERVICIOS Y NAV MÓVIL
   =================================== */

/* -----------------------------------
   Barra de credenciales bajo el hero
   ----------------------------------- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--color-void, #050505);
}

.stat-item {
    padding: 3rem 2rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    display: block;
    font-family: var(--font-mono, monospace);
    font-size: clamp(1.05rem, 1.75vw, 1.6rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .stat-value {
        font-size: 0.95rem;
        white-space: normal;
    }
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #888;
}

@media (max-width: 900px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item {
        padding: 2rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .stat-item:nth-child(2n) {
        border-right: none;
    }
}

/* -----------------------------------
   Tarjetas de servicios / público objetivo
   ----------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.service-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0d0d0d;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.6s var(--ease-out-expo), border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.25);
}

.service-card__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: opacity 0.7s var(--ease-out-expo), filter 0.7s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
    z-index: 0;
}

.service-card:hover .service-card__bg {
    opacity: 0.62;
    filter: grayscale(0%);
    transform: scale(1.06);
}

.service-card__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.96) 10%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.25) 100%);
    z-index: 1;
}

.service-card__body {
    position: relative;
    z-index: 2;
    padding: 2.25rem;
}

.service-card__tag {
    display: inline-block;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #9a9a9a;
    margin-bottom: 1rem;
}

.service-card__title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.85rem;
}

.service-card__text {
    font-size: 0.98rem;
    font-weight: 300;
    line-height: 1.65;
    color: #b8b8b8;
}

/* Lista de "qué incluye" */
.includes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem 3rem;
    max-width: 1400px;
    margin: 4.5rem auto 0;
}

/* Tres columnas en pantallas grandes: los 6 puntos quedan en 2 filas iguales */
@media (min-width: 1024px) {
    .includes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.include-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.include-item__mark {
    flex: none;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    color: #666;
    padding-top: 0.28rem;
    letter-spacing: 0.1em;
}

.include-item__text {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    color: #cfcfcf;
}

.include-item__text strong {
    display: block;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.2rem;
    font-size: 1.02rem;
}

/* -----------------------------------
   Galería en mosaico
   ----------------------------------- */
.gallery-section {
    padding: 8rem 2rem;
    background: var(--color-void, #050505);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 auto 3.5rem;
}

.gallery-filter {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #b5b5b5;
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
}

.gallery-filter:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.gallery-filter.is-active {
    background: #fff;
    border-color: #fff;
    color: #000;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 15vw;
    grid-auto-flow: dense;
    gap: 12px;
}

.g-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #101010;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

.g-item.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.g-item.is-hidden {
    display: none;
}

/* Al filtrar, todo pasa a tamaño uniforme para que no queden huecos */
.gallery-grid.is-filtered .g-item {
    grid-column: span 1;
    grid-row: span 1;
}

.g-item--big {
    grid-column: span 2;
    grid-row: span 2;
}

.g-item--wide {
    grid-column: span 2;
    grid-row: span 1;
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(45%) contrast(1.05);
    transform: scale(1.01);
    transition: transform 1s var(--ease-out-expo), filter 0.7s var(--ease-out-expo);
}

.g-item:hover img,
.g-item:focus-visible img {
    transform: scale(1.07);
    filter: grayscale(0%) contrast(1);
}

.g-item:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.g-item__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1.25rem 1.1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
    text-align: left;
    font-size: 0.82rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
    pointer-events: none;
}

.g-item:hover .g-item__caption,
.g-item:focus-visible .g-item__caption {
    opacity: 1;
    transform: translateY(0);
}

.g-item__zoom {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
    pointer-events: none;
}

.g-item:hover .g-item__zoom,
.g-item:focus-visible .g-item__zoom {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 20vw;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 4.5rem 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 31vw;
        gap: 8px;
    }

    .g-item__caption {
        font-size: 0.72rem;
        padding: 2rem 0.85rem 0.8rem;
    }
}

/* -----------------------------------
   Lightbox
   ----------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(4, 4, 4, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s var(--ease-out-expo), visibility 0.45s var(--ease-out-expo);
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox__figure {
    max-width: 92vw;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    transform: scale(0.96);
    transition: transform 0.5s var(--ease-out-expo);
}

.lightbox.is-open .lightbox__figure {
    transform: scale(1);
}

.lightbox__img {
    max-width: 92vw;
    max-height: 74vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.9);
}

.lightbox__caption {
    font-size: 0.9rem;
    color: #c4c4c4;
    text-align: center;
    max-width: 60ch;
    font-weight: 300;
}

.lightbox__counter {
    display: block;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    color: #6c6c6c;
    margin-top: 0.5rem;
}

.lightbox__btn {
    position: absolute;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    z-index: 2;
}

.lightbox__btn:hover {
    background: #fff;
    color: #000;
}

.lightbox__btn--prev {
    left: 2.5vw;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__btn--next {
    right: 2.5vw;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__btn--close {
    top: 2rem;
    right: 2.5vw;
}

@media (max-width: 768px) {
    .lightbox__btn {
        width: 44px;
        height: 44px;
    }

    .lightbox__btn--prev {
        left: 0.75rem;
    }

    .lightbox__btn--next {
        right: 0.75rem;
    }

    .lightbox__btn--close {
        top: 1rem;
        right: 0.75rem;
    }

    .lightbox__img {
        max-height: 62vh;
    }
}

/* -----------------------------------
   Perfil de Instagram
   ----------------------------------- */
.ig-section {
    padding: 7rem 2rem;
    background: var(--bg-dark, #0a0a0a);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ig-perfil {
    max-width: 940px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.ig-perfil__cabecera {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 2.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* El aro de color característico de Instagram */
.ig-avatar {
    flex: none;
    display: block;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    transition: transform 0.5s var(--ease-out-expo);
}

.ig-avatar:hover { transform: scale(1.05); }

.ig-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 22%;
    border: 3px solid #0a0a0a;
    display: block;
}

.ig-perfil__datos { min-width: 0; max-width: 430px; }

.ig-usuario {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 0.35rem;
}

.ig-nombre {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
}

.ig-bio {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
    color: #b0b0b0;
    margin-bottom: 1.5rem;
}

.ig-boton {
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
}

/* Rejilla de 3x3 como el feed de un perfil */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.ig-celda {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #101010;
}

.ig-celda img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s var(--ease-out-expo), filter 0.5s ease;
}

.ig-celda:hover img {
    transform: scale(1.07);
    filter: brightness(0.5);
}

.ig-celda__capa {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
    pointer-events: none;
}

.ig-celda:hover .ig-celda__capa,
.ig-celda:focus-visible .ig-celda__capa {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 700px) {
    .ig-section { padding: 4.5rem 1rem; }

    .ig-perfil__cabecera {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }

    .ig-avatar { width: 104px; height: 104px; }
    .ig-usuario { font-size: 1.3rem; }
    .ig-grid { gap: 2px; }
}

/* -----------------------------------
   Navegación móvil
   ----------------------------------- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 210;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.4s var(--ease-out-expo), opacity 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s var(--ease-out-expo), visibility 0.45s var(--ease-out-expo);
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu a {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.mobile-menu.is-open a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.is-open a:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: 0.14s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: 0.20s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: 0.26s; }
.mobile-menu.is-open a:nth-child(5) { transition-delay: 0.32s; }
.mobile-menu.is-open a:nth-child(6) { transition-delay: 0.38s; }

.mobile-menu .mobile-menu__lang {
    margin-top: 1.5rem;
    opacity: 0;
    transition: opacity 0.5s var(--ease-out-expo) 0.44s;
}

.mobile-menu.is-open .mobile-menu__lang {
    opacity: 1;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }
}
