* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
} */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: #222;
}

h2.category-header {
    font-size: 2rem;
    color: #222;
    margin-bottom: 20px;
    text-align: center;
}

/* Category Section */
.category-section {
    margin-bottom: 40px;
}

/* Gallery grid with 3 columns */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3-column grid */
    gap: 30px;
    margin-bottom: 20px;
}

.project-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.project-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.project-info {
    padding: 20px;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #222;
}

.project-excerpt {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.view-project-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #001f53;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.view-project-btn:hover {
    background-color: #2980b9;
}

/* Project detail page */
#projectDetailPage {
    display: none; /* Hidden by default */
    min-height: 100vh;
    background-color: #fff;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 30px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #e0e0e0;
}

.project-detail-header {
    margin-bottom: 30px;
}

.project-detail-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #222;
}

.project-detail-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tag {
    background-color: #e1f5fe;
    color: #0288d1;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-detail-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.project-detail-images img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.project-detail-images img:hover {
    transform: scale(1.03);
}

.project-detail-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.project-detail-description p {
    margin-bottom: 20px;
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    transition: 0.3s;
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 95%;
    object-fit: contain;
    background-color: transparent;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover{
    color: rgba(136, 137, 142, 0.86);;
    text-decoration: none;
    cursor: pointer;
}

.modal-navigation {
    position: absolute;
    width: 100%;
    top: 50%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

.nav-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
/* Mobile Styles */
@media (max-width: 768px) {
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background-color: rgba(0, 0, 0, 0.9);
        transition: 0.3s;
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        margin: 0;
        display: block;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: contain;
        background-color: transparent;
    }

    .modal-navigation {
        position: absolute;
        width: 100%;
        top: 90%; /* Moved lower to give more room for the image */
        display: flex;
        justify-content: space-between;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    .nav-button {
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 18px;
        cursor: pointer;
        transition: 0.3s;
    }
    .container {
        width: 92%;
        padding: 15px 0;
    }
    
    h1 {
        font-size: 1.7rem;
        margin-bottom: 20px;
    }
    
    h2.category-header {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 16px;
    }
    
    .project-card {
        display: flex;
        flex-direction: row;
        max-height: 160px;
    }
    
    .project-thumbnail {
        width: 50%;
        height: 160px;
    }
    
    .project-info {
        width: 50%;
        padding: 8px;
        display: flex;
        flex-direction: column;
    }
    
    .project-title {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .project-excerpt {
        font-size: 0.85rem;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }
    
    .view-project-btn {
        margin-top: auto;
        padding: 8px 0;
        font-size: 0.85rem;
    }
    
    .project-detail-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .project-detail-title {
        font-size: 1.5rem;
    }
    
    .back-button {
        padding: 10px 16px;
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .project-detail-description {
        font-size: 1rem;
        line-height: 1.7;
    }

}
