﻿/*
 * Dateiname: frontend.css
 * Aktualisiert am: 21.04.2026 um 11:25 Uhr
 * Beschreibung: Stylesheet fÃ¼r das Zick-Zack-Layout, Responsive Design und Lightbox-Anpassungen.
 */

/* ==========================================================================
   1. ALLGEMEINE STYLES & TYPOGRAFIE
   ========================================================================== */
.hp-projects-container {
    width: 100%;
    margin: 20px 0;
}

.hp-text-content {
    line-height: 1.6;
    color: #333;
}

.hp-text-content p {
    font-size: 19px;
}

/* HauptÃ¼berschrift H2 */
.hp-project-header h2 {
    font-size: 46px;
    letter-spacing: 1px;
    line-height: 1.3em;
    margin-top: 0;
    margin-bottom: 20px;

}

/* UnterÃ¼berschriften H3 (Eckdaten & Details) */
.hp-eckdaten-box h3,
.hp-project-content h3,
.hp-single-body h3 {
    font-size: 32px;
    letter-spacing: 1px;
    line-height: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 400;
}
.hp-project-content h3.mit-abstand-oben {
    padding-top: 40px;
}

/* --- HP Eckdaten (Ein Paar pro Zeile) --- */
.hp-eckdaten-box .hp-eckdaten-table {
    border: none!important;
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 20px 0;
    border: none;
}

.hp-eckdaten-box .hp-eckdaten-table td {
    border: none;
    padding: 10px 0;
    vertical-align: baseline;
    border: none;
    font-size: 19px; /* Desktop-Größe */
}

/* Label-Spalte: So schmal wie möglich, aber Platz für lange Wörter */
.hp-eckdaten-table td.hp-info-label {
    font-weight: bold;
    width: 1%;           /* Zwingt die Spalte auf den Inhalt zu schrumpfen */
    white-space: nowrap; /* Verhindert Umbruch im Label */
    padding-right: 15px; /* Dein gewünschter Abstand nach dem Doppelpunkt */
}

/* Value-Spalte: Nimmt den restlichen Platz ein */
.hp-eckdaten-table td.hp-info-value {
    width: auto;
}

/* --- Mobile Ansicht (unter 767px) --- */
@media only screen and (max-width: 767px) {
    .hp-eckdaten-table td {
        display: block !important;
        width: 100% !important;
        font-size: 15px; /* Handy-Größe */
    }

    .hp-eckdaten-table td.hp-info-label {
        padding-bottom: 2px;
    }

    .hp-eckdaten-table td.hp-info-value {
        padding-bottom: 12px;
    }
}

/* ==========================================================================
   2. LISTEN-LAYOUT (40% BILD / 60% TEXT & ZICK-ZACK)
   ========================================================================== */
.hp-view-list .hp-card {
    margin-bottom: 60px;
    font-size: 19px;
}

.hp-view-list .hp-project-header {
    display: flex;
    gap: 40px;                 /* Fester Abstand zwischen den Spalten */
    align-items: stretch;      /* Streckt Spalten auf gleiche HÃ¶he */
}

/* Zick-Zack Effekt: Jede zweite Karte spiegelt sich */
.hp-view-list .hp-card:nth-child(even) .hp-project-header {
    flex-direction: row-reverse;
}

/* Spalten-VerhÃ¤ltnis: 40% Bild / 60% Text */
.hp-view-list .hp-img-column {
    flex: 0 0 calc(40% - 20px);
}

.hp-view-list .hp-meta-column {
    flex: 0 0 calc(60% - 20px);
    display: flex;
    flex-direction: column;
    min-width: 280px;
}

/* Bild-Styling */
.hp-view-list .hp-img-column img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ==========================================================================
   3. KOMPONENTEN (ECKDATEN-BOX, BUTTON, TRENNER)
   ========================================================================== */
/* Eckdaten-Box */
.hp-eckdaten-box {
    margin-top: auto;
    background: #c6c6c6;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

div#hp-template-helics-products-tempalte .hp-eckdaten-box {
    width: 100%;
}

