/* ==========================================
   HERO SECTION - Daniela Hofmeister Website
   ========================================== */

/* Keyframe Animationen - Sofort sichtbar mit sanfter Bewegung */
@keyframes fadeInDown {
    0% {
        opacity: 1; /* Sofort sichtbar */
        transform: translateY(-15px); /* Sanfte Bewegung */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 1; /* Sofort sichtbar */
        transform: translateY(20px); /* Sanfte Bewegung */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 1; /* Sofort sichtbar */
        transform: translateX(-20px); /* Sanfte Bewegung */
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Container */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    overflow: hidden;
    padding: 6rem 0 2rem 0;
}

/* Hero Background Image - EINZIGES ::before Element */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/DSC_0055.webp') center/cover no-repeat;
    background-image: url('../images/DSC_0055.webp'), url('../images/DSC_0055.JPG'); /* WebP mit JPG Fallback */
    filter: brightness(0.9) blur(4px); /* Heller für alle Bildschirmgrößen */
    z-index: 1;
}

/* Weißer Verlauf nach oben - EINZIGES ::after Element */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%; /* Verlauf nur über oberen 35% */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1.0) 0%, rgba(255, 255, 255, 1.0) 40%, rgba(255, 255, 255, 0.8) 70%, rgba(255, 255, 255, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Hero Überschrift - Bild */
.hero-ueberschrift {
    position: absolute;
    top: 4.5rem; /* Noch höher positioniert für Desktop */
    left: 0;
    right: 0;
    z-index: 6;
    text-align: center;
    padding: 0 2rem;
    animation: fadeInDown 1.2s ease-out 0.2s both; /* Schneller, sofort sichtbar */
}

.hero-ueberschrift-image {
    max-width: 100%;
    height: auto;
    width: 45%; /* Desktop: 45% der Breite (noch 5% kleiner) */
    display: block;
    margin: 0 auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    object-fit: contain; /* Verhindert Verzerrung */
}

/* Mobile Anpassungen für Hero Überschrift */
@media (max-width: 600px) {
    .hero-ueberschrift {
        top: 6rem; /* Höher wegen größerer Navigation */
        padding: 0 1rem;
    }
    
    .hero-ueberschrift-image {
        width: clamp(250px, 90vw, 400px);
        max-width: 90vw;
    }
}

/* Tablet Anpassungen */
@media (min-width: 601px) and (max-width: 1200px) {
    .hero-ueberschrift {
        top: 4.5rem;
        padding: 0 1.5rem;
    }
    
    .hero-ueberschrift-image {
        width: clamp(400px, 70vw, 600px);
        max-width: 70vw;
    }
}

@media (max-width: 600px) {
    .hero {
        min-height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        padding: 8rem 0 0 0;
        text-align: center;
        overflow: visible;
    }
    
    /* Mobile: Angepasster weißer Verlauf */
    .hero::after {
        height: 30%; /* Verlauf nur über oberen 30% */
        background: linear-gradient(to bottom, rgba(255, 255, 255, 1.0) 0%, rgba(255, 255, 255, 1.0) 50%, rgba(255, 255, 255, 0.6) 80%, rgba(255, 255, 255, 0) 100%);
    }
    
    /* Mobile: Helleres Hintergrundbild */
    .hero::before {
        filter: brightness(1.0) blur(3px); /* Mobile: Sehr hell */
    }
    
    /* Mobile: Nur den Untertitel "DIE CSU-BÜRGERMEISTERKANDIDATIN..." ausblenden */
    .hero-role {
        display: none !important;
    }
}

/* Tablet Hochformat - Hintergrundbild oben und unten abschneiden */
@media (min-width: 601px) and (max-width: 1200px) and (orientation: portrait) {
    .hero {
        overflow: hidden;
    }
    
    .hero::before {
        background-position: center center;
        background-size: auto 100%;
        filter: brightness(1.0) blur(5px); /* Tablet: Sehr hell */
    }
}

/* Hero Portrait/Avatar */
.hero-portrait {
    position: absolute;
    z-index: 4;
    left: clamp(8px, 2vw, 24px);
    bottom: 0;
    width: min(50vw, 800px);
    height: 95vh;
    object-fit: contain;
    object-position: left bottom;
    filter: none;
    box-shadow: none;
    animation: fadeInRight 1.4s ease-out 0.4s both; /* Schneller, sofort sichtbar */
    transition: none;
}

.hero-portrait:hover {
    transform: none;
}

/* Tablet Hochformat - Avatar anpassen */
@media (min-width: 601px) and (max-width: 1200px) and (orientation: portrait) {
    .hero-portrait {
        height: 90vh;
        max-height: 90vh;
        width: min(48vw, 750px);
        object-fit: contain;
        object-position: left bottom;
        left: clamp(20px, 3vw, 40px);
    }
    
    .hero-nameblock {
        bottom: clamp(80px, 10vh, 120px);
        max-width: 50vw;
        right: 5%;
        left: auto;
        transform: none;
    }
    
    .hero-logo {
        bottom: 2rem;
        right: 2rem;
        width: 90px;
        z-index: 6;
    }
}

/* Mobile Portrait */
@media (max-width: 600px) {
.hero-portrait {
        position: absolute !important;
        top: auto !important;
        left: 50% !important;
        right: auto !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        min-width: 100vw !important;
        height: auto !important;
        min-height: 80.75vh !important;
        max-height: none !important;
        transform: translateX(-50%) !important;
        object-fit: cover !important;
        object-position: center bottom !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        display: block !important;
        filter: none !important;
        transition: none !important;
        z-index: 2 !important;
    }
    
    .hero-portrait:hover {
        transform: translateX(-50%) !important;
    }
}

/* Für sehr kleine Bildschirme */
@media (max-width: 480px) {
    .hero-ueberschrift {
        top: 5.5rem; /* Noch höher für sehr kleine Bildschirme */
    }
    
    .hero-portrait {
        width: 100vw !important;
        min-width: 100vw !important;
        height: 76vh !important;
        min-height: 76vh !important;
        object-fit: cover !important;
    }
}

/* Für mittlere Mobile-Bildschirme */
@media (min-width: 481px) and (max-width: 600px) {
    .hero-portrait {
        width: 100vw !important;
        min-width: 100vw !important;
        height: 80.75vh !important;
        min-height: 80.75vh !important;
        object-fit: cover !important;
    }
}

/* CSU Logo */
.hero-logo {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 80px;
    height: auto;
    z-index: 3;
    opacity: 0.8;
    filter: brightness(1.1);
}

@media (min-width: 601px) {
    .hero-logo {
        bottom: 2rem;
        right: 2rem;
        width: 100px;
    }
}

@media (max-width: 600px) {
    .hero-logo {
        bottom: 1rem;
        right: 1rem;
        width: 60px;
    }
}

/* Hero Nameblock Container */
.hero-nameblock {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: clamp(100px, 12vh, 160px);
    color: #fff;
    text-shadow: none;
    letter-spacing: 0.02em;
    max-width: 45vw;
    animation: fadeInUp 1.3s ease-out 0.6s both; /* Schneller, sofort sichtbar */
    transform: translateX(-50%);
}

@media (max-width: 600px) {
    .hero-nameblock {
        position: absolute;
        bottom: 1rem;
        left: 1rem;
        transform: none;
        text-align: left;
        max-width: 60%;
        order: 3;
        padding: 0; /* Kein Padding */
        background: none; /* Keine schwarze Box */
        border-radius: 0; /* Keine Rundung */
        backdrop-filter: none; /* Kein Blur */
        z-index: 10 !important;
    }
}

/* Hero Name */
.hero-name {
    font-size: clamp(48px, 6vw, 96px);
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
    line-height: 0.9;
    color: #ffffff;
    text-shadow: none;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.hero-name-line1,
.hero-name-line2 {
    display: block;
}

@media (max-width: 768px) {
    .hero-name {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
        margin-bottom: 0.3rem;
        line-height: 1.3;
    }
}

/* Hero Role/Subtitle */
.hero-role {
    font-size: clamp(14px, 1.6vw, 20px);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
    opacity: 1;
    color: #ffffff;
    text-shadow: none;
    text-align: left;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.6rem 1rem;
    border-radius: 0;
    backdrop-filter: none;
    border: none;
    width: 100%;
    margin-top: 0.5rem;
    white-space: normal;
}

@media (max-width: 768px) {
    .hero-role {
        font-size: clamp(0.8rem, 3vw, 1rem);
        line-height: 1.4;
        opacity: 1;
        text-align: left;
        white-space: normal;
    }
}

