/* ============================================
   HERO 3D GALLERY - 2 COLUMNS + CENTER CONTENT
   ============================================ */

/* Hero Section */
.hero-3d {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-color: var(--primary-color);

    /* Fondo sutil de rejilla */
    background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    overflow: hidden;
}

/* ============================================
   GALLERY WRAPPER - 3 ZONE LAYOUT
   Columna Izq | Contenido Central | Columna Der
   ============================================ */

.gallery-wrapper {
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0;

    /* 3D perspective */
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* ============================================
   SCROLL COLUMNS (Left & Right)
   ============================================ */

.scroller {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Máscara de desvanecimiento vertical */
    mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

/* Columna Izquierda */
.scroller:first-child {
    transform: rotateY(15deg) translateZ(-30px);
    transform-origin: right center;
}

/* Columna Derecha */
.scroller:last-child {
    transform: rotateY(-15deg) translateZ(-30px);
    transform-origin: left center;
}

/* Hover suaviza el ángulo */
.gallery-wrapper:hover .scroller:first-child {
    transform: rotateY(8deg) translateZ(-15px);
}

.gallery-wrapper:hover .scroller:last-child {
    transform: rotateY(-8deg) translateZ(-15px);
}

/* Contenedor interno de scroll */
.scroller__inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    padding: 0 0.75rem;
}

/* ============================================
   PHOTO ITEMS
   ============================================ */

.photo-item {
    width: 100%;
    position: relative;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.photo-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 3/4;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.5s ease, opacity 0.5s ease;
    opacity: 0.5;
}

/* Hover individual */
.photo-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.15);
    z-index: 20;
    transform: scale(1.02);
}

.photo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Meta tags (categoría) */
.photo-meta {
    position: absolute;
    bottom: 15px;
    right: -10px;
    background: var(--accent-color);
    color: #000000;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 4px 10px;
    text-transform: uppercase;
    transform: skewX(-10deg);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.photo-item:hover .photo-meta {
    opacity: 1;
    right: 10px;
    transform: skewX(-10deg) translateX(0);
}

/* ============================================
   HERO CONTENT (Center Column)
   ============================================ */

.hero-3d .hero-content {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
    padding: 6rem 2.5rem;
    z-index: 20;
    position: relative;
    align-items: center;
    gap: 3rem;
}

.hero-3d .hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 5vw, 5rem);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    line-height: 0.9;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-3d .hero-subtitle {
    font-family: var(--font-primary);
    color: var(--accent-color);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 300;
    margin-bottom: 3rem;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* ============================================
   DESCRIPTIVE TEXT BLOCK
   ============================================ */

.hero-3d .hero-description {
    max-width: 400px;
    text-align: center;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-3d .hero-desc-text {
    font-size: clamp(0.78rem, 1vw, 0.85rem);
    letter-spacing: 0.03rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    font-weight: 300;
    border-left: none;
    padding-left: 0;
}

.hero-3d .hero-desc-text strong {
    font-weight: 400;
    color: #ffffff;
}

.hero-3d .btn-primary {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 16px 40px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    font-weight: 400;
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-3d .btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SCROLL ANIMATION
   ============================================ */

@keyframes scroll-vertical {
    to {
        transform: translateY(calc(-50% - 0.75rem));
    }
}

.scroller[data-animated="true"] .scroller__inner {
    animation: scroll-vertical var(--_animation-duration, 40s) var(--_animation-direction, forwards) linear infinite;
}

.scroller:hover .scroller__inner {
    animation-play-state: paused;
}

.scroller[data-direction="up"] {
    --_animation-direction: normal;
}

.scroller[data-direction="down"] {
    --_animation-direction: reverse;
}

.scroller[data-speed="fast"] {
    --_animation-duration: 35s;
}

.scroller[data-speed="medium"] {
    --_animation-duration: 45s;
}

.scroller[data-speed="slow"] {
    --_animation-duration: 60s;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet portrait */
@media (max-width: 1024px) {
    .hero-3d .hero-content {
        flex: 1;
        padding: 3rem 1.5rem;
    }

    .hero-3d .hero-title {
        font-size: clamp(2rem, 5vw, 3.2rem);
    }

    .hero-3d .hero-subtitle {
        font-size: 0.7rem;
        letter-spacing: 3px;
        margin-bottom: 2rem;
    }

    .hero-3d .hero-description {
        max-width: 300px;
    }

    .hero-3d .hero-desc-text {
        font-size: 0.78rem;
        margin-bottom: 1.5rem;
    }

    .scroller__inner {
        padding: 0 0.5rem;
        gap: 1rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .gallery-wrapper {
        max-width: 100%;
        perspective: 800px;
    }

    /* Columnas más estrechas, centro más ancho */
    .scroller {
        flex: 0.6;
    }

    .hero-3d .hero-content {
        flex: 2;
        padding: 80px 1rem 2rem;
        justify-content: center;
        width: 100%;
        gap: 2rem;
    }

    .scroller:first-child {
        transform: rotateY(10deg) translateZ(-15px);
    }

    .scroller:last-child {
        transform: rotateY(-10deg) translateZ(-15px);
    }

    .gallery-wrapper:hover .scroller:first-child {
        transform: rotateY(5deg);
    }

    .gallery-wrapper:hover .scroller:last-child {
        transform: rotateY(-5deg);
    }

    .hero-3d .hero-title {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
        margin-bottom: 0.3rem;
    }

    .hero-3d .hero-subtitle {
        font-size: 0.55rem;
        letter-spacing: 2px;
        margin-bottom: 1.2rem;
    }

    .hero-3d .hero-description {
        max-width: 100%;
    }

    .hero-3d .hero-desc-text {
        font-size: 1rem;
        margin-bottom: 1.2rem;
        line-height: 1.5;
        padding-left: 0;
        text-align: center;
    }

    .hero-3d .btn-primary {
        padding: 12px 24px;
        font-size: 0.6rem;
        letter-spacing: 2px;
    }

    .scroller__inner {
        gap: 0.75rem;
        padding: 0 0.35rem;
    }

    .photo-meta {
        display: none;
    }
}