/* Modern Gallery Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles */
.gallery-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header-content h1 i {
    color: #e74c3c;
    font-size: 4rem;
}

.header-content p {
    font-size: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Filter Section */
.filter-section {
    padding: 4rem 0;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 1rem 2rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    color: #6c757d;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.filter-btn.active {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border-color: #e74c3c;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.filter-btn i {
    font-size: 1.6rem;
}

/* Gallery Section */
.gallery-section {
    padding: 6rem 0;
    background: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.image-container {
    position: relative;
    overflow: hidden;
    height: clamp(180px, 28vw, 250px);
}

/* Card info under images */
.card-info{
    padding: 1.5rem 1.5rem 2rem;
    background: #ffffff;
}
.card-title{
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.card-desc{
    font-size: 1.4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}
.card-details{
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.card-details span{
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #e74c3c;
    font-weight: 600;
    font-size: 1.2rem;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
    opacity: 1 !important; /* force visible */
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.overlay-content p {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.project-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.project-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    opacity: 0.8;
}

.project-details i {
    color: #e74c3c;
}

.view-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 5% auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: lightboxSlideIn 0.3s ease;
}

@keyframes lightboxSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-lightbox:hover {
    background: rgba(231, 76, 60, 0.8);
    transform: scale(1.1);
}

.lightbox-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.lightbox-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-info {
    padding: 3rem;
    text-align: center;
}

.lightbox-info h3 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.lightbox-info p {
    font-size: 1.6rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.lightbox-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.lightbox-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    color: #e74c3c;
    font-weight: 600;
}

.lightbox-details i {
    font-size: 1.6rem;
}

/* Call to Action Section */
.gallery-cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1.5rem 3rem;
    border-radius: 10px;
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.cta-btn.primary {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 3.5rem;
    }
    
    .header-content p {
        font-size: 1.6rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .image-container {
        height: 200px;
    }
    
    .overlay-content h3 {
        font-size: 1.8rem;
    }
    
    .overlay-content p {
        font-size: 1.2rem;
    }
    
    .project-details {
        gap: 1rem;
    }
    
    .lightbox-content {
        max-width: 95%;
        margin: 10% auto;
    }
    
    .lightbox-image {
        height: 300px;
    }
    
    .lightbox-info {
        padding: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2.8rem;
    }
    
    .cta-content p {
        font-size: 1.6rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .gallery-header {
        padding: 4rem 0;
    }
    
    .header-content h1 {
        font-size: 2.8rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 1.1rem;
    }
    
    .image-container {
        height: 180px;
    }
    
    .overlay-content {
        padding: 1.5rem;
    }
    
    .overlay-content h3 {
        font-size: 1.6rem;
    }
    
    .project-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lightbox-image {
        height: 250px;
    }
    
    .lightbox-info {
        padding: 1.5rem;
    }
    
    .lightbox-info h3 {
        font-size: 2rem;
    }
    
    .lightbox-info p {
        font-size: 1.4rem;
    }
}
