/* muestras-gallery.css */
body.minimal-gallery {
    background-color: #ffffff;
    color: #111111;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-y: hidden;
    /* Disable vertical scroll */
    display: flex;
    flex-direction: column;
}

.close-container {
    padding: 40px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    /* Keep header from shrinking */
    background: transparent;
    z-index: 100;
}

.gallery-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0 40px 40px 40px;
    height: calc(100vh - 120px);
    /* Fill available space minus close btn */
    position: relative;
}

/* Header Typography */
.artist-header {
    margin-bottom: 30px;
    flex-shrink: 0;
    opacity: 0;
    animation: fadeInLeft 1s ease-out forwards;
}

.artist-title {
    font-family: 'Playfair Display', serif;
    /* Replaces var(--font-heading) */
    font-style: italic;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.artist-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
    font-style: italic;
    margin: 0;
}

/* Gallery Layout - Horizontal Filmstrip */
.gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100%;
    align-items: center;
    opacity: 0;
    animation: fadeInRight 1s ease-out forwards;
    animation-delay: 0.3s;
}

/* Hide scrollbar for Chrome/Safari/Webkit */
.gallery-grid::-webkit-scrollbar {
    height: 6px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 10px;
}

/* Gallery Navigation Arrows */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    /* Dark circle background */
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Make it a circle */
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.gallery-nav-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.05);
    /* Slight pop */
}

.gallery-nav-btn::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border-top: 2px solid #ffffff;
    /* Bright white arrow */
    border-right: 2px solid #ffffff;
}

.gallery-prev {
    left: 20px;
}

.gallery-prev::after {
    transform: rotate(-135deg);
    margin-left: 6px;
    /* Optically center */
}

.gallery-next {
    right: 20px;
}

.gallery-next::after {
    transform: rotate(45deg);
    margin-right: 6px;
    /* Optically center */
}

.gallery-item {
    flex: 0 0 auto;
    height: 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    height: 100%;
    width: auto;
    max-width: 85vw;
    /* Ensure extremely wide images don't break viewport horizontally */
    object-fit: contain;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .artist-title {
        font-size: 2rem;
    }

    .gallery-grid {
        gap: 20px;
    }

    .close-container {
        padding: 20px;
    }

    .gallery-container {
        padding: 0 20px;
    }

    /* Fix mobile overflow issue */
    .gallery-item img {
        width: 100vw;
        max-width: 100%;
        height: auto;
        max-height: calc(100vh - 160px);
        /* Leave room for headers and closing button */
    }
}

/* Split Layout for Muestras with Text */
.gallery-container.split-layout {
    flex-direction: row;
    gap: 40px;
    align-items: stretch;
}

.split-left {
    flex: 0 0 40%;
    /* Un poco más de ancho para que el texto ocupe menos líneas */
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    /* Allow scroll when text gets too big */
    padding-right: 15px;
    opacity: 0;
    animation: fadeInLeft 1s ease-out forwards;
}

/* Hide scrollbar for cleaner look if scrolling */
.split-left::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Ensure header inside split-left doesn't shrink unnecessarily */
.split-left .artist-header {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.artist-statement p {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 15px;
    font-weight: 400;
    font-style: normal;
}

.artist-statement p:last-child {
    margin-bottom: 0;
}

.split-right {
    flex: 1;
    min-width: 0;
    /* Important for flex items with scrolling children */
    height: 100%;
    position: relative;
    /* This establishes positioning context for arrows inside split-right */
    opacity: 0;
    animation: fadeInRight 1s ease-out forwards;
    animation-delay: 0.3s;
}

/* Redefine Arrow positions if they are inside split-right */
.split-layout .gallery-nav-btn {
    top: 50%;
}

.split-layout .gallery-prev {
    left: 10px;
}

.split-layout .gallery-next {
    right: 10px;
}

/* Mobile responsive adjustments */
@media (max-width: 900px) {
    .gallery-container.split-layout {
        flex-direction: column;
        overflow-y: auto;
        display: block;
        /* Disable flex column to let it naturally scroll */
    }

    .split-left {
        flex: none;
        height: auto;
        overflow-y: visible;
        margin-bottom: 40px;
        padding-right: 0;
    }

    .split-right {
        flex: none;
        height: 50vh;
        /* Give specific height to gallery on mobile since flex removes it */
        min-height: 400px;
    }
}

/* Scroll Arrow Indicator */
.scroll-arrow {
    position: sticky;
    bottom: 0px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 90%);
    padding-bottom: 15px;
    cursor: pointer;
    color: #111;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.scroll-arrow svg {
    animation: scrollBounce 2.5s infinite ease-in-out;
}

@keyframes scrollBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

/* Keyframes for Left/Right Fade In */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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