/* ============================================
   PROJEKT SIDE - Styles for individual project pages
   ============================================ */

/* Breadcrumb - more padding at top */
section .breadcrumb {
    padding-top: 2rem;
    margin-bottom: 1.5rem;
}

/* Section title (H1) - left aligned and flush with left edge on project pages only */
section #projectTitle {
    text-align: left !important;
    margin-left: -24px !important;
    padding-left: 24px !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 1.75rem !important;
}

/* On mobile, adjust for smaller container padding */
@media (max-width: 799px) {
    section #projectTitle {
        margin-left: -0.75rem !important;
        padding-left: 0.75rem !important;
    }
}

@media (max-width: 599px) {
    section #projectTitle {
        margin-left: -0.5rem !important;
        padding-left: 0.5rem !important;
    }
}

.project-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* Cover Image */
.project-cover {
    width: 100%;
    height: 600px;
    max-height: 600px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Slideshow Section */
.project-slideshow-section {
    margin-top: 4rem;
    margin-bottom: 3rem;
}

.slideshow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.slideshow-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.project-slideshow {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.slideshow-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: #f5f5f5;
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-slide.active {
    opacity: 1;
    z-index: 1;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    border-radius: 50%;
}

.slideshow-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.slideshow-prev {
    left: 1rem;
}

.slideshow-next {
    right: 1rem;
}

.slideshow-expand {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.project-slideshow:hover .slideshow-expand {
    display: flex;
}

.slideshow-expand:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slideshow-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.slideshow-indicators::-webkit-scrollbar {
    height: 4px;
}

.slideshow-indicators::-webkit-scrollbar-track {
    background: transparent;
}

.slideshow-indicators::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.slideshow-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.slideshow-indicator.active {
    background-color: var(--accent);
}

.slideshow-indicator:hover {
    background-color: var(--accent);
    opacity: 0.7;
}

.project-info-wrapper {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.project-details {
    flex: 0 0 310px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-content: start;
}

.detail-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text);
    min-width: 125px;
}

.detail-value {
    color: var(--text);
}

.project-description {
    flex: 1;
    line-height: 1.75;
    font-size: 1.1rem;
    color: var(--text);
}

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

.project-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-block;
}

.back-link:hover {
    color: var(--text);
}

/* Mobile responsive */
@media (max-width: 799px) {
    .project-info-wrapper {
        flex-direction: column;
        gap: 2rem;
    }
    
    .project-details {
        flex: 1;
        width: 100%;
    }
    
    .project-description {
        font-size: 1rem;
        width: 100%;
    }
    
    .slideshow-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .slideshow-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .slideshow-prev {
        left: 0.5rem;
    }
    
    .slideshow-next {
        right: 0.5rem;
    }
}

/* Fullscreen overlay */
.project-slideshow-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}

.project-slideshow-fullscreen-overlay.active {
    display: flex;
}

.project-slideshow-fullscreen-container {
    position: relative;
    width: min(95vw, 95vh * 16 / 9);
    max-width: 95vw;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    gap: 1.5rem;
}

.project-slideshow-fullscreen-wrapper {
    position: relative;
    width: 100%;
    height: min(95vh, 95vw * 9 / 16);
    max-height: calc(95vh - 100px); /* Leave space for indicators */
}

.project-slideshow-fullscreen-wrapper .slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #f5f5f5;
    overflow: hidden;
}

.project-slideshow-fullscreen-wrapper .slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.project-slideshow-fullscreen-wrapper .slideshow-slide.active {
    opacity: 1;
}

.project-slideshow-fullscreen-wrapper .slideshow-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.project-slideshow-fullscreen-container .slideshow-indicators-fullscreen {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    z-index: 10002;
    flex-wrap: nowrap;
    justify-content: flex-start;
    box-sizing: border-box;
}

.project-slideshow-fullscreen-container .slideshow-indicators-fullscreen::-webkit-scrollbar {
    height: 6px;
}

.project-slideshow-fullscreen-container .slideshow-indicators-fullscreen::-webkit-scrollbar-track {
    background: transparent;
}

.project-slideshow-fullscreen-container .slideshow-indicators-fullscreen::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.project-slideshow-fullscreen-container .slideshow-indicator-thumbnail {
    width: 80px;
    height: 60px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    background-color: transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.project-slideshow-fullscreen-container .slideshow-indicator-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-slideshow-fullscreen-container .slideshow-indicator-thumbnail.active {
    border-color: var(--accent);
    transform: scale(1.1);
}

.project-slideshow-fullscreen-container .slideshow-indicator-thumbnail:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.project-slideshow-fullscreen-wrapper .slideshow-nav {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.project-slideshow-fullscreen-wrapper .slideshow-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.project-slideshow-fullscreen-wrapper .project-slideshow-minimize {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.project-slideshow-fullscreen-wrapper .project-slideshow-minimize:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 599px) {
    .project-cover {
        height: 350px;
        max-height: 350px;
        margin-bottom: 2rem;
    }
    
    .project-slideshow-section {
        margin-top: 3rem;
    }
    
    .slideshow-header h2 {
        font-size: 1.25rem;
    }
    
    .slideshow-expand {
        display: flex !important;
    }
}

@media (max-width: 399px) {
    .project-cover {
        height: 250px;
        max-height: 250px;
    }
}

