:root {
    --otrc-navy: #212550;
    --otrc-gold: #d4af37;
    --otrc-light: #f8f9fa;
    --otrc-gray: #6c757d;
}

/* Gallery Hero Section */
.gallery-hero {
    position: relative;
    background: linear-gradient(135deg, var(--otrc-navy) 0%, #1a1d3e 100%);
    color: white;
    padding: 120px 0 60px;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/frontend/pattern-dark.png') repeat;
    opacity: 0.1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(33, 37, 80, 0.7), rgba(33, 37, 80, 0.9));
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s;
    animation-fill-mode: both;
}

/* Filter Section */
.gallery-filter-section {
    z-index: 100;
}

.filter-wrapper {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--otrc-gold) var(--otrc-light);
}

.filter-wrapper::-webkit-scrollbar {
    height: 6px;
}

.filter-wrapper::-webkit-scrollbar-track {
    background: var(--otrc-light);
}

.filter-wrapper::-webkit-scrollbar-thumb {
    background: var(--otrc-gold);
    border-radius: 3px;
}

.filter-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-weight: 500;
    color: var(--otrc-gray);
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn i {
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: var(--otrc-gold);
    color: var(--otrc-navy);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--otrc-gold);
    border-color: var(--otrc-gold);
    color: white;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.9);
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

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

/* Grid Variations */
.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

/* Gallery Zoom Button */
.gallery-zoom {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--otrc-navy);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0);
    text-decoration: none;
}

.gallery-item:hover .gallery-zoom {
    opacity: 1;
    transform: scale(1);
}

.gallery-zoom:hover {
    background: var(--otrc-gold);
    color: white;
    transform: scale(1.1);
}

/* Modal Styles */
.modal-content {
    background: transparent;
}

.modal-body img {
    max-height: 85vh;
    width: auto;
    margin: 0 auto;
    border-radius: 12px;
}

/* Gallery CTA Section */
.gallery-cta-section {
    background: linear-gradient(135deg, var(--otrc-navy) 0%, #1a1d3e 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.gallery-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--otrc-gold) 0%, transparent 70%);
    opacity: 0.1;
    animation: rotate 30s linear infinite;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
}

.cta-text {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .gallery-filter-section {
        position: static !important;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .gallery-item.large,
    .gallery-item.wide {
        grid-column: span 1;
    }

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


    .cta-title {
        font-size: 2rem;
    }

    .cta-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        padding: 100px 0 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .filter-wrapper {
        padding: 0.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }


    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading State */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}