/* ===================================
   GALLERY PAGE STYLES - ORGANIZED BY CATEGORIES
   =================================== */

/* Gallery Hero Section */
.gallery-hero {
    margin-top: 80px;
    min-height: 70vh;
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0f4c81 0%, #2196F3 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0.5;
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 4rem 2rem;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
}

.hero-scroll-indicator:hover {
    transform: translateX(-50%) translateY(5px);
}

.hero-scroll-indicator span {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===================================
   CATEGORY SECTIONS
   =================================== */

.category-section {
    padding: 5rem 2rem;
    position: relative;
}

.category-section:nth-child(even) {
    background: #f8fafc;
}

.category-section:nth-child(odd) {
    background: white;
}

.category-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.category-title {
    color: #0f4c81;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 2px;
}

.category-description {
    color: #64748b;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 1.5rem auto 0;
    line-height: 1.7;
}

/* ===================================
   GALLERY GRID
   =================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(15, 76, 129, 0.2);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 76, 129, 0.95) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    color: white;
    margin-bottom: 1rem;
}

.gallery-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.gallery-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.gallery-tag {
    display: inline-block;
    background: rgba(251, 191, 36, 0.9);
    color: #0f4c81;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #0f4c81;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover {
    background: #fbbf24;
    transform: translateX(5px);
}

.btn-icon {
    transition: transform 0.3s;
}

.view-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* ===================================
   LIGHTBOX MODAL
   =================================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lightbox-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 90vh;
}

.lightbox-info h2 {
    color: #0f4c81;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.lightbox-info p {
    color: #475569;
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.lightbox-category {
    display: inline-block;
    background: linear-gradient(135deg, #0f4c81, #2196F3);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #0f4c81;
}

.lightbox-close:hover {
    background: #fbbf24;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #0f4c81;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: #fbbf24;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    color: #0f4c81;
}

/* ===================================
   GALLERY STATS SECTION
   =================================== */

.gallery-stats-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #0f4c81 0%, #2196F3 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    border-color: #fbbf24;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ===================================
   DARK MODE STYLES
   =================================== */

:root.dark .category-section:nth-child(even) {
    background: #0f172a;
}

:root.dark .category-section:nth-child(odd) {
    background: #1e293b;
}

:root.dark .category-title {
    color: #60a5fa;
}

:root.dark .category-description {
    color: #cbd5e1;
}

:root.dark .gallery-item {
    background: #0f172a;
}

:root.dark .lightbox-info {
    background: #1e293b;
}

:root.dark .lightbox-info h2 {
    color: #60a5fa;
}

:root.dark .lightbox-info p {
    color: #cbd5e1;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .gallery-title {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .category-title {
        font-size: 2rem;
    }

    .lightbox-content {
        grid-template-columns: 1fr;
        max-height: 85vh;
    }

    .lightbox-info {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        margin-top: 70px;
        min-height: 50vh;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 1.1rem;
    }

    .category-section {
        padding: 3rem 1.5rem;
    }

    .category-icon {
        font-size: 3rem;
    }

    .category-title {
        font-size: 1.75rem;
    }

    .category-description {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-image {
        height: 250px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .lightbox-content {
        width: 95%;
        max-height: 80vh;
    }

    .lightbox-info {
        padding: 1.5rem;
    }

    .lightbox-info h2 {
        font-size: 1.5rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 1.75rem;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }

    .category-header {
        margin-bottom: 2rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .gallery-image {
        height: 220px;
    }

    .gallery-info h3 {
        font-size: 1.25rem;
    }

    .gallery-info p {
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 2rem 1.5rem;
    }

    .lightbox-info h2 {
        font-size: 1.35rem;
    }

    .lightbox-info p {
        font-size: 0.95rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        top: 1rem;
        right: 1rem;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:nth-child(1) { transition-delay: 0.1s; }
.gallery-item:nth-child(2) { transition-delay: 0.2s; }
.gallery-item:nth-child(3) { transition-delay: 0.3s; }
.gallery-item:nth-child(4) { transition-delay: 0.4s; }
.gallery-item:nth-child(5) { transition-delay: 0.5s; }
.gallery-item:nth-child(6) { transition-delay: 0.6s; }

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .gallery-hero,
    .hero-scroll-indicator,
    .view-btn,
    .lightbox-overlay,
    .gallery-stats-section {
        display: none;
    }

    .category-section {
        page-break-inside: avoid;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-item {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .gallery-overlay {
        opacity: 1;
        position: static;
        background: white;
        color: #000;
    }

    .gallery-info h3,
    .gallery-info p {
        color: #000;
    }
}