/* Interior Design Gallery Styles - Multiple Blocks Version */


/* Container for all gallery blocks */
.gallery-blocks-container {
    background: #f8f8f8;
    padding: var(--space-2) 0;
}

/* Individual Gallery Block - Always visible, stacked vertically */
.project-gallery-block {
    background: #f8f8f8;
    padding: var(--space-1) 0;
    opacity: 1;
    display: block;
}

/* Add spacing between blocks */
.project-gallery-block + .project-gallery-block {
    margin-top: var(--space-2);
    padding-top: var(--space-3);
}

/* Gallery Carousel */
.gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Image Container - Horizontal aspect ratio */
.gallery-image-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: 80%; /* 20% smaller as requested */
    margin: 0 auto;
    width: 80%;
}

/* Image wrapper for sliding animation */
.gallery-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Fixed height to prevent layout shift */
    overflow: hidden;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block;
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    will-change: transform;
}

/* Slide animation states */
.gallery-image.current {
    transform: translateX(0);
    z-index: 2;
}

.gallery-image.next {
    transform: translateX(100%);
    z-index: 1;
}

.gallery-image.prev {
    transform: translateX(-100%);
    z-index: 1;
}

.gallery-image.slide-to-left {
    transform: translateX(-100%);
}

.gallery-image.slide-to-right {
    transform: translateX(100%);
}

.gallery-image.slide-from-right {
    transform: translateX(100%);
}

.gallery-image.slide-from-left {
    transform: translateX(-100%);
}

/* Hidden images for preloading */
.gallery-image.preload {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
}

/* Caption below image - FIXED, doesn't change when navigating */
.gallery-caption {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Carousel Arrows - Positioned ON the image edges */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1); /* 90% transparent */
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 250ms ease;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9); /* White skeletal arrow */
    z-index: 10;
    backdrop-filter: blur(2px);
}

.carousel-arrow-left {
    /* Position on left edge of 80% wide image which is centered */
    /* 10% margin on left + 0px into image = left edge of image */
    left: calc(10% + 0px);
}

.carousel-arrow-right {
    /* Position on right edge of 80% wide image which is centered */
    /* 10% margin on right + 0px into image = right edge of image */
    right: calc(10% + 0px);
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.2); /* 80% transparent on hover */
    color: rgba(255, 255, 255, 1); /* Fully opaque arrow on hover */
    transform: translateY(-50%);
}

.carousel-arrow:active {
    transform: translateY(-50%);
}

.carousel-arrow:disabled {
    display: none;
}

.carousel-arrow span {
    display: block;
    line-height: 1;
    font-weight: 300; /* Thinner font weight for skeletal appearance */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Maintain arrows on image edges */
    .carousel-arrow-left {
        left: calc(10% + 0px);
    }

    .carousel-arrow-right {
        right: calc(10% + 0px);
    }
}

@media (max-width: 768px) {
    .category-buttons {
        gap: 12px;
    }

    .category-btn {
        padding: 10px 24px;
        font-size: 0.85rem;
    }

    .gallery-image-wrapper {
        aspect-ratio: 4 / 3;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Maintain arrows on image edges for mobile */
    .carousel-arrow-left {
        left: calc(10% + 0px);
    }

    .carousel-arrow-right {
        right: calc(10% + 0px);
    }

    .gallery-caption {
        font-size: 0.85rem;
        padding: 0 12px;
    }

    .project-gallery-block {
        padding: var(--space-4) 0;
    }

    .project-gallery-block + .project-gallery-block {
        margin-top: var(--space-3);
        padding-top: var(--space-4);
    }
}

@media (max-width: 480px) {
    .category-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .category-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .gallery-image-wrapper {
        aspect-ratio: 1;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Maintain arrows on image edges for small mobile */
    .carousel-arrow-left {
        left: calc(10% + 0px);
    }

    .carousel-arrow-right {
        right: calc(10% + 0px);
    }
}

/* Smooth scroll behavior for section transitions */
html {
    scroll-behavior: smooth;
}