/* General styles for projects page */
.projects-section {
    padding-top: 35px;
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

/* Flexbox layout for slideshow and details */
.projects-content {
    display: flex;
    flex: 1;
    gap: 30px;
    align-items: stretch;
    overflow: hidden;
}

/* Slideshow styles */
.projects-slideshow {
    flex: 1;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    height: calc(100vh - 225px);
}

.slideshow-container {
    display: flex;
    overflow: hidden;
    border-radius: 10px;
    height: 100%;
    box-sizing: border-box;
}

.slideshow-container .slide {
    display: none;
}

.slideshow-container .slide.active {
    display: flex;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Navigation arrows */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Details styles */
.projects-details {
    flex: 1;
    max-width: 100%;
}

.projects-list {
    margin-bottom: 20px;
    padding: 0 15px;
    overflow: hidden;
}

.projects-list h3 {
    font-size: 2em;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.projects-list ul {
    list-style: none;
    padding: 0;
    font-size: 1.1em;
    margin-top: 0;
}

.projects-list li {
    margin-bottom: 10px;
    padding: 15px;
    background-color: var(--list-item-background, #444);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

/* Apply hover effects only on devices that support hover */
@media (hover: hover) {
    .projects-list li:hover {
        background-color: var(--color-hover);
        border-radius: 8px;
        transform: scale(1.02);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
}

.projects-list li b {
    font-size: 1.1em;
    color: var(--color-primary);
    font-weight: bold;
}

.projects-list li .project-details p {
    font-size: 1em;
    color: var(--color-text);
}

.projects-list li .project-details p strong {
    font-weight: bold;
}

/* Status labels with distinct colors */
.label-completed {
    background-color: var(--label-completed-bg, rgba(0, 128, 0, 0.2));
    color: var(--label-completed-text, #00ff00);
}

.label-in-progress {
    background-color: var(--label-in-progress-bg, rgba(255, 165, 0, 0.2));
    color: var(--label-in-progress-text, #ffcc00);
}

.label-upcoming {
    background-color: var(--label-upcoming-bg, rgba(0, 0, 255, 0.2));
    color: var(--label-upcoming-text, #3399ff);
}

.label-completed, .label-in-progress, .label-upcoming {
    font-size: 0.8em;
    padding: 2px 4px;
    border-radius: 3px;
    margin-right: 5px;
}

.date-badge {
    background-color: var(--date-badge-bg, rgba(0, 123, 255, 0.2));
    color: var(--date-badge-text, var(--color-primary));
    font-size: 0.8em;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-section {
        padding-top: 20px;
    }

    .projects-content {
        flex-direction: column;
        align-items: center;
        gap: 0px;
    }

    .projects-slideshow, .projects-details {
        max-width: 100%;
        height: auto;
        padding: 0px 0px 15px 0px;
    }

    .projects-list {
        padding: 0;
    }

    .prev, .next {
        font-size: 16px;
    }

    .section-title {
        font-size: 2em;
    }

    .slideshow-container .slide img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
}

/* Fullscreen slideshow styles */
.fullscreen-slideshow {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen-content .slide {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.fullscreen-content .slide.active {
    display: flex;
}

.fullscreen-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

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

.fullscreen-slideshow .prev,
.fullscreen-slideshow .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.fullscreen-slideshow .prev {
    left: 20px;
}

.fullscreen-slideshow .next {
    right: 20px;
    border-radius: 3px 0 0 3px;
}

.fullscreen-slideshow .prev:hover,
.fullscreen-slideshow .next:hover,
.close-fullscreen:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.project-details {
    display: none;
    padding: 10px;
    border-radius: 5px;
    transition: max-height 0.3s ease-out;
}

.projects-list li.expanded .project-details {
    display: block;
}

.thumbnail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.thumbnail:hover {
    transform: scale(1.1);
}

#total-km-counter {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--color-primary);
    padding: 40px 0px 30px 15px;
}

.youtube-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
    background-color: var(--list-item-background, #444);
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.youtube-link i {
    color: #FF0000;  /* YouTube's red color */
    margin-right: 8px;
    font-size: 1.2em;
}

.youtube-link:hover {
    background-color: var(--color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: var(--color-primary);
}