/* Gallery Page Styles */

.gallery-hero {
    position: relative;
    height: 50vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: var(--primary-white);
    z-index: 20;
}

.gallery-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.gallery-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.gallery-hero-content {
    width: 100%;
    text-align: center;
}

.gallery-hero-title {
    font-size: 4rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.gallery-hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Section */
.gallery {
    padding: var(--section-padding);
    background: var(--primary-white);
}

.gallery-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary-gray);
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.gallery-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.gallery-image-container:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.6s ease;
}

.gallery-image-container:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    left: 5%;
    bottom: 5%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 13px;
    border-radius: 0;
    max-width: 80%;
}

.gallery-overlay h3 {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-white);
    margin: 0;
    line-height: 1.0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gallery All Projects Button */
.gallery-all-projects {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    background: var(--primary-red);
    transition: var(--transition-fast);
}

.gallery-all-projects:hover {
    transform: scale(1.03);
    background: var(--primary-red);
}

.gallery-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: var(--primary-white);
}

.gallery-all-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.gallery-all-content h3 {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.gallery-all-icon {
    opacity: 0.8;
    transition: transform var(--transition-fast);
}

.gallery-all-projects:hover .gallery-all-icon {
    transform: translateX(5px);
}

/* Gallery Grid Section (Full Page) */
.gallery-grid-section {
    padding: 100px 5px;
    background: var(--primary-white);
}

.gallery-grid-section .gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-width: none;
    margin: 0;
}

.gallery-grid-section .gallery-item {
    position: relative;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.gallery-grid-section .gallery-item:hover {
    transform: scale(1.03);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--primary-white);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition-fast);
}

.gallery-item:hover .gallery-hover {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.gallery-hover h3 {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 5px;
    color: var(--primary-white);
}

.gallery-hover .project-year {
    font-size: 0.9rem;
    color: var(--primary-red);
    font-weight: 400;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-hover p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.gallery-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-red);
    font-weight: var(--font-weight-semibold);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 0;
    align-self: flex-start;
    backdrop-filter: blur(10px);
}

/* Project Detail Grid Overrides */
.project-detail-grid {
    gap: 5px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid,
    .gallery-grid-section .gallery-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .gallery-item {
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
    }
    
    .gallery-all-projects {
        height: 125px;
        width: 100% !important;
    }
    
    .gallery-hero-title {
        font-size: 2.4rem; /* 40% reduction from 4rem */
    }
    
    .gallery-hero-subtitle {
        font-size: 1rem;
    }
    
    .gallery-grid-section {
        padding-top: 40px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .gallery-grid-section .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}