/* Don't override body background - commented out the problematic line */
/* .project-page { background: transparent; } */

.project-header {
    max-width: 1200px;
    margin: 3rem auto 2rem;
    padding: 3rem 2rem 2rem;
    background: #ffffff;
    border-radius: 0;
    box-shadow:
        8px 8px 0 rgba(0, 0, 0, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.15);
    border: 6px solid #1a1a1a;
    position: relative;
    z-index: 1;
}

.back-button {
    display: inline-block;
    color: #004e89;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-button:hover {
    transform: translateX(-5px);
    color: #ff6b35;
}

.project-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.project-description {
    font-size: 1.3rem;
    color: #4a4a4a;
    line-height: 1.7;
    max-width: 800px;
}

/* Project description wrapper for collapsible functionality */
.project-description-wrapper {
    font-size: 1.3rem;
    color: #4a4a4a;
    line-height: 1.7;
    max-width: 800px;
}

.project-description-wrapper p {
    margin-bottom: 1rem;
}

.project-description-wrapper p:last-child {
    margin-bottom: 0;
}

/* Desktop: show all, hide button */
.project-description-preview {
    display: block; /* Changed from inline to block */
    margin-bottom: 1rem; /* Added consistent spacing */
}

.project-description-full {
    display: block; /* Changed from inline to block */
}

.read-more-btn-project {
    display: none;
}

.project-gallery {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.gallery-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.gallery-grid a {
    display: block;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 0;
    box-shadow:
        6px 6px 0 rgba(0, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border: 6px solid #1a1a1a;
}

.gallery-grid a:hover {
    transform: translateY(-4px) translateX(-2px);
    box-shadow:
        8px 8px 0 rgba(0, 0, 0, 0.1),
        0 8px 30px rgba(0, 0, 0, 0.15);
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-grid a:hover img {
    transform: scale(1.05);
}

/* Video item styling */
.video-item {
    display: block;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 0;
    box-shadow:
        6px 6px 0 rgba(0, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.1);
    background: white;
    border: 6px solid #1a1a1a;
    cursor: default;
}

.video-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* Project Footer */
.project-footer {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-block;
    color: #004e89;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 2rem;
    background: #ffffff;
    border: 4px solid #1a1a1a;
    box-shadow:
        6px 6px 0 rgba(0, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.1);
}

.back-link:hover {
    transform: translateY(-2px) translateX(-2px);
    color: #ff6b35;
    box-shadow:
        8px 8px 0 rgba(0, 0, 0, 0.1),
        0 6px 25px rgba(0, 0, 0, 0.15);
}

body.dark-mode .project-header {
    background: #2a2a2a;
    border-color: #f4e8d0;
}

body.dark-mode .project-header h1 {
    color: #ffffff;
}

body.dark-mode .project-description {
    color: #cccccc;
}

/* Dark mode for wrapper text */
body.dark-mode .project-description-wrapper {
    color: #cccccc;
}

body.dark-mode .back-button,
body.dark-mode .back-link {
    color: #f4e8d0;
}

body.dark-mode .back-button:hover,
body.dark-mode .back-link:hover {
    color: #ff6b35;
}

body.dark-mode .back-link {
    background: #2a2a2a;
    border-color: #f4e8d0;
}

body.dark-mode .gallery-grid a {
    border-color: #f4e8d0;
}

body.dark-mode .video-item {
    border-color: #f4e8d0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .project-header h1 {
        font-size: 2rem;
    }

    .project-description {
        font-size: 1.1rem;
    }

    /* Collapsible description on mobile */
    .project-description-wrapper {
        font-size: 1.1rem;
    }

    .project-description-full {
        display: none;
    }

    .project-description-full.expanded {
        display: block; /* Changed from inline to block */
    }

    .read-more-btn-project {
        display: block; /* Changed from inline-block to block */
        margin: 1rem auto 0; /* Centered with auto margins, added top spacing */
        padding: 0.6rem 1.5rem;
        background: #ff6b35;
        color: white;
        border: 3px solid #000000;
        font-family: 'Bricolage Grotesque', sans-serif;
        font-weight: 700;
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        cursor: pointer;
        box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        border-radius: 0;
        width: fit-content; /* Only as wide as the text */
    }

    .read-more-btn-project:active {
        transform: translateY(-2px) translateX(-2px);
        box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
    }

    body.dark-mode .read-more-btn-project {
        background: #cc5528;
        border-color: #f4e8d0;
    }

    /* Keep existing gallery styles */
    .gallery-grid {
        column-count: 2;
        column-gap: 1rem;
    }

    .gallery-grid a {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

