/* ========================================
   SUPER SEXY GALLERY PAGE STYLES
   Professional, Modern, Eye-Catching Design
   Matching BRA Blue & Gold Theme
======================================== */

/* Page Header Styles */
.page-header-custom {
    position: relative;
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #044a61 0%, #06607f 50%, #0983a8 100%);
    overflow: hidden;
    z-index: 1;
}

.page-header-custom__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
}

.page-header-custom__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(4, 74, 97, 0.9) 0%, rgba(6, 96, 127, 0.85) 50%, rgba(9, 131, 168, 0.8) 100%);
    z-index: 2;
}

.page-header-custom__content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #ffffff;
}

.page-header-custom__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 25px;
    padding: 12px 25px;
    margin-bottom: 25px;
    color: #D4AF37;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInDown 0.8s ease;
}

.page-header-custom__title {
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.page-header-custom__title .highlight {
    background: linear-gradient(135deg, #D4AF37, #E5C65A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header-custom__text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Gallery Section */
.gallery-modern-section {
    padding: 100px 0;
    background: #f8f9fa;
    position: relative;
}

/* Gallery Filters */
.gallery-filters {
    margin-bottom: 60px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.gallery-results-count {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #06607f, #0887b5);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(6, 96, 127, 0.35);
}

.gallery-results-count__number {
    font-size: 1.25rem;
}

.gallery-results-count__label {
    font-weight: 500;
    opacity: 0.95;
}

.gallery-search {
    margin-bottom: 0;
    flex: 1 1 100%;
    max-width: 500px;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 18px 50px 18px 55px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    outline: none;
    border-color: #06607f;
    box-shadow: 0 8px 30px rgba(6, 96, 127, 0.2);
}

.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
    transition: color 0.3s ease;
}

.search-clear:hover {
    color: #06607f;
}

.gallery-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    color: #666;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #06607f, #0887b5);
    transition: left 0.3s ease;
    z-index: 0;
}

.filter-btn span,
.filter-btn i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.filter-btn:hover {
    border-color: #06607f;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 96, 127, 0.2);
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn:hover span,
.filter-btn:hover i {
    color: #ffffff;
}

.filter-btn.active {
    background: linear-gradient(135deg, #06607f, #0887b5);
    border-color: #06607f;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(6, 96, 127, 0.3);
}

.filter-btn.active::before {
    left: 0;
}

.filter-btn.active span,
.filter-btn.active i {
    color: #ffffff;
}

/* Gallery Grid - Masonry Style */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
    min-height: 400px; /* Prevents collapse before Isotope/images run */
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
    display: block;
    visibility: visible;
}

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

/* Hidden by filter (year/search) or Load More – pure CSS, no Isotope */
.gallery-item--filter-hidden,
.gallery-item--load-more-hidden,
.gallery-item.hidden {
    display: none !important;
}

@keyframes galleryItemFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item__inner {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.gallery-item__image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    min-height: 220px;
    overflow: hidden;
    background: #e8eef1;
}

.gallery-item__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(4, 74, 97, 0.9) 0%, rgba(6, 96, 127, 0.85) 50%, rgba(212, 175, 55, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

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

.gallery-item__content {
    text-align: center;
    color: #ffffff;
    padding: 30px;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-item__content {
    transform: translateY(0);
}

.gallery-item__icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item__icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.5);
}

.gallery-item__icon i {
    font-size: 1.8rem;
    color: #ffffff;
}

.gallery-item__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
}

.gallery-item__category {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-item__link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    text-decoration: none;
}

/* Load More Button */
.gallery-load-more {
    text-align: center;
    margin-top: 60px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #06607f, #0887b5);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(6, 96, 127, 0.3);
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #D4AF37, #E5C65A);
    transition: left 0.3s ease;
    z-index: 0;
}

.load-more-btn span,
.load-more-btn i {
    position: relative;
    z-index: 1;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(6, 96, 127, 0.4);
}

.load-more-btn:hover::before {
    left: 0;
}

.load-more-btn:active {
    transform: translateY(-1px);
}

.load-more-btn.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 991px) {
    .page-header-custom {
        padding: 120px 0 80px;
    }

    .page-header-custom__title {
        font-size: 3rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .gallery-filter-buttons {
        gap: 10px;
    }

    .filter-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 767px) {
    .page-header-custom {
        padding: 100px 0 60px;
    }

    .page-header-custom__title {
        font-size: 2.5rem;
    }

    .page-header-custom__text {
        font-size: 1rem;
    }

    .gallery-modern-section {
        padding: 60px 0;
    }

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

    .gallery-filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .search-box {
        max-width: 100%;
    }
}

/* Lightbox Customization */
.mfp-bg {
    background: rgba(4, 74, 97, 0.95);
    backdrop-filter: blur(10px);
}

.mfp-image-holder .mfp-close,
.mfp-iframe-holder .mfp-close {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 50px;
    right: 20px;
    top: 20px;
    transition: all 0.3s ease;
}

.mfp-image-holder .mfp-close:hover,
.mfp-iframe-holder .mfp-close:hover {
    background: linear-gradient(135deg, #D4AF37, #E5C65A);
    transform: rotate(90deg) scale(1.1);
}

.mfp-counter {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.mfp-arrow {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
}

.mfp-arrow:hover {
    background: linear-gradient(135deg, #06607f, #0887b5);
}

.mfp-arrow::before,
.mfp-arrow::after {
    border-color: #ffffff;
}

/* Loading Animation */
.gallery-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.gallery-empty i {
    font-size: 4rem;
    color: #D4AF37;
    margin-bottom: 20px;
}

.gallery-empty h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.gallery-empty p {
    font-size: 1.1rem;
    color: #666;
}
