/* ========================================================================== */
/* UNTERNEHMENSSEITE (HYBRID: FULLSCREEN HERO, OVERLAPS & FLIP CARDS)         */
/* ========================================================================== */

/* ALLGEMEINE ÜBERSCHRIFTEN */
h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
}

/* ---- HERO PARALLAX ---- */
.hero-parallax {
    position: relative;
    width: 100%;
    min-height: 85vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    background-size: cover;
    background-position-x: center; 
    background-position-y: 0px; 
    background-repeat: no-repeat;
    background-image: url('/assets/images/website/musterbilder/werbetechnik.png');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 58, 117, 0.65);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    color: var(--white);
    margin-top: 2rem; 
}

.hero-content h1 {
    font-size: 3.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.highlight {
    color: var(--primary-sh);
}

.hero-sub {
    font-size: 1.4rem;
    color: var(--bg-h);
}

/* ---- CONTENT WRAPPER ---- */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    position: relative;
    z-index: 10;
}

/* ---- PHILOSOPHIE ---- */
.philosophie-overlap {
    position: relative;
    margin-top: -8rem; 
}

.overlap-text-center {
    background-color: var(--white);
    padding: 4rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.overlap-text-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.overlap-text-center p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-d);
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.overlap-text-center p:last-child {
    margin-bottom: 0;
}

/* ---- HISTORIE (Korrigierte Timeline) ---- */
.company-history h2 {
    text-align: center;
}

.company-history h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.timeline {
    position: relative;
    max-width: 1000px; 
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-sh);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px; 
    z-index: 1; 
}

.timeline-item {
    padding: 10px 50px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
    z-index: 2; 
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border: 4px solid var(--white);
    border-radius: 50%;
    top: 15px;
    z-index: 10; 
    box-shadow: 0 0 0 3px var(--primary-sh);
}

.timeline-item:nth-child(odd)::before { right: -14px; }
.timeline-item:nth-child(even)::before { left: -14px; }

.timeline-item .year { 
    font-weight: bold; 
    color: var(--primary); 
    font-size: 1.4rem; 
    margin-bottom: 0.5rem; 
}

.timeline-item h3 { 
    color: var(--text-d); 
    margin-bottom: 0.5rem; 
}

.timeline-item p { color: var(--text-gr); }

.timeline-item.outlook {opacity: 0.7; }
.timeline-item.outlook::before { 
    background-color: var(--white); 
    border: 4px solid var(--primary); 
    box-shadow: none;
}

/* ---- TEAM (FLIP CARDS - STABILE 3D STRUKTUR) ---- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.flip-card {
    background-color: transparent;
    aspect-ratio: 1 / 1;
    perspective: 1000px; 
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.flip-card-inner.is-flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

/* --- VORDERSEITE --- */
.flip-card-front {
    background-color: var(--bg-h);
    z-index: 2;
    transform: rotateY(0deg);
}

/* Standard-Personenbilder */
.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.flip-card:hover .flip-card-front img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ---- SPEZIFISCHE ANPASSUNG FÜR NICOS MASKOTTCHEN-KACHEL (3. KARTE) ---- */
.team-member:nth-child(3) .flip-card-front,
.flip-card:nth-child(3) .flip-card-front {
    background-color: var(--bg-h) !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-member:nth-child(3) .flip-card-front img,
.flip-card:nth-child(3) .flip-card-front img {
    filter: grayscale(100%) !important;
    width: 90% !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: translateY(110px) scale(1) !important;
    transition: filter 0.5s ease, transform 0.3s ease;
}

.team-member:nth-child(3):hover .flip-card-front img,
.flip-card:nth-child(3):hover .flip-card-front img {
    filter: grayscale(0%) !important;
    transform: translateY(110px) scale(1.05) !important;
}

.name-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-d);
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-top-right-radius: 12px;
    z-index: 3;
}

/* --- RÜCKSEITE --- */
.flip-card-back {
    background-color: var(--white);
    color: var(--text-d);
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 3px solid var(--primary-sh);
    overflow-y: auto;
    z-index: 1;
}

.member-role {
    display: block;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.flip-card-back p {
    color: var(--text-gr);
    font-size: 0.95rem;
    margin-bottom: 1.5rem; 
}

.member-contact {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
}

.anfrage {
    margin-bottom: 1rem;
}

.member-contact:hover {
    background-color: var(--text-d);
    transform: translateY(-2px);
}

/* ---- OVERLAP STANDORT ---- */
.overlap-section {
    display: flex;
    align-items: center;
    position: relative;
}

.overlap-section.reverse {
    flex-direction: row-reverse;
}

.overlap-img {
    width: 60%;
    height: 550px;
    background-color: #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1;
    overflow: hidden;
}

.overlap-text {
    width: 50%;
    background-color: var(--white);
    padding: 4rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    z-index: 2;
    margin-left: -10%; 
}

.overlap-section.reverse .overlap-text {
    margin-left: 0;
    margin-right: -10%; 
}

.overlap-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-d);
    line-height: 1.8;
}

/* ---- SCROLL ANIMATION ---- */
.scroll-anim {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.scroll-anim.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- RESPONSIVE DESIGN ---- */
@media (max-width: 992px) {
    .hero-parallax { min-height: 70vh; }
    .hero-content h1 { font-size: 2.8rem; }
    .philosophie-overlap { margin-top: -4rem; }
    .overlap-text-center { padding: 2rem; }
    
    .overlap-section, .overlap-section.reverse { flex-direction: column; }
    .overlap-img { width: 100%; height: 350px; }
    .overlap-text {
        width: 90%;
        margin-left: 0;
        margin-right: 0;
        margin-top: -3rem; 
        padding: 2rem;
    }
    .overlap-section.reverse .overlap-text { margin-right: 0; }
}

@media (max-width: 768px) {
    .timeline::after {
        left: 30px; 
        margin-left: 0;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    .timeline-item:nth-child(odd)::before,
    .timeline-item:nth-child(even)::before {
        left: 18px;
        right: auto;
    }

    /* Mobile Flip Card Anpassungen */
    .flip-card-back {
        padding: 1.2rem !important;
        justify-content: center !important;
    }

    .flip-card-back h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.3rem !important;
    }

    .member-role {
        font-size: 1rem !important;
        margin-bottom: 0.6rem !important;
    }

    .flip-card-back p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.4rem !important;
    }

    .flip-card-back .member-contact:first-of-type,
    .flip-card-back .anfrage .member-contact,
    .flip-card-back a:first-of-type.member-contact {
        margin-top: 1.8rem !important;
        margin-bottom: 0.6rem !important;
    }

    .member-contact {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
}