/* ======================================== */
/* GALLERY SECTION - WARM THEME */
/* ======================================== */

.gallery-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #e8dcc8 0%, #f5efe6 100%) !important;
    position: relative;
}

/* Decorative Elements for Gallery Section */
.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 115, 85, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.gallery-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 115, 85, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-badge-text {
    display: inline-block;
    background: rgba(139, 115, 85, 0.12) !important;
    color: #8B6B4A !important;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 800;
    color: #4A3228 !important;
    margin-bottom: 15px;
}

.gallery-title span {
    color: #8B6B4A !important;
    position: relative;
}

.gallery-title span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(139, 115, 85, 0.25) !important;
    border-radius: 10px;
}

.gallery-subtitle {
    color: #5A4A3A !important;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 15px;
    position: relative;
    opacity: 0;
    box-shadow: 0 5px 20px rgba(139, 115, 85, 0.1);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
    border: 2px solid transparent;
    background: #ffffff !important;
    cursor: pointer;
}

.gallery-item:hover {
    box-shadow: 0 15px 40px rgba(139, 115, 85, 0.2);
    border-color: rgba(139, 115, 85, 0.3) !important;
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Overlay - Warm Theme */
.gallery-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(74, 50, 40, 0.8), transparent) !important;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 0 0 15px 15px;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Gallery Caption */
.gallery-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-caption span {
    background: rgba(74, 50, 40, 0.85) !important;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Specific Grid Sizing */
.item-1 {
    grid-row: span 2;
}

.item-3 {
    grid-column: span 1;
}

/* Gallery Badge/Indicator */
.gallery-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #6B5544 0%, #8B6B4A 100%) !important;
    color: white !important;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 2;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-badge {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Category Tag */
.gallery-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #4A3228 !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.gallery-item:hover .gallery-category {
    opacity: 1;
    transform: translateY(0);
}

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

.reveal-left {
    transform: translateX(-100px);
    transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal-right {
    transform: translateX(100px);
    transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal-down {
    transform: translateY(-100px);
    transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(100px);
    transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.is-active {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* Stagger Animation Delays */
.gallery-item:nth-child(1) {
    transition-delay: 0.05s;
}

.gallery-item:nth-child(2) {
    transition-delay: 0.1s;
}

.gallery-item:nth-child(3) {
    transition-delay: 0.15s;
}

.gallery-item:nth-child(4) {
    transition-delay: 0.2s;
}

.gallery-item:nth-child(5) {
    transition-delay: 0.25s;
}

.gallery-item:nth-child(6) {
    transition-delay: 0.3s;
}

.gallery-item:nth-child(7) {
    transition-delay: 0.35s;
}

.gallery-item:nth-child(8) {
    transition-delay: 0.4s;
}

.gallery-item:nth-child(9) {
    transition-delay: 0.45s;
}

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

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        gap: 15px;
    }

    .item-1 {
        grid-row: span 1;
    }

    .gallery-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .gallery-section {
        padding: 60px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
        gap: 15px;
    }

    .item-1 {
        grid-row: span 1;
    }

    .gallery-title {
        font-size: 1.8rem;
    }

    .gallery-badge-text {
        font-size: 11px;
        padding: 4px 15px;
    }

    .gallery-caption {
        font-size: 12px;
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
}

/* Gallery Counter/Indicator */
.gallery-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: white !important;
    font-size: 12px;
    font-weight: 600;
    background: rgba(74, 50, 40, 0.8) !important;
    padding: 3px 12px;
    border-radius: 20px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-counter {
    opacity: 1;
}

/* Gallery Zoom Button */
.gallery-zoom-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #6B5544 0%, #8B6B4A 100%) !important;
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    opacity: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.gallery-item:hover .gallery-zoom-btn {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.gallery-zoom-btn:hover {
    background: linear-gradient(135deg, #8B6B4A 0%, #C49A6C 100%) !important;
    transform: translate(-50%, -50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Lightbox Overlay */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 50, 40, 0.95) !important;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white !important;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.gallery-lightbox-close:hover {
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.2);
}

/* Gallery Pagination Dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d5deed;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-dot.active {
    background: #8B6B4A !important;
    width: 30px;
    border-radius: 10px;
}

.gallery-dot:hover {
    background: #C49A6C !important;
}

/* ======================================== */
/* DARK MODE - WARM THEME */
/* ======================================== */

@media (prefers-color-scheme: dark) {
    .gallery-section {
        background: linear-gradient(135deg, #2A1F18 0%, #3D2D22 100%) !important;
    }

    .gallery-title {
        color: #F5E6D3 !important;
    }

    .gallery-title span {
        color: #C49A6C !important;
    }

    .gallery-title span::after {
        background: rgba(196, 154, 108, 0.2) !important;
    }

    .gallery-subtitle {
        color: #D4C5B5 !important;
    }

    .gallery-badge-text {
        background: rgba(139, 115, 85, 0.15) !important;
        color: #C49A6C !important;
    }

    .gallery-item {
        background: #2A1F18 !important;
        border-color: rgba(139, 115, 85, 0.1);
    }

    .gallery-item:hover {
        border-color: rgba(196, 154, 108, 0.3) !important;
        box-shadow: 0 15px 40px rgba(139, 115, 85, 0.1);
    }

    .gallery-item::after {
        background: linear-gradient(to top, rgba(42, 31, 24, 0.85), transparent) !important;
    }

    .gallery-badge {
        background: linear-gradient(135deg, #6B5544 0%, #8B6B4A 100%) !important;
    }

    .gallery-category {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #C49A6C !important;
    }

    .gallery-caption span {
        background: rgba(42, 31, 24, 0.85) !important;
        border-color: rgba(196, 154, 108, 0.1);
    }

    .gallery-zoom-btn {
        background: linear-gradient(135deg, #6B5544 0%, #8B6B4A 100%) !important;
    }

    .gallery-zoom-btn:hover {
        background: linear-gradient(135deg, #8B6B4A 0%, #C49A6C 100%) !important;
    }

    .gallery-counter {
        background: rgba(42, 31, 24, 0.8) !important;
    }

    .gallery-dot {
        background: #6B5544;
    }

    .gallery-dot.active {
        background: #C49A6C !important;
    }

    .gallery-dot:hover {
        background: #8B6B4A !important;
    }

    .gallery-lightbox {
        background: rgba(42, 31, 24, 0.95) !important;
    }

    .gallery-section::before,
    .gallery-section::after {
        background: radial-gradient(circle, rgba(196, 154, 108, 0.04) 0%, transparent 70%);
    }
}

/* ======================================== */
/* ROOT VARIABLES - WARM THEME */
/* ======================================== */

:root {
    --gallery-primary: #8B6B4A;
    --gallery-primary-light: #A8825A;
    --gallery-primary-lighter: #C49A6C;
    --gallery-primary-dark: #6B5544;
    --gallery-primary-darker: #4A3228;
    --gallery-bg-start: #e8dcc8;
    --gallery-bg-end: #f5efe6;
}