/* ==========================================================================
   Produkte Page Styles – prod-* BEM classes
   Matches template-produkte.php structure
   ========================================================================== */

/* --- 1. Banner-Bild --- */

.prod-banner {
    min-height: 333px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin-top: -30px;
}

/* --- 2. Magenta-Streifen Hero --- */

.prod-hero {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-top: -64px;
    padding: 20px 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    transform: scaleX(-1);
}

.prod-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    transform: scaleX(-1);
    text-align: right;
}

.prod-hero__icon-circle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white, #fff);
    font-size: 32px;
}

.prod-hero__title {
    font-family: var(--font-primary);
    font-size: 3em;
    font-weight: 500;
    color: var(--color-white, #fff);
    margin: 0;
    line-height: 1.2;
}

.prod-hero__subtitle {
    font-family: var(--font-primary);
    font-size: 2em;
    font-weight: var(--fw-light, 300);
    color: var(--color-white, #fff);
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 1.3;
    margin: 0 0 10px 0;
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

/* --- 2b. Kategorie-Tabs Navigation (Side Overlay) --- */

.prod-tabs {
    position: fixed;
    left: -40px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: transparent;
}

.prod-tabs__list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
}

.prod-tabs__list li {
    display: flex;
    justify-content: flex-start;
}

.prod-tabs__link {
    display: flex;
    align-items: center;
    gap: 0;
    font-family: var(--font-primary);
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 16px 20px 16px 60px;
    background: linear-gradient(135deg, rgba(229, 0, 125, 0.92) 0%, rgba(180, 0, 100, 0.95) 100%);
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Organische Stroke-Kanten pro Tab – nur rechte Seite, links bündig */
.prod-tabs__list li:nth-child(1) .prod-tabs__link {
    clip-path: polygon(-10% 0, calc(100% - 8px) 0, 100% 15%, calc(100% - 3px) 40%, 100% 60%, calc(100% - 5px) 85%, calc(100% - 5px) 100%, -10% 110%);
}
.prod-tabs__list li:nth-child(2) .prod-tabs__link {
    clip-path: polygon(-10% 0, calc(100% - 6px) 0, 100% 10%, calc(100% - 7px) 30%, 100% 55%, calc(100% - 5px) 80%, calc(100% - 3px) 100%, -10% 110%);
}
.prod-tabs__list li:nth-child(3) .prod-tabs__link {
    clip-path: polygon(-10% 0, calc(100% - 4px) 0, 100% 5%, calc(100% - 5px) 25%, 100% 50%, calc(100% - 4px) 75%, calc(100% - 7px) 100%, -10% 110%);
}
.prod-tabs__list li:nth-child(4) .prod-tabs__link {
    clip-path: polygon(-10% 0, calc(100% - 7px) 0, 100% 12%, calc(100% - 3px) 35%, 100% 58%, calc(100% - 6px) 82%, calc(100% - 4px) 100%, -10% 110%);
}

.prod-tabs__link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Text bei inaktiven Tabs versteckt */
.prod-tabs__link span {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                margin 0.4s ease;
    margin-left: 0;
}

/* Hover: Text einblenden */
.prod-tabs__link:hover {
    box-shadow: 4px 0 14px rgba(229, 0, 125, 0.2);
    padding-left: 58px;
}

.prod-tabs__link:hover span {
    max-width: 200px;
    opacity: 1;
    margin-left: 10px;
}

/* Active State – immer offen mit Text */
.prod-tabs__link.is-active {
    background: linear-gradient(135deg, #1a6fb5 0%, #145a94 100%);
    box-shadow: 4px 0 14px rgba(26, 111, 181, 0.25);
    padding-left: 58px;
}

.prod-tabs__link.is-active span {
    max-width: 200px;
    opacity: 1;
    margin-left: 10px;
}

/* --- 3. Anchor Sections (#industrie, #agenturen, etc.) --- */

.prod-section {
    padding: 20px 0 0 0;
    scroll-margin-top: 100px;
}

.prod-section--alt {
    background-color: transparent;
}

.prod-section__title {
    font-family: var(--font-primary);
    font-size: 2.8em;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 10px 0;
    padding: 40px 0 16px 0;
    border-bottom: 4px solid var(--color-primary);
    display: inline-block;
}

/* --- 4. Product Cards – Umwelt-Style (fullwidth alternierend) --- */

.prod-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin: 0;
    padding: 60px 0;
    border-bottom: none;
    position: relative;
}

/* Alternierende Hintergründe – organische Farbfläche, jede Karte eigener Stroke */
.prod-card:nth-child(odd) {
    background: linear-gradient(160deg, #edf4fb 0%, #e4eef8 40%, #f0f6fc 100%);
    padding-left: 40px;
    padding-right: 40px;
    margin-left: -40px;
    margin-right: -40px;
    border-radius: 0;
    position: relative;
}

/* Stroke-Variante A */
.prod-card:nth-child(8n+1) {
    clip-path: polygon(0 6px, 4% 0, 18% 5px, 45% 2px, 70% 7px, 90% 0, 100% 3px, 100% calc(100% - 5px), 95% 100%, 75% calc(100% - 6px), 50% 100%, 25% calc(100% - 4px), 8% 100%, 0 calc(100% - 7px));
}

/* Stroke-Variante B */
.prod-card:nth-child(8n+3) {
    clip-path: polygon(0 4px, 6% 0, 22% 7px, 38% 0, 60% 5px, 80% 2px, 100% 6px, 100% calc(100% - 4px), 92% 100%, 70% calc(100% - 7px), 48% 100%, 20% calc(100% - 3px), 5% 100%, 0 calc(100% - 6px));
}

/* Stroke-Variante C */
.prod-card:nth-child(8n+5) {
    clip-path: polygon(0 3px, 8% 0, 25% 6px, 50% 0, 72% 4px, 88% 0, 100% 7px, 100% calc(100% - 3px), 90% 100%, 65% calc(100% - 5px), 42% 100%, 15% calc(100% - 7px), 3% 100%, 0 calc(100% - 5px));
}

/* Stroke-Variante D */
.prod-card:nth-child(8n+7) {
    clip-path: polygon(0 7px, 5% 0, 20% 3px, 42% 6px, 58% 0, 82% 5px, 100% 2px, 100% calc(100% - 7px), 96% 100%, 78% calc(100% - 3px), 55% 100%, 35% calc(100% - 6px), 12% 100%, 0 calc(100% - 4px));
}

.prod-card:nth-child(even) {
    background: transparent;
}

/* Bild rechts bei geraden Karten */
.prod-card:nth-child(even) .prod-card__image {
    order: 2;
}

.prod-card:nth-child(even) .prod-card__body {
    order: 1;
}

.prod-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.prod-card__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: none;
    transition: transform 0.4s ease;
}

.prod-card:hover .prod-card__image img {
    transform: translateY(-4px);
}

.prod-card__body {
    padding: 0;
}

.prod-card__title {
    font-family: var(--font-primary);
    font-size: 1.7em;
    font-weight: 700;
    color: #1a6fb5;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.prod-card__desc {
    font-family: var(--font-primary);
    font-size: 1.05em;
    line-height: 1.8;
    color: var(--color-text);
    margin: 0 0 24px 0;
}

/* --- 5. Fakten --- */

.prod-fakten {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(26, 111, 181, 0.15);
}

.prod-fakten__heading {
    font-family: var(--font-primary);
    font-size: 0.85em;
    font-weight: 600;
    color: #1a6fb5;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.prod-fakten__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
    margin-bottom: 6px;
}

.prod-fakten__label {
    font-family: var(--font-primary);
    font-size: 0.9em;
    font-weight: 600;
    color: #1a6fb5;
    background: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.5;
    white-space: nowrap;
}

.prod-fakten__label i {
    font-size: 0.8em;
    color: #4BD6FF;
}

.prod-fakten__value {
    font-family: var(--font-primary);
    font-size: 0.9em;
    font-weight: 400;
    color: var(--color-secondary, #54595F);
    line-height: 1.5;
    padding: 0;
}

/* Scroll-Reveal Richtungen via nth-child */
.js-reveal-ready .prod-card.scroll-reveal:nth-child(odd) {
    transform: translateX(-60px);
}

.js-reveal-ready .prod-card.scroll-reveal:nth-child(even) {
    transform: translateX(60px);
}


/* ==========================================================================
   Responsive – Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .prod-hero {
        margin-top: -110px;
    }

    .prod-hero__title {
        font-size: 2.5em;
    }

    .prod-hero__subtitle {
        font-size: 1.5em;
    }

    .prod-section__title {
        font-size: 2em;
    }

    .prod-card {
        gap: 30px;
    }

    .prod-card__title {
        font-size: 1.4em;
    }

}

/* ==========================================================================
   Responsive – Mobile (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    .prod-tabs {
        display: none;
    }

    .prod-banner {
        display: none;
    }

    .prod-hero {
        min-height: auto;
        margin-top: 0;
        background-image: none;
        background-color: #E5007D;
        transform: none;
    }

    .prod-hero__inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        transform: none;
        align-items: center;
    }

    .prod-hero__icon-circle {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-top: -35px;
    }

    .prod-hero__title {
        font-size: 1.6em;
    }

    .prod-hero__subtitle {
        font-size: 1.2em;
    }

    .prod-section {
        padding: 40px 0;
        scroll-margin-top: 90px;
    }

    .prod-section__title {
        font-size: 1.6em;
        margin-bottom: 24px;
    }

    .prod-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 16px;
        margin-left: 0;
        margin-right: 0;
    }

    .prod-card:nth-child(odd) {
        padding-left: 16px;
        padding-right: 16px;
        margin-left: -16px;
        margin-right: -16px;
    }

    /* Reset order on mobile – image always first */
    .prod-card:nth-child(even) .prod-card__image {
        order: 0;
    }

    .prod-card:nth-child(even) .prod-card__body {
        order: 0;
    }

    .prod-card__image {
        max-width: 100%;
    }

    .prod-card__title {
        font-size: 1.3em;
    }

    /* Scroll-reveal: nur von unten auf Mobil */
    .js-reveal-ready .prod-card.scroll-reveal:nth-child(odd),
    .js-reveal-ready .prod-card.scroll-reveal:nth-child(even) {
        transform: translateY(30px) translateX(0);
    }

    .prod-fakten__row {
        gap: 2px 8px;
    }

}
