/* IRED Photo Gallery Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b1b 50%, #1a1a1a 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

.gallery-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.gallery-header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #dc2626;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
}

.logo-link:hover {
    color: #dc2626;
}

.logo-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #e5e5e5;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(220, 38, 38, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: #dc2626;
}

.donate-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

.donate-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
}

/* Main Content */
.gallery-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Gallery Hero Section */
.gallery-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.gallery-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-hero p {
    font-size: 1.25rem;
    color: #d1d5db;
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.gallery-breadcrumb {
    margin-bottom: 2rem;
}

.gallery-breadcrumb a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.gallery-breadcrumb a:hover {
    color: #b91c1c;
}

/* Gallery Info */
.gallery-info {
    margin-bottom: 3rem;
    text-align: center;
}

.gallery-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.gallery-description {
    font-size: 1.125rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    color: #9ca3af;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Galleries Grid */
.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(220, 38, 38, 0.3);
}

.gallery-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.gallery-card:hover .gallery-cover img {
    transform: scale(1.05);
}

.gallery-cover.placeholder {
    background: linear-gradient(135deg, #374151, #1f2937);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.gallery-card-content {
    padding: 1.5rem;
}

.gallery-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.gallery-card p {
    color: #d1d5db;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.gallery-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(220, 38, 38, 0.3);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #ffffff;
    padding: 2rem 1rem 1rem;
    font-size: 0.875rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-caption {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(220, 38, 38, 0.8);
    transform: scale(1.1);
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
    font-size: 1.5rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    max-width: 80%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.lightbox-counter {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

/* Footer styles removed - using main footer styles from construction.css */

/* Ensure proper spacing before footer on gallery page */
.gallery-grid {
    margin-bottom: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .gallery-main {
        padding: 1rem;
    }

    .gallery-hero h1 {
        font-size: 2rem;
    }

    .gallery-info h1 {
        font-size: 2rem;
    }

    .gallery-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .galleries-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem;
        font-size: 1.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem;
    }

    .lightbox-caption {
        bottom: 1rem;
        max-width: 90%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-item {
        height: 250px;
    }
    
    .photo-item img {
        height: 100%;
    }
}

/* Loading States */
.photo-item img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item img[loading="lazy"].loaded {
    opacity: 1;
}

/* Smooth Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-card,
.photo-item {
    animation: fadeIn 0.6s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.7);
}