/* 
 * Projekt-Galerie Stile
 * CSS für die Anzeige von zusätzlichen Projekt-Bildern
 */

/* Hauptcontainer für die Projektgalerie in der Metabox */
.project-images-section {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.project-image-upload {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.project-image-upload:last-child {
    border-bottom: none;
}

.image-preview-wrapper {
    margin: 10px 0;
    min-height: 40px;
}

/* Galerie auf der Einzelansichtsseite */
.project-gallery {
    margin-top: 0; /* Kein Abstand nach oben */
}

/* Top-Galerie innerhalb der Card */
.project-gallery.top-gallery {
    margin: 0; /* Kein zusätzlicher Abstand in der Card */
}

.project-gallery.top-gallery .project-images {
    margin-top: 0; /* Kein Abstand nach oben */
    max-width: 100%; /* Volle Breite der Card nutzen */
}

.project-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    max-width: 100%; /* Volle Breite der Card nutzen */
    margin-left: auto;
    margin-right: auto;
}

.project-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px; /* Rundere Ecken */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    aspect-ratio: 4/3; /* Etwas breiteres Verhältnis für bessere Darstellung */
    max-width: 250px; /* Maximale Breite pro Bild */
}

.project-gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* Bild wird skaliert, um den Bereich zu füllen */
    object-position: center; /* Bild wird in der Mitte zentriert */
}
/* Auch für das featured Image und die Bilder in "Weitere Projekte" */
/* Hero-Bereich für Projektdetailseite - Card-Container */
.project-hero {
    padding: 100px 0 30px 0; /* Gleicher oberer Abstand wie Startseite */
    background-color: #f8f9fa; /* Hellgrauer Hintergrund für besseren Kontrast */
    position: relative;
    overflow: hidden;
}

.project-hero .container {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hauptcard für Header und Bilder */
.project-hero-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

/* Projekt Header Layout mit Logo und Text in Card */
.project-header-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px; /* Abstand zu den Bildern */
}

.project-featured-image {
    max-width: 200px;
    overflow: hidden;
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 0;
    align-self: flex-start;
    order: -1;
    /* Schatten entfernt - Logos dürfen nicht verändert werden */
}

.project-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 150px;
}

.project-header {
    flex: 1;
    min-width: 60%;
    text-align: center; /* Text mittig ausgerichtet */    margin-top: 0;
    margin-left: 0; /* Kein zusätzlicher Abstand - Flex Gap regelt das */
    align-self: flex-start;
}