/* ==========================================================================
   3b. TEMPLATE: HELICS PRODUCTS TEMPALTE (Title full width)
   ========================================================================== */
#hp-template-helics-products-tempalte .hp-project-header {
    display: block;
}

#hp-template-helics-products-tempalte .hp-project-top-row {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

#hp-template-helics-products-tempalte .hp-card:nth-child(even) .hp-project-top-row {
    flex-direction: row-reverse;
}

#hp-template-helics-products-tempalte .hp-meta-column {
    align-items: flex-start;
    justify-content: flex-start;
}

#hp-template-helics-products-tempalte .hp-eckdaten-box {
    margin-top: 0;
}

#hp-template-helics-products-tempalte .hp-toggle.helics-button-orange {
    align-self: flex-start;
    margin-top: auto !important;
}

.hp-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 44px;
    margin: 12px 0 0 0;
}

.hp-info-item {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
}

.hp-info-label,
.hp-info-value {
    font-size: 19px;
    margin: 0;
}

.hp-info-label {
    font-weight: 700;
    white-space: nowrap;
}

.hp-info-value {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

/* Toggle-Button: Orange */
.hp-toggle.helics-button-orange {
    display: inline-block;
    width: fit-content;
    max-width: 200px;
    text-decoration: none;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    background-color: var(--button-hintergrund) ;
    color: #fff;
    border-radius: 6px;
    font-size: 17px;
    padding: 10px 30px !important;
    font-weight: bold;
}

.hp-toggle.helics-button-orange:hover {
    background-color: var(--button-hintergrund);
}

.hp-project-content {
    display: none;
    margin-top: 20px;
    padding: 20px 0;
}

/* Trenner: Orangefarbene Linie */
.hp-view-list .hp-card:not(:last-child) {
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 50px;
}

.hp-view-list .hp-card:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background-color: #ff841a;
}

/* ==========================================================================
   4. EINZELANSICHT-LAYOUT
   ========================================================================== */
.hp-single-display-card {
    max-width: 1000px;
    margin: 0 auto;
}
.hp-single-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: flex-start;
}
.hp-single-header .hp-img-column {
    flex: 1.2;
}
.hp-single-header .hp-img-column img {
    width: 100%;
    border-radius: 15px;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 980px) {
    .hp-view-list .hp-project-header {
        flex-direction: column !important;
        gap: 20px;
    }
    .hp-view-list .hp-img-column, .hp-view-list .hp-meta-column {
        flex: 0 0 100%;
        width: 100%;
    }

    #hp-template-helics-products-tempalte .hp-project-top-row {
        flex-direction: column !important;
        gap: 20px;
    }
}

@media (max-width: 425px) {
    .hp-info-label,
    .hp-info-value {
        font-size: 17px;
    }
}

/* ==========================================================================
   6. FIXES FÃœR OVERLAY & LIGHTBOX (REPARATUR)
   ========================================================================== */

/* Sorgt dafür, dass der Container das Bild exakt umschlieÃŸt */
.hp-img-column .hp-gallery-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    display: block;
    line-height: 0; /* Verhindert kleine AbstÃ¤nde unter dem Bild */
}

/* Das weiÃŸe Hover-Overlay */
.hp-img-column .hp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.35); /* WeiÃŸer Schleier */
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;

    /* WICHTIG: Erlaubt den Klick auf das Overlay fÃ¼r die Lightbox */
    pointer-events: auto;
    cursor: pointer;
}

/* Zeigt das Overlay beim DrÃ¼berfahren */
.hp-img-column .hp-gallery-image:hover .hp-overlay {
    opacity: 1;
}

/* Dein SVG Icon (Images-Stack) zentrieren und stylen */
.hp-img-column .hp-overlay svg {
    display: block;
    width: 60px; /* Deine WunschgrÃ¶ÃŸe */
    height: auto;
    /* Macht das Icon Ã¼ber dem Schleier besser sichtbar */
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.1));
}

