:root {
    --primary-yellow: #F4B942;
    --dark-bg: #111111;
}

.detail-section {
    padding: 4rem 2rem;
    background: #f8f9fa;
    min-height: 60vh;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    color: var(--primary-yellow);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.75;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.detail-info h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1rem;
    margin-top: 1rem;
    line-height: 1.3;
}

.detail-info .project-type {
    display: inline-block;
    background: var(--primary-yellow);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.detail-description p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: justify;
}

.detail-layout.detail-layout-current-project {
    grid-template-columns: 1.35fr 1.65fr;
}

.detail-info h2.current-project-heading {
    font-size: 1.45rem;
    white-space: nowrap;
}

.detail-gallery h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-yellow);
}

.gallery-month {
    margin-bottom: 2.5rem;
}

.gallery-header {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .detail-layout.detail-layout-current-project {
        grid-template-columns: 1fr;
    }

    .detail-info h2.current-project-heading {
        white-space: normal;
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Lightbox */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease-in-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#modalImage {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: zoomIn 0.3s ease-in-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary-yellow);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.modal-nav:hover {
    background: rgba(244, 185, 66, 0.85);
    transform: translateY(-50%) scale(1.05);
}

.modal-nav-prev {
    left: 28px;
}

.modal-nav-next {
    right: 28px;
}

@media (max-width: 768px) {
    .modal-nav {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
    }

    .modal-nav-prev {
        left: 12px;
    }

    .modal-nav-next {
        right: 12px;
    }
}