.project-gallery-item a.lightbox {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.project-gallery-item a.lightbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-gallery-item a.lightbox::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-gallery-item a.lightbox:hover::before,
.project-gallery-item a.lightbox:hover::after {
    opacity: 1;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-container {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    font-size: 30px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

.lightbox-close::before {
    transform: rotate(45deg);
}

.lightbox-close::after {
    transform: rotate(-45deg);
}

/* Responsive Styles für die Projekt-Galerie */
.project-categories,
.project-title,
.project-excerpt {
    text-align: center; /* Alle Elemente im Header mittig */
    margin-bottom: 10px;
}

.project-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 3em; /* Gleiche Größe wie auf der Startseite */
    color: var(--primary-color); /* Gleiche Farbe wie auf der Startseite */
    font-weight: 700;
    line-height: 1.2;
    text-align: center; /* Mittig ausgerichtet */
}

.project-excerpt {
    font-size: 1.1rem;
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Projektinhalt und Meta-Informationen */
.project-content-wrapper {
    padding: 40px 0;
    background-color: #f8f9fa;
}

/* Neue Meta-Card zwischen Hero und Hauptinhalt */
.project-meta-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto 40px auto;
}

.project-content {
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
    font-size: 1.1rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.project-content h2,
.project-content h3,
.project-content h4 {
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 15px;
}

.project-content p {
    margin-bottom: 20px;
    color: #4a5568;
}

/* Meta-Informationen in eigener Card strukturieren */
.project-meta-card .project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 0;
}

.project-meta-card .meta-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    box-shadow: none; /* Kein zusätzlicher Schatten in der Card */
}

.meta-section h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-section .project-categories-list,
.meta-section .project-date,
.meta-section .project-status,
.meta-section .project-timeframe,
.meta-section .project-client,
.meta-section .project-website {
    color: #4a5568;
    font-weight: 500;
}

.project-status.active {
    color: #27ae60;
    font-weight: 600;
}

.project-status.completed {
    color: #3498db;
    font-weight: 600;
}

.project-status.planned {
    color: #f39c12;
    font-weight: 600;
}

.project-website a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-website a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Share-Buttons */
.project-share {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.share-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-link.facebook {
    background-color: #3b5998;
}

.share-link.twitter {
    background-color: #1da1f2;
}

.share-link.email {    background-color: #34495e;
}

/* Zurück zur Projekt Seite Link */
.back-to-projects {
    text-align: center;
    padding: 40px 0 0 0;
}

.back-to-projects-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    background: #ff5e00 !important; /* Orange */
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(255, 94, 0, 0.3);
    position: relative;
    overflow: hidden;
    border-color: #ff5e00 !important;
}

.back-to-projects-link::before {
    content: '←';
    position: static;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.back-to-projects-link:hover {
    background: #141e55 !important; /* Dunkelblau */
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(20, 30, 85, 0.4) !important;
    border-color: #141e55 !important;
}

.back-to-projects-link:hover::before {
    transform: translateX(-4px);
}

.back-to-projects-link:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
    background: #141e55 !important; /* Dunkelblau */
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(20, 30, 85, 0.4) !important;
    border-color: #141e55 !important;
}

/* Projekt-Navigation */
.project-navigation {
    padding: 40px 0;
    background-color: #2c3e50;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-links a {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    max-width: 45%;
}

.nav-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.nav-title {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-post-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Responsive Anpassungen */
@media (max-width: 1024px) {
    .project-images {
        max-width: 700px;
        gap: 18px;
    }
    
    .project-gallery-item {
        max-width: 220px;
    }
    
    .project-header {
        margin-left: 30px;
    }
    
    .project-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .project-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 600px;
    }
    
    .project-gallery-item {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .lightbox-container {
        max-width: 90%;
    }
    
    .lightbox-close {
        top: -30px;
        right: -10px;
    }    .project-header-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 20px; /* Weniger Abstand auf Mobile */
        margin-bottom: 30px;
    }
    
    .project-featured-image {
        margin: 0 auto 20px;
        max-width: 150px;
        order: 0; /* Normale Reihenfolge auf Mobile */
    }
    
    .project-header {
        margin-left: 0;
        text-align: center;
    }      .project-title {
        font-size: 2.5em; /* Konsistent mit anderen Templates */
    }
    
    .project-hero-card {
        padding: 25px;
        margin: 0 10px;
    }
    
    .project-meta-card {
        padding: 25px;
        margin: 0 10px 30px 10px;
    }
    
    .project-meta-card .project-meta {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
      .project-meta {
        grid-template-columns: 1fr;        gap: 15px;
    }
    
    .back-to-projects {
        padding: 30px 0 0 0;
    }
    
    .back-to-projects-link {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links a {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .project-images {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
        margin-top: 15px;
    }
    
    .project-gallery-item {
        max-width: 100%;
        border-radius: 12px;
    }      .project-title {
        font-size: 2.2em; /* Konsistent mit anderen Templates */
    }
    
    .project-hero-card {
        padding: 20px;
        margin: 0 5px;
    }
    
    .project-meta-card {
        padding: 20px;
        margin: 0 5px 25px 5px;
    }
      .project-meta-card .project-meta {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .back-to-projects {
        padding: 25px 0 0 0;
    }
    
    .back-to-projects-link {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .meta-section {
        padding: 15px;
    }
}