/* Lightbox-BeschrÃ¤nkung (Damit sie nicht den ganzen Bildschirm sprengt) */
img.mfp-img {
    max-width: 85vw !important;
    max-height: 85vh !important;
    padding: 40px 0 !important;
}

/* Pfeile und ZÃ¤hler der Lightbox sichtbar machen */
.mfp-arrow, .mfp-counter {
    opacity: 1 !important;
    color: #fff !important;
}
.hp-toggle.helics-button-orange {
            font-size: 17px;
}
.hp-project-header h2 {
        font-size: 32px;
    }

/* --- Tablet (Laptop-Werte aus deinem Bild) --- */
@media only screen and (max-width: 980px) {
    .hp-project-header h2 {
        font-size: 26px;
    }
    .hp-eckdaten-box h3,
    .hp-project-content h3,
    .hp-single-body h3 {
        font-size: 26px;
    }
    .hp-toggle.helics-button-orange {
            font-size: 15px;
}

    .hp-eckdaten-box ul li ,
    .hp-projects-container p {
        font-size: 17px;
    }
    .hp-eckdaten-box .hp-eckdaten-table td {
            font-size: 17px;        
    }
}


/* --- Mobile (Handy-Werte aus deinem Bild) --- */
@media only screen and (max-width: 767px) {
    
        .hp-project-header h2 {
        font-size: 20px;
    }
    
    .hp-eckdaten-box .hp-eckdaten-table td {
            font-size: 15px;
    }
   
    .hp-eckdaten-box h3,
    .hp-project-content h3,
    .hp-single-body h3{
            font-size: 20px
        }
        .hp-toggle.helics-button-orange {
                        font-size: 13px

        }
    .hp-eckdaten-box ul li ,
        .hp-projects-container p{
            font-size: 15px
        }
    
}


@media only screen and (max-width: 767px) {
    .hp-info-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hp-info-item {
        grid-template-columns: 120px minmax(0, 1fr);
        column-gap: 10px;
    }
}

@media (max-width: 425px) {
    .hp-info-item {
        grid-template-columns: 1fr;
        row-gap: 4px;
    }

    .hp-info-label {
        white-space: normal;
    }
}

.hp-eckdaten-table {
    width: 100%;
    border-collapse: collapse;
    /* auto ist wichtig, damit die Spaltenbreite variabel bleibt */
    table-layout: auto; 
    border: none;
}

.hp-eckdaten-table td {
    padding: 10px 0;
    vertical-align: top;
}

/* Die Label-Spalte */
.hp-eckdaten-table td.hp-info-label {
    font-weight: bold;
    /* Erlaubt der Spalte zu wachsen */
    width: 50%; 
    /* Aber wir setzen eine maximale Breite im Verhältnis zum Container */
    max-width: 50%; 
    
    /* Wichtig: Umbruch erlauben */
    white-space: nowrap; 
    padding-right: 15px;
    
    /* Verhindert, dass die Spalte bei kurzen Wörtern (Land:) 
       sofort die vollen 50% einnimmt */
    display: table-cell; 
}

/* Wir nutzen eine spezielle CSS-Regel, um das Label auf den Inhalt zu schrumpfen */
.hp-eckdaten-table td.hp-info-label {
    width: 1%; /* Trick: Die Spalte versucht so schmal wie möglich zu sein... */
    white-space: nowrap; /* ...solange der Platz reicht */
    
}

/* ...und hier ist der "Break"-Punkt für lange Labels */
.hp-eckdaten-table td.hp-info-label {
    min-width: 100px; /* Mindestbreite */
    /* Überschreibe den nowrap nur, wenn das Label wirklich Platz braucht */
    white-space: normal; 
}

/* Die Value-Spalte nimmt den Rest ein */
.hp-eckdaten-table td.hp-info-value {
    width: auto;
    word-break: break-word;
}