/* Initial state for animations */
.back-button,
.project-meta,
.project-description,
.project-detail,
.parent-container {
    opacity: 0;
}

#projectTitle {
    font-size: 4rem;
    text-transform: uppercase;
    line-height: 90%;
    opacity: 0;
    margin-bottom: 2rem;
}

p {
    font-size: 1rem;
    color: #576262;
    font-weight: 300;
}

span {
    font-size: 1rem;
    color: #1B1D1D;
    font-weight: 300;
}


#projectDescription {
    color: #1B1D1D;
    max-width: 60ch;
}

.text {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}


.project-content {
    display: flex;
    flex-direction: row;
    gap: 5rem;
    margin-bottom: 10rem;
}

.project-meta {
    grid-area: 2 / 1 / 2 / 2;
    display: flex;
    gap: 7rem;
    margin-top: 2rem;
}

.project-detail {
    display: flex;
    gap: 13rem;
}

.skills-list,
.collaborators-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.back-button {
    margin-bottom: 3rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    font-weight: 300;
    color: #1B1D1D;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #666;
}

.format-h .text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.format-h .project-description {
    margin: 2rem 0;
}

.format-h .project-video-container {
    margin-top: 10rem;
}

.format-v .text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.format-v .project-description {
    margin: 2rem 0;
}

.format-v .project-content {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.format-v .project-video-container {
    width: 50%;
    aspect-ratio: 9 / 16;
}

.format-v .custom-plyr-controls {
    width: 60%;
}

.format-v .parent-container {
    align-items: center;
    margin-left: 10rem;
}

.project-skills-section {
    width: 10rem;
}

.parent-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.project-video-container {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
}

.project-video-container video {
    width: 100%;
    height: 100%;
    position: relative;
    right: 0;
    object-fit: contain;
}


/* Remove controls from video container */
.project-video-container .plyr__controls {
    display: none !important;
}

/* Style controls in custom container */
.custom-plyr-controls .plyr__controls {
    position: relative !important;
    padding: 0 !important;
    background: none !important;
    color: #1B1D1D !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    text-align: left !important;
    margin-top: 1rem !important;
}

/* Custom Plyr controls styling */
.custom-plyr-controls {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
}

/* Override Plyr's default control positioning */
.plyr--video .plyr__controls {
    position: relative !important;
    padding: 0 !important;
    background: none !important;
    color: #1B1D1D !important;
}

/* Style the progress bar */
.plyr--full-ui input[type=range] {
    color: #1B1D1D !important;
}

/* Style the play button and other controls */
.plyr__control {
    color: #1B1D1D !important;
}

.plyr__control--overlaid {
    display: none !important;
}

.plyr__progress__buffer {
    display: none !important;
}

/* Remove default video hover controls */
.plyr--video:hover .plyr__controls {
    opacity: 1 !important;
}

.plyr__tooltip {
    display: none !important;
}

.plyr__progress {
    transform: translateY(-5px);
}

input[type='range'] {
    -webkit-appearance: none;
    appearance: none;
    outline: 0;
    border: 0;
    accent-color: #E65B39;
    background-color: #1B1D1D;
    height: 2px !important;
}

/* Video Navigation Styles */
.video-navigation {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.nav-btn span {
    color: #1B1D1D;
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-btn:disabled {
    opacity: 0.3;
    color: #ccc;
}



@media (max-width: 767px) {

    /* Ensure content is visible on mobile */
    .back-button,
    .project-meta,
    .project-description,
    .project-detail,
    .parent-container {
        opacity: 1 !important;
    }

    #projectTitle {
        opacity: 1 !important;
    }

    .project-detail-container {
        padding: 0 1rem;
    }

    /* Mobile layout - reorganize the project content using CSS Grid */
    .project-content,
    .format-v .project-content {
        display: grid;
        grid-template-areas:
            "header"
            "meta"
            "video"
            "description"
            "detail";
        gap: 2rem;
    }

    /* Assign grid areas to elements */
    .project-header,
    .format-v .project-header {
        grid-area: header;
    }

    .project-meta,
    .format-v .project-meta {
        grid-area: meta;
        flex-direction: row;
        gap: 3rem;
    }

    .parent-container,
    .format-v .parent-container {
        grid-area: video;
        width: 100%;
        align-items: center;
        margin: 0;
    }

    .project-description,
    .format-v .project-description {
        grid-area: description;
    }

    .project-detail,
    .format-v .project-detail {
        grid-area: detail;
        flex-direction: row;
        gap: 4rem;
    }

    /* Reset text container grid for mobile */
    .text,
    .format-v .text {
        display: contents;
    }

    /* Adjust video container for mobile */
    .project-video-container,
    .format-v .project-video-container {
        width: 100%;
        margin-top: 0;
    }

    /* Adjust custom controls for mobile */
    .custom-plyr-controls,
    .format-v .custom-plyr-controls {
        width: 100%;
        padding: 1rem 0;
    }

    /* Show video navigation on mobile */
    .video-navigation,
    .format-v .video-navigation {
        display: flex;
        margin-bottom: 1rem;
    }

    /* Adjust skills section width for mobile */
    .project-skills-section,
    .format-v .project-skills-section {
        width: 100%;
    }

    /* Make project title smaller on mobile */
    #projectTitle,
    .format-v #projectTitle {
        font-size: 2.5rem;
    }

    /* Adjust back button for mobile */
    .back-button,
    .format-v .back-button {
        margin-bottom: 2rem;
    }


}