/* ================================================
   PROJEKTÜBERSICHT TEMPLATE CSS
   Template: template-projects.php
   
   Spezifisches CSS für die Projektübersicht-Seite
   mit Filter-Buttons und Projekt-Grid
   ================================================ */

/* CSS-Variablen für Konsistenz mit der Hauptseite */
:root {
    --logo-blue: #4F60A5;
    --primary-color: #3498db;
    --text-color: #333333;
}

/* ================================================
   GRADIENT-STRICH UND HERO BEREICH
   ================================================ */

/* Gradient-Strich oben (wie auf der Hauptseite) */
.projects-template-gradient {
    height: 20px;
    background: linear-gradient(135deg, var(--logo-blue, #4F60A5) 0%, rgba(255, 255, 255, 1) 100%);
    position: relative;
    width: 100%;
    z-index: 1;
    overflow: hidden;
}

/* Hero-Bereich - exakt wie auf der Startseite */
.projects-template-hero {
    padding: 100px 0; /* Gleicher Abstand wie auf der Startseite */
    background-color: #f5f9ff; /* Gleiche Farbe wie home-hero */
    position: relative;
    overflow: hidden;
    margin-top: 0; /* Nahtloser Übergang vom Gradient */
}

.projects-template-hero .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.projects-template-hero h1 {
    text-align: center;
    font-size: 3em; /* Exakt wie auf der Startseite */
    margin-bottom: 20px; /* Exakt wie auf der Startseite */
    color: var(--primary-color); /* Exakt wie auf der Startseite */
}

.projects-template-description {
    font-size: 1.2em;
    line-height: 1.6;
    color: var(--text-color, #333333);
    max-width: 800px;
    margin: 0 auto;
}

.projects-template-description p {
    margin-bottom: 15px;
}

/* ================================================
   FILTER BEREICH
   ================================================ */

.projects-template-filters {
    padding: 40px 0;
    background: white;
    border-bottom: 2px solid #f8f9fa;
}

.projects-template-filters .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.projects-template-filters-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.projects-template-filter-label {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color, #1a365d);
    margin-right: 10px;
    white-space: nowrap;
}

.projects-template-filter-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.projects-template-filter-option {
    display: inline-block;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.projects-template-filter-option:hover {
    background: #e9ecef;
    color: var(--primary-color, #1a365d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.projects-template-filter-option.active {
    background: var(--primary-color, #1a365d);
    color: white;
    border-color: var(--primary-color, #1a365d);
    box-shadow: 0 5px 20px rgba(26, 54, 93, 0.3);
}

.projects-template-filter-option.active:hover {
    background: var(--secondary-color, #2c5282);
    border-color: var(--secondary-color, #2c5282);
    transform: translateY(-2px);
}

/* ================================================
   PROJEKT LISTE / GRID
   ================================================ */

.projects-template-list {
    padding: 80px 0;
    background: #ffffff; /* Gradienten entfernt, einfache weiße Hintergrundfarbe */
    color: #333333; /* Textfarbe angepasst für bessere Lesbarkeit auf weißem Hintergrund */
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.projects-template-list .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.projects-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    justify-content: center;
}

/* Begrenzung der maximalen Breite für einzelne Items */
.projects-template-item {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Angepasster Schatten für bessere Sichtbarkeit auf weißem Hintergrund */
    border: 1px solid #e0e0e0; /* Hellgrauer Rahmen für bessere Sichtbarkeit */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 500px; /* Maximale Breite für einzelne Items */
    width: 100%;
}

/* ================================================
   EINZELNE PROJEKT-KARTEN STYLING
   ================================================ */

.projects-template-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); /* Dunklerer Schatten beim Hover für besseren Kontrast */
    border-color: #ccc; /* Dunklerer Rahmen beim Hover */
}

/* Projekt-Bild */
.projects-template-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.projects-template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.projects-template-item:hover .projects-template-image img {
    transform: scale(1.05);
}

/* Kategorie-Badge über dem Bild */
.projects-template-categories {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(26, 54, 93, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    z-index: 2;
}

/* Content-Bereich */
.projects-template-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.projects-template-content h3 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color, #1a365d);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.projects-template-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.projects-template-content h3 a:hover {
    color: var(--secondary-color, #2c5282);
}

.projects-template-excerpt {
    font-size: 1em;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.projects-template-read-more {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--primary-color, #1a365d);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.projects-template-read-more::after {
    content: '\2192'; /* Unicode-Pfeil nach rechts */
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-block; /* Stellt sicher, dass die Transformation funktioniert */
}

.projects-template-read-more:hover {
    background: var(--secondary-color, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.3);
}

.projects-template-read-more:hover::after {
    transform: translateX(4px);
}

/* ================================================
   KEINE PROJEKTE MELDUNG
   ================================================ */

.projects-template-no-projects {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.projects-template-no-projects p {
    font-size: 1.1em;
    margin: 0;
}

.no-projects-message {
    padding: 80px 0;
    background: #f8f9fa;
    text-align: center;
}

.no-content-notice {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.no-content-notice h2 {
    font-size: 2em;
    color: var(--primary-color, #1a365d);
    margin-bottom: 20px;
}

.no-content-notice p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #6c757d;
    margin-bottom: 20px;
}

.language-switch-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color, #1a365d);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.language-switch-link:hover {
    background: var(--secondary-color, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.3);
}

/* ================================================
   PAGINATION
   ================================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    color: var(--primary-color, #1a365d);
    text-decoration: none;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary-color, #1a365d);
    color: white;
    border-color: var(--primary-color, #1a365d);
    transform: translateY(-2px);
}

.pagination .current {
    background: var(--primary-color, #1a365d);
    color: white;
    border-color: var(--primary-color, #1a365d);
}

.pagination .prev,
.pagination .next {
    padding: 0 20px;
    font-weight: 600;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablet (bis 1024px) */
@media (max-width: 1024px) {
    .projects-template-hero {
        padding: 80px 0; /* Etwas weniger Abstand auf Tablets */
    }
    
    .projects-template-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
        justify-content: center;
    }
    
    .projects-template-item {
        max-width: 450px; /* Etwas kleiner auf Tablets */
    }
      .projects-template-hero h1 {
        font-size: 2.5em; /* Konsistent mit anderen Templates */
    }
    
    .projects-template-filters-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .projects-template-filter-options {
        justify-content: center;
    }
}

/* Mobile (bis 768px) */
@media (max-width: 768px) {
    .projects-template-gradient {
        height: 15px;
    }
    
    .projects-template-hero {
        padding: 60px 0; /* Weniger Abstand auf Mobile */
    }
    
    .projects-template-hero h1 {
        font-size: 2.2em; /* Konsistent mit anderen Templates */
        margin-bottom: 15px;
    }
    
    .projects-template-description {
        font-size: 1em;
    }
    
    .projects-template-filters {
        padding: 30px 0;
    }
    
    .projects-template-filters-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .projects-template-filter-label {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .projects-template-filter-options {
        justify-content: center;
        gap: 8px;
    }
    
    .projects-template-filter-option {
        padding: 10px 20px;
        font-size: 0.9em;
    }
      .projects-template-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-content: center;
    }
    
    .projects-template-item {
        max-width: 100%; /* Auf Mobile wieder volle Breite erlauben */
    }
    
    .projects-template-list {
        padding: 60px 0;
    }
    
    .projects-template-image {
        height: 200px;
    }
    
    .projects-template-content {
        padding: 20px;
    }
    
    .projects-template-content h3 {
        font-size: 1.2em;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a,
    .pagination span {
        min-width: 40px;
        height: 40px;
        font-size: 0.9em;
    }
}

/* Kleine Mobile Geräte (bis 480px) */
@media (max-width: 480px) {
    .projects-template-gradient {
        height: 12px;
    }
    
    .projects-template-hero {
        padding: 40px 0; /* Noch weniger Abstand auf kleinen Mobiles */
    }
    
    .projects-template-hero .container,
    .projects-template-filters .container,
    .projects-template-list .container {
        padding: 0 15px;
    }
    
    .projects-template-hero h1 {
        font-size: 1.8em;
    }
    
    .projects-template-filters {
        padding: 20px 0;
    }
    
    .projects-template-filter-options {
        gap: 6px;
    }
    
    .projects-template-filter-option {
        padding: 8px 16px;
        font-size: 0.85em;
    }
      .projects-template-grid {
        gap: 15px;
        justify-content: center;
    }
    
    .projects-template-item {
        max-width: 100%; /* Auf kleinen Mobiles volle Breite */
    }
    
    .projects-template-list {
        padding: 40px 0;
    }
    
    .projects-template-content {
        padding: 15px;
    }
    
    .projects-template-content h3 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .projects-template-excerpt {
        font-size: 0.95em;
        margin-bottom: 15px;
    }
    
    .projects-template-read-more {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .no-content-notice {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .no-content-notice h2 {
        font-size: 1.6em;
    }
}

/* ================================================
   FILTER ANIMATION UND ÜBERGANGSEFFEKTE
   ================================================ */

.projects-template-item {
    animation: fadeInUp 0.6s ease-out;
}

.projects-template-item[style*="display: none"] {
    display: none !important;
}

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

/* Smooth transition für Filter-Wechsel */
.projects-template-grid {
    transition: all 0.3s ease;
}

/* ================================================
   BARRIEREFREIHEIT UND ACCESSIBILITY
   ================================================ */

/* Focus-Styles für Tastaturbedienung */
.projects-template-filter-option:focus,
.projects-template-read-more:focus,
.pagination a:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Reduced Motion für Nutzer mit Bewegungsempfindlichkeit */
@media (prefers-reduced-motion: reduce) {
    .projects-template-item,
    .projects-template-filter-option,
    .projects-template-read-more,
    .projects-template-image img {
        transition: none;
        animation: none;
    }
    
    .projects-template-item:hover {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .projects-template-filter-option {
        border: 2px solid currentColor;
    }
    
    .projects-template-item {
        border: 2px solid currentColor;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
    .projects-template-filters,
    .pagination {
        display: none;
    }
    
    .projects-template-grid {
        display: block;
    }
    
    .projects-template-item {
        break-inside: avoid;
        margin-bottom: 30px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .projects-template-read-more {
        display: none;
    }
}

/* ================================================
   BUTTON STYLING ANPASSUNG - ORANGE/BLAU
   ================================================ */

/* Alle Buttons im Normalzustand Orange (#ff5e00) und im Hover-Zustand Dunkelblau (#141e55) */
.projects-template-read-more,
.language-switch-link,
.pagination a,
.projects-template-filter-option.active,
.back-to-projects-link {
    background-color: #ff5e00 !important; /* Orange */
    color: white !important;
    transition: all 0.3s ease !important;
    border-color: #ff5e00 !important;
}

.projects-template-read-more:hover,
.language-switch-link:hover,
.pagination a:hover,
.projects-template-filter-option.active:hover,
.back-to-projects-link:hover {
    background-color: #141e55 !important; /* Dunkelblau */
    color: white !important;
    border-color: #141e55 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(20, 30, 85, 0.4) !important;
}

/* Spezifische Anpassung für .projects-template-read-more mit Pfeil */
.projects-template-read-more::after {
    content: '\2192'; /* Unicode-Pfeil nach rechts */
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-block; /* Stellt sicher, dass die Transformation funktioniert */
}

.projects-template-read-more:hover::after {
    transform: translateX(4px);
}

/* Spezifischer Stil für den Zurück-Button */
.back-to-projects-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #ff5e00 !important;
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 20px;
}

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

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