/* Gallery Page Styles */
:root {
    --primary: #0A1F44;
    --primary-light: #1a2f54;
    --secondary: #000000;
    --gold: #D4AF37;
    --gold-light: #e6c65c;
    --gold-dark: #b39127;
    --white: #FFFFFF;
    --dark-bg: #0A1F44;
}

/* ============= GALLERY HERO SECTION ============= */
.gallery-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 160px 0 60px;
    margin-top: 0;
}

.gallery-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-light) 100%);
    z-index: 1;
    opacity: 0.9;
}

.gallery-hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.gallery-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-icon-gallery {
    margin-bottom: 1.5rem;
}

.icon-circle-gallery {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
    animation: float 3s ease-in-out infinite;
    color: var(--primary);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
    letter-spacing: -1px;
    line-height: 1.1;
}

.gallery-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin: 1.5rem 0 0 0;
    letter-spacing: 0.3px;
}

/* ============= STATS SECTION ============= */
.gallery-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 30px 0;
}

@media (max-width: 1024px) {
    .gallery-stats {
        gap: 30px;
        padding: 25px 0;
    }
}

@media (max-width: 768px) {
    .gallery-stats {
        gap: 20px;
        padding: 20px 0;
    }
}

@media (max-width: 576px) {
    .gallery-stats {
        gap: 15px;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .gallery-stats {
        gap: 12px;
        padding: 12px 0;
    }
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
    animation: slideInUp 0.8s ease forwards;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 2px;
    height: 50px;
    background: linear-gradient(180deg, transparent, var(--gold), transparent);
    flex: 0 0 auto;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============= FILTER SECTION ============= */
.gallery-filter-section {
    position: relative;
    z-index: 50;
    background: rgba(10, 31, 68, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
    .gallery-filter-section {
        padding: 10px 0;
    }
}

@media (max-width: 768px) {
    .gallery-filter-section {
        padding: 8px 0;
    }
}

@media (max-width: 576px) {
    .gallery-filter-section {
        padding: 6px 0;
    }
}

@media (max-width: 480px) {
    .gallery-filter-section {
        padding: 4px 0;
    }
}

.filter-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}

@media (max-width: 1024px) {
    .filter-wrapper {
        padding: 0 15px;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .filter-wrapper {
        padding: 0 12px;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .filter-wrapper {
        padding: 0 10px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .filter-wrapper {
        padding: 0 8px;
        gap: 6px;
    }
}

.filter-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    background: transparent;
    color: var(--gold);
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    z-index: -1;
    transition: left 0.3s ease;
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn:hover {
    color: var(--primary);
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-3px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--primary);
    border-color: var(--gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.filter-icon {
    font-size: 1.1rem;
}

.filter-text {
    display: inline-block;
}

@media (max-width: 768px) {
    .filter-wrapper {
        justify-content: center;
    }
    
    .filter-label {
        width: 100%;
        text-align: center;
    }
}

/* ============= MAIN GALLERY ============= */
.gallery-main {
    padding: 30px 0;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(10, 31, 68, 0.9) 100%);
    min-height: 80vh;
    display: flex;
    justify-content: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    justify-items: stretch;
    justify-content: center;
}

@media (max-width: 1024px) {
    .gallery-grid {
        padding: 0 18px;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        padding: 0 15px;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        padding: 0 12px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        padding: 0 10px;
        gap: 8px;
    }
}

.gallery-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: galleryItemIn 0.6s ease forwards;
    opacity: 0;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(n+4) { animation-delay: calc(0.3s + (var(--delay, 0) * 0.1s)); }

@keyframes galleryItemIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gallery-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(26, 47, 84, 0.5);
    border: 1.5px solid rgba(212, 175, 55, 0.15);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.gallery-wrapper:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(26, 47, 84, 0.8);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.2);
    transform: translateY(-8px);
}

.gallery-wrapper a {
    flex: 1;
    overflow: hidden;
}

.gallery-card-container {
    position: relative;
    cursor: pointer;
    flex: 1;
}

.image-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.gallery-card {
    position: relative;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(10, 31, 68, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    transition: all 0.5s ease;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: brightness(0.9);
}

.gallery-item:hover .gallery-card img {
    transform: scale(1.12) rotate(1deg);
    filter: brightness(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 31, 68, 0.85) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(3px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: var(--gold);
    position: relative;
    z-index: 2;
    animation: overlayFadeIn 0.4s ease forwards;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--gold);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.overlay-content h3 {
    font-size: 1.15rem;
    margin: 0 0 8px 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}

.category-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--primary);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* ============= GALLERY INFO ============= */
.gallery-info {
    background: linear-gradient(180deg, rgba(10, 31, 68, 0.8) 0%, rgba(10, 31, 68, 0.9) 100%);
    border: none;
    border-top: 2px solid var(--gold);
    border-radius: 0 0 16px 16px;
    padding: 16px;
    margin-top: 0;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.gallery-item:hover .gallery-info {
    background: linear-gradient(180deg, rgba(10, 31, 68, 0.95) 0%, rgba(26, 47, 84, 0.95) 100%);
}

.info-title {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.info-date,
.info-event {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    margin: 3px 0;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
}

.info-date i,
.info-event i {
    color: var(--gold);
    margin-right: 6px;
    width: 14px;
    text-align: center;
    font-size: 0.7rem;
}

.info-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 6px 0 0 0;
    font-family: 'Inter', sans-serif;
}

/* ============= LIGHTBOX CUSTOMIZATION ============= */
.lb-data .lb-caption {
    font-family: 'Montserrat', sans-serif;
    color: var(--gold);
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
}

.lb-data .lb-close {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lb-data .lb-close:hover {
    opacity: 1;
}

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 1440px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .gallery-title {
        font-size: 2.8rem;
    }
    
    .icon-circle-gallery {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        min-height: 400px;
        padding: 40px 0 30px;
    }
    
    .gallery-title {
        font-size: 2.2rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .gallery-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-divider {
        height: 40px;
    }
    
    .filter-wrapper {
        padding: 15px 10px;
    }
    
    .filter-label {
        font-size: 0.9rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
        padding: 0 15px;
    }
    
    .gallery-item {
        max-width: 100%;
    }
    
    .gallery-card {
        aspect-ratio: 1/1;
        min-height: 200px;
    }
    
    .gallery-wrapper {
        min-height: auto;
    }
    
    .gallery-info {
        padding: 12px;
        min-height: auto;
        max-height: 200px;
    }
    
    .info-title {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .info-date,
    .info-event {
        font-size: 0.7rem;
        margin: 2px 0;
    }
    
    .info-description {
        font-size: 0.7rem;
        line-height: 1.3;
    }
    
    .gallery-overlay {
        opacity: 0;
    }
    
    .gallery-item:active .gallery-overlay {
        opacity: 1;
    }
    
    .gallery-main {
        padding: 20px 0;
    }
}

@media (max-width: 640px) {
    .gallery-hero {
        min-height: 350px;
        padding: 30px 0 25px;
    }
    
    .icon-circle-gallery {
        width: 70px;
        height: 70px;
    }
    
    .icon-circle-gallery i {
        font-size: 1.5rem !important;
    }
    
    .gallery-title {
        font-size: 1.8rem;
    }
    
    .gallery-subtitle {
        font-size: 0.95rem;
    }
    
    .gallery-stats {
        gap: 15px;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .gallery-filter-section {
        top: 100px;
    }
    
    .filter-wrapper {
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }
    
    .filter-label {
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .filter-btn {
        flex: 0 1 auto;
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .filter-text {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 15px;
        max-width: 100%;
    }
    
    .gallery-item {
        max-width: 100%;
    }
    
    .gallery-card {
        aspect-ratio: 1/1;
        min-height: 250px;
    }
    
    .gallery-wrapper {
        min-height: 500px;
    }
    
    .gallery-info {
        padding: 14px;
        min-height: 200px;
        overflow-y: auto;
    }
    
    .info-title {
        font-size: 0.85rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .info-date,
    .info-event {
        font-size: 0.7rem;
        margin: 4px 0;
    }
    
    .info-description {
        font-size: 0.7rem;
        line-height: 1.4;
        margin-top: 6px;
    }
    
    .gallery-main {
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        min-height: 300px;
        padding: 20px 0 15px;
    }
    
    .gallery-hero-bg::before,
    .gallery-hero-bg::after {
        width: 300px;
        height: 300px;
    }
    
    .icon-circle-gallery {
        width: 60px;
        height: 60px;
    }
    
    .icon-circle-gallery i {
        font-size: 1.2rem !important;
    }
    
    .gallery-title {
        font-size: 1.5rem;
    }
    
    .gallery-subtitle {
        font-size: 0.9rem;
        margin: 1rem 0 0 0;
    }
    
    .gallery-stats {
        gap: 12px;
        flex-direction: column;
    }
    
    .stat-item {
        min-width: auto;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .gallery-main {
        padding: 12px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 10px;
    }
    
    .gallery-card {
        aspect-ratio: 1/1;
        min-height: 200px;
    }
    
    .gallery-wrapper {
        min-height: 400px;
    }
    
    .filter-buttons .btn-outline-gold {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .gallery-info {
        padding: 12px;
        min-height: 150px;
    }
    
    .info-title {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .info-date,
    .info-event {
        font-size: 0.65rem;
        margin: 3px 0;
    }
    
    .info-description {
        font-size: 0.65rem;
        line-height: 1.3;
    }
}

@media (max-width: 375px) {
    .gallery-title {
        font-size: 1.3rem;
        letter-spacing: 0;
    }
    
    .gallery-subtitle {
        font-size: 0.85rem;
    }
    
    .gallery-stats {
        gap: 10px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .gallery-grid {
        gap: 10px;
        padding: 0 8px;
    }
    
    .filter-wrapper {
        gap: 8px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-card {
        min-height: 180px;
    }
    
    .gallery-wrapper {
        min-height: 380px;
    }
    
    .gallery-info {
        padding: 10px;
        min-height: 140px;
    }
    
    .info-title {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .info-date,
    .info-event {
        font-size: 0.6rem;
        margin: 2px 0;
    }
    
    .info-description {
        font-size: 0.6rem;
        line-height: 1.2;
    }
}

/* Section dividers */
.gallery-category:not(:last-child)::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 3rem auto 0;
}

/* Animation classes */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}