/* Gallery Section Styling */
.gallery-section {
    padding: 100px 0 80px;
    background: var(--primary-color);
    min-height: calc(100vh - 80px);
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Filter Section */
.gallery-filters-section {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    background: rgba(232, 145, 159, 0.1);
    border: 2px solid transparent;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.filter-btn:hover {
    background: rgba(232, 145, 159, 0.15);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(232, 145, 159, 0.4);
    transform: translateY(-2px);
}

/* Gallery Grid - Responsive Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Compare Slider Container */
.image-compare {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(26, 26, 26, 0.15);
    cursor: ew-resize;
    margin-bottom: 25px;
    --slider-position: 50%;
}

.image-compare:hover {
    box-shadow: 0 20px 60px rgba(26, 26, 26, 0.2);
}

.image-compare__wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-compare__before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.image-compare__before img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-compare__after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: inset(0 0 0 var(--slider-position));
    z-index: 2;
}

.image-compare__after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slider Handle */
.image-compare__handle {
    position: absolute;
    top: 0;
    left: var(--slider-position);
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-compare__drag-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(232, 145, 159, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    animation: dragPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(232, 145, 159, 0.4);
}

@keyframes dragPulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.image-compare:hover .image-compare__drag-indicator {
    animation: dragPulse 1s ease-in-out infinite;
}

/* Range Input Slider */
.image-compare__input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 15;
    margin: 0;
    padding: 0;
    border: none;
    -webkit-appearance: none;
    appearance: none;
}

.image-compare__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 4px;
    height: 100%;
    background: transparent;
    cursor: ew-resize;
}

.image-compare__input::-moz-range-thumb {
    width: 4px;
    height: 100%;
    background: transparent;
    cursor: ew-resize;
    border: none;
}

/* Image Labels */
.image-compare__label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(26, 26, 26, 0.85);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    backdrop-filter: blur(10px);
}

.image-compare__label--before {
    left: 20px;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
}

.image-compare__label--after {
    right: 20px;
    border: 2px solid #51cf66;
    color: #51cf66;
}

/* Gallery Item Info */
.gallery-item__info {
    padding: 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-item__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.gallery-item__location {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.gallery-item__category {
    display: inline-block;
    background: rgba(232, 145, 159, 0.15);
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.gallery-item__description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.gallery-item__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(232, 145, 159, 0.2);
}

.gallery-item__stat {
    text-align: center;
}

.gallery-item__stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}

.gallery-item__stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gallery-item__expand-btn {
    margin-top: auto;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-color), #f5a8b8);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.gallery-item__expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 145, 159, 0.3);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    opacity: 0;
    visibility: hidden;
    z-index: 2000;
    transition: all 0.4s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    margin: 5% auto;
    display: flex;
    flex-direction: column;
    z-index: 2001;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lightbox Close Button */
.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2002;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(232, 145, 159, 0.8);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2002;
}

.lightbox-nav:hover {
    background: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

/* Lightbox Content */
.lightbox-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

#lightbox-image {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Lightbox Info Section */
.lightbox-info {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    color: white;
}

#lightbox-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

#lightbox-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.lightbox-counter {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Responsive Design - Tablet */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .gallery-header h1 {
        font-size: 2.8rem;
    }

    .image-compare {
        height: 350px;
    }

    .lightbox-prev {
        left: -50px;
    }

    .lightbox-next {
        right: -50px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .gallery-section {
        padding: 80px 0 60px;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .gallery-filters-section {
        gap: 8px;
        margin-bottom: 40px;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .image-compare {
        height: 300px;
    }

    .image-compare__label {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .gallery-item__info {
        padding: 15px 0;
    }

    .gallery-item__title {
        font-size: 1.1rem;
    }

    .gallery-item__stats {
        gap: 5px;
    }

    /* Mobile Lightbox */
    .lightbox-container {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    .lightbox-prev,
    .lightbox-next {
        position: fixed;
        top: auto;
        bottom: 20px;
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .lightbox-info {
        padding: 15px;
        margin-top: 15px;
    }

    #lightbox-title {
        font-size: 1.2rem;
    }

    #lightbox-description {
        font-size: 0.85rem;
    }
}

/* Responsive Design - Small Screens */
@media (max-width: 480px) {
    .gallery-header h1 {
        font-size: 1.5rem;
    }

    .gallery-filters-section {
        gap: 6px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .image-compare {
        height: 250px;
    }

    .image-compare__label {
        font-size: 0.7rem;
        padding: 4px 10px;
        top: 10px;
    }

    .image-compare__label--before {
        left: 10px;
    }

    .image-compare__label--after {
        right: 10px;
    }

    .gallery-item__expand-btn {
        width: 100%;
        text-align: center;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-info {
        padding: 12px;
    }

    #lightbox-title {
        font-size: 1rem;
    }

    #lightbox-description {
        font-size: 0.8rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .image-compare,
    .filter-btn,
    .lightbox-modal,
    .gallery-item {
        transition: none;
        animation: none;
    }
}

/* Loading State */
.gallery-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.gallery-empty p {
    font-size: 1.1rem;
}
