/* --- Gallery Page Specific Styles --- */

/* Hero Section - Gallery Specific */
.gallery-hero {
    height: 40vh; /* Slightly shorter hero for gallery */
    position: relative;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.gallery-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(50%); /* Darken for text readability */
    z-index: 1;
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 2;
}

.gallery-hero .hero-content h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: rgb(249, 244, 244);
}

.gallery-hero .hero-content p {
    font-size: 1.2em;
}

/* Filter Buttons */
.gallery-filters {
    padding: 40px 0;
    text-align: center;
}

.gallery-filters h2 {
    font-size: 2em;
    margin-bottom: 30px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background-color: var(--light-bg);
    color: var(--text-color);
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Project Grid - Beautiful Layout */
.project-grid-section {
    padding: 40px 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px; /* Slightly smaller gap for tighter feel */
}

.project-card {
    position: relative; /* Needed for overlay positioning */
    overflow: hidden;
    border-radius: 10px; /* Softer corners */
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); /* More pronounced shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background-color: #fff; /* Default background */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.project-card img {
    width: 100%;
    height: 280px; /* Consistent height for images */
    object-fit: cover; /* Ensures images cover the area without distortion */
    display: block;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%); /* Gradient overlay */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align info to bottom */
    padding: 20px;
    box-sizing: border-box; /* Include padding in width/height */
}

.project-card:hover .project-overlay {
    opacity: 1; /* Show overlay on hover */
}

.project-info {
    text-align: center;
    color: white;
    width: 100%;
}

.project-info h3 {
    font-size: 1.5em;
    margin-bottom: 8px;
    color: rgb(246, 242, 242); /* Ensure text is white */
    font-weight: 700;
}

.project-info p {
    font-size: 0.95em;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8); /* Slightly transparent text */
}

.project-info .btn {
    background-color: transparent;
    color: white;
    border-color: white;
    padding: 8px 18px; /* Smaller buttons */
    font-size: 0.9em;
}

.project-info .btn:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Load More Button Section */
.load-more-section {
    text-align: center;
    padding: 30px 0;
}

#load-more-btn {
    padding: 12px 25px;
    font-size: 1.1em;
}

/* --- Responsive Adjustments for Gallery --- */
@media (max-width: 767.98px) {
    .gallery-hero {
        height: 30vh;
    }
    .gallery-hero .hero-content h1 {
        font-size: 2em;
    }
    .gallery-filters h2 {
        font-size: 1.7em;
    }
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    .project-grid {
        grid-template-columns: 1fr; /* Stack project cards on small screens */
    }
    .project-card img {
        height: 220px; /* Slightly smaller image height on mobile */
    }
    .project-info h3 {
        font-size: 1.3em;
    }
    .project-info p {
        font-size: 0.9em;
    }
}