/**
 * Single Project Detail Page Styles
 */

/* Project Header */
.project-header {
    background: var(--dark-green, #558B2F);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.project-header .container {
    position: relative;
    z-index: 2;
}

.project-header .page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.project-header .page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
    max-width: 700px;
    margin: 1rem auto 0;
}

/* Project Content Area */
.project-content-area {
    padding: 3rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Project Layout Grid */
.project-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Gallery Container */
.project-gallery-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 1.5rem;
}

.project-gallery-container .main-image {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.project-gallery-container .main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-gallery-container .main-image:hover img {
    transform: scale(1.05);
}

.project-gallery-container .thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.project-gallery-container .thumbnail-grid a {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
}

.project-gallery-container .thumbnail-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.project-gallery-container .thumbnail-grid a:hover img {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Fact Sheet */
.project-fact-sheet {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.project-fact-sheet h3 {
    color: var(--dark-green, #558B2F);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color, #74b72a);
    padding-bottom: 0.5rem;
    font-weight: 700;
}

.project-fact-sheet h4 {
    color: var(--dark-green, #558B2F);
    font-size: 1.1rem;
    margin: 1.5rem 0 1rem;
    font-weight: 700;
}

.project-fact-sheet ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.project-fact-sheet li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.project-fact-sheet li:last-child {
    border-bottom: none;
}

.project-fact-sheet li strong {
    color: var(--dark-green, #558B2F);
    font-weight: 700;
    flex-shrink: 0;
}

/* Values alignment */
.project-fact-sheet li > *:last-child {
    text-align: right;
    flex: 1;
    max-width: 60%;
    word-wrap: break-word;
}

/* Project Status Badge */
.project-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status-badge.status-planung {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.project-status-badge.status-bau {
    background: #e8f5e8;
    color: var(--dark-green, #558B2F);
    border: 1px solid var(--primary-color, #74b72a);
}

.project-status-badge.status-fertiggestellt {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
}

.project-status-badge.status-betrieb {
    background: var(--light-gray, #f9f9f9);
    color: var(--dark-green, #558B2F);
    border: 1px solid #ddd;
}

/* Progress Bar */
.progress-bar-wrapper {
    background: var(--light-gray, #f9f9f9);
    border: 1px solid #ddd;
    border-radius: 25px;
    height: 30px;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color, #74b72a) 0%, var(--dark-green, #558B2F) 100%);
    height: 100%;
    border-radius: 25px;
    position: relative;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.progress-bar span {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* File List */
.portal-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-file-list li {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.portal-file-list li:hover {
    background: #e8f5e8;
    transform: translateY(-1px);
}

.portal-file-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #495057;
    transition: color 0.3s ease;
}

.portal-file-list a:hover {
    color: var(--dark-green, #558B2F);
}

.portal-file-list svg {
    width: 18px;
    height: 18px;
    color: #6c757d;
}

/* Project Description */
.project-description {
    background: var(--light-gray, #f9f9f9);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color, #74b72a);
    line-height: 1.8;
}

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

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

/* Map Section */
.project-map-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.project-map-section .section-title {
    color: var(--dark-green, #558B2F);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

.google-map-embed {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-map-embed iframe {
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .project-layout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-fact-sheet {
        position: static;
    }
    
    .project-header .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .project-content-area {
        padding: 2rem 1rem;
    }
    
    .project-header {
        padding: 3rem 0 2rem;
    }
    
    .project-header .page-title {
        font-size: 1.8rem;
    }
    
    .project-header .page-subtitle {
        font-size: 1rem;
    }
    
    .project-gallery-container,
    .project-fact-sheet,
    .project-map-section {
        padding: 1.5rem;
    }
    
    .project-gallery-container .main-image img {
        height: 250px;
    }
    
    .project-gallery-container .thumbnail-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }
    
    .google-map-embed iframe {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .project-header .page-title {
        font-size: 1.5rem;
    }
    
    .project-fact-sheet li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .project-gallery-container .main-image img {
        height: 200px;
    }
}

/* Animation enhancements */
.project-gallery-container,
.project-fact-sheet,
.project-map-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.project-fact-sheet {
    animation-delay: 0.2s;
}

.project-map-section {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fancybox integration */
.fancybox-content {
    border-radius: 8px;
}

/* Loading states */
.project-gallery-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.project-gallery-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color, #74b72a);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ACF Google Maps */
.acf-map {
    width: 100%;
    height: 450px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.acf-map img {
    max-width: inherit !important;
}

/* Google Maps Info Window */
.gm-style-iw {
    padding: 10px;
}

.gm-style-iw h4 {
    margin: 0 0 5px 0;
    color: #74b72a;
    font-size: 16px;
}

.gm-style-iw p {
    margin: 0;
    color: #666;
    font-size: 14px;
} 