/* ==========================================
   ESTELLE HERO SECTION V3.0
   Luxuriöse Textboxen, Gold-Overlays, Handschriftliche Animation
   ========================================== */

:root {
    --estelle-gold: #B8956A;
    --estelle-gold-light: #D4B896;
    --estelle-gold-dark: #8B6F47;
}

/* ==========================================
   HERO CONTAINER
   ========================================== */

.hero {
    position: relative;
    height: 85vh;
    min-height: 650px;
    max-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
}

/* ==========================================
   VIDEO & BACKGROUND MIT SLOW-MOTION
   ========================================== */

/* Basis für beide Videos */
.hero-video {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    opacity: 0.85;
    filter: brightness(0.9);
    display: block;
}

/* Desktop-Video: immer sichtbar auf Desktop */
.hero-video-desktop {
    display: block;
}

/* Mobile-Video: auf Desktop versteckt */
.hero-video-mobile {
    display: none;
}

/* Auf Mobile: Desktop-Video per CSS sofort verstecken, noch vor JS */
@media (max-width: 768px) {
    .hero-video-desktop {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -99 !important;
    }

    .hero-video-mobile {
        display: block !important;
    }
}

/* Slow-Motion Effekt via playbackRate (wird per JS gesetzt) */
.hero-video[data-speed="0.5"] {
    animation: subtleZoom 120s ease-in-out infinite;
}

.hero-video[data-speed="0.75"] {
    animation: subtleZoom 80s ease-in-out infinite;
}

@keyframes subtleZoom {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-background.show {
    opacity: 1;
}

.hero-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0.85;
    filter: brightness(0.9);
}

/* ==========================================
   OVERLAY SYSTEM - GOLD & DARK VARIANTEN
   ========================================== */

/* Gold Overlays - Warm & Luxuriös */
.hero-overlay.overlay-gold_light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(184, 149, 106, 0.15) 30%,
        rgba(139, 111, 71, 0.25) 70%,
        rgba(74, 63, 53, 0.35) 100%
    );
    z-index: 2;
}

.hero-overlay.overlay-gold_medium {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(184, 149, 106, 0.25) 30%,
        rgba(139, 111, 71, 0.35) 70%,
        rgba(74, 63, 53, 0.5) 100%
    );
    z-index: 2;
}

.hero-overlay.overlay-gold_strong {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(184, 149, 106, 0.35) 30%,
        rgba(139, 111, 71, 0.45) 70%,
        rgba(74, 63, 53, 0.65) 100%
    );
    z-index: 2;
}

/* Dark Overlays - Klassisch Elegant */
.hero-overlay.overlay-dark_light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(20, 20, 20, 0.35) 50%,
        rgba(0, 0, 0, 0.45) 100%
    );
    z-index: 2;
}

.hero-overlay.overlay-dark_medium {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(20, 20, 20, 0.5) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 2;
}

.hero-overlay.overlay-dark_strong {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(20, 20, 20, 0.65) 50%,
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 2;
}

/* Gradient Sunset - Spezialeffekt */
.hero-overlay.overlay-gradient_sunset {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(139, 111, 71, 0.3) 0%,
        rgba(184, 149, 106, 0.25) 30%,
        rgba(212, 184, 150, 0.2) 50%,
        rgba(184, 149, 106, 0.3) 70%,
        rgba(74, 63, 53, 0.5) 100%
    );
    z-index: 2;
}

/* ==========================================
   HERO CONTENT WRAPPER & LAYOUT
   ========================================== */

.hero-content-wrapper {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1100px;
    padding: 0;
    opacity: 1;
}

/* ==========================================
   HAUPTTITEL - HANDSCHRIFT (OHNE BOX)
   ========================================== */

.hero-handwriting {
    font-family: 'Scriptina Pro', cursive;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    font-weight: normal;
    color: #FFFFFF;
    letter-spacing: 3px;
    line-height: 1.05;
    margin-bottom: 2.5rem;
    text-shadow:
        0 2px 15px rgba(0, 0, 0, 0.9),
        0 4px 30px rgba(0, 0, 0, 0.7),
        0 8px 45px rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 0 20px;
    display: block !important;
}

/* Mehrzeiliger Titel */
.hero-handwriting .title-line-1,
.hero-handwriting .title-line-2 {
    display: block;
    white-space: nowrap; /* Verhindert Zeilenumbruch innerhalb der Zeile */
}

.hero-handwriting .title-line-1 {
    font-size: 1em;
}

.hero-handwriting .title-line-2 {
    font-size: 0.95em;
}

/* Enhanced Gold Glow */
.hero-handwriting.text-glow-enhanced {
    text-shadow: 
        0 2px 15px rgba(0, 0, 0, 0.95),
        0 4px 35px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(184, 149, 106, 0.6),
        0 0 80px rgba(184, 149, 106, 0.4),
        0 0 100px rgba(184, 149, 106, 0.2);
}

/* Handschriftliche Animation */
.hero-handwriting.animate-handwriting {
    opacity: 0;
}

.hero-handwriting.animate-handwriting.is-animating .char {
    display: inline-block;
    opacity: 0;
    animation: writeChar 0.3s ease-out forwards;
}

@keyframes writeChar {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   UNTERTITEL-BOX (MIT TEXTBOX-STYLING)
   ========================================== */

.hero-subtitle-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════
   TEXTBOX VARIANTEN FÜR UNTERTITEL-BOX
   ══════════════════════════════════════════ */

/* Modern Glass (Standard) */
.hero-subtitle-box.textbox-modern_glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Luxury Gold */
.hero-subtitle-box.textbox-luxury_gold {
    background: linear-gradient(
        135deg,
        rgba(184, 149, 106, 0.15) 0%,
        rgba(139, 111, 71, 0.1) 100%
    );
    backdrop-filter: blur(var(--hero-blur, 12px));
    -webkit-backdrop-filter: blur(var(--hero-blur, 12px));
    border: 2px solid rgba(184, 149, 106, 0.3);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(184, 149, 106, 0.2),
        0 0 60px rgba(184, 149, 106, 0.1);
}

/* Elegant Dark */
.hero-subtitle-box.textbox-elegant_dark {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(var(--hero-blur, 12px));
    -webkit-backdrop-filter: blur(var(--hero-blur, 12px));
    border: 1px solid rgba(184, 149, 106, 0.2);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Soft White */
.hero-subtitle-box.textbox-soft_white {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(var(--hero-blur, 12px));
    -webkit-backdrop-filter: blur(var(--hero-blur, 12px));
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 32px rgba(255, 255, 255, 0.1),
        0 16px 64px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Keine Textbox */
.hero-subtitle-box.textbox-none {
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* ══════════════════════════════════════════
   ECKEN-STILE FÜR UNTERTITEL-BOX
   ══════════════════════════════════════════ */

.hero-subtitle-box.corners-sharp {
    border-radius: 0;
}

.hero-subtitle-box.corners-rounded {
    border-radius: 30px;
}

/* Asymmetrisch - Oben-Links & Unten-Rechts rund */
.hero-subtitle-box.corners-asymmetric {
    border-radius: 40px 0 40px 0;
}

/* ==========================================
   UNTERTITEL IM TEXTBOX
   ========================================== */

.hero-subtitle,
.hero-subtitle-secondary {
    font-family: 'Questrial', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 300;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    line-height: 1.9;
    max-width: 100%;
    margin: 0 0 1.3rem 0;
    padding: 0;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.8),
        0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-subtitle:last-child,
.hero-subtitle-secondary:last-child {
    margin-bottom: 0;
}

.hero-subtitle-secondary {
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    opacity: 0.97;
}

/* Enhanced Glow für Untertitel */
.hero-subtitle.text-glow-enhanced,
.hero-subtitle-secondary.text-glow-enhanced {
    text-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.9),
        0 4px 24px rgba(0, 0, 0, 0.7),
        0 0 35px rgba(184, 149, 106, 0.4),
        0 0 55px rgba(184, 149, 106, 0.2);
}

/* ==========================================
   INTRO VIDEO (GLITZER-ANIMATION)
   ========================================== */

.hero-intro-video-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
}

.hero-intro-video {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 50px rgba(184, 149, 106, 0.6));
}

/* ==========================================
   SCROLL INDICATOR
   ========================================== */

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator span {
    display: block;
    width: 28px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    position: relative;
    box-shadow: 
        0 0 12px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(184, 149, 106, 0.3);
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    animation: scrollDown 2.5s infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes scrollDown {
    0%, 100% { 
        opacity: 0; 
        top: 10px; 
    }
    50% { 
        opacity: 1; 
        top: 20px; 
    }
}

/* ==========================================
   ANIMATIONEN
   ========================================== */

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

/* Mobile-Video standardmäßig ausblenden */
.hero-video-mobile {
    display: none;
}

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

@media (max-width: 1024px) {
    .hero-content-wrapper {
        max-width: 900px;
    }
    
    .hero-subtitle-box {
        max-width: 800px;
        padding: 2.2rem 2.5rem;
    }
}

@media (max-width: 768px) {

    /* ── Hero Container: left/transform Reset damit kein Elementor-Konflikt ── */
    .hero,
    .estelle-hero-v3 {
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: none !important;
        /* Kein width:100vw + left:50% Trick auf Mobile → kollidiert mit Elementor */
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
        /* Flex: Titel-Wrapper oben starten lassen, dann per margin-top positionieren */
        align-items: flex-start !important;
        overflow: hidden !important;
    }

    /* iOS Safari Fix: verhindert Bounce-Scroll-Whitespace */
    .hero::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 100%;
        height: 1px;
        background: transparent;
    }

    /* Mobile-Video: volle Fläche, kein Crop */
    .hero-video-mobile {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        left: 0 !important;
        transform: none !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    /* Fallback: kein Mobile-Video → Desktop-Video weiter zeigen */
    .hero-video-desktop:only-of-type {
        display: block !important;
        width: 100% !important;
    }

    /* Partikel-Ring und Subtitle-Box ausblenden auf Mobile */
    .hero-particles-ring,
    .hero-subtitle-box,
    .scroll-indicator {
        display: none !important;
    }

    /* Titel-Wrapper: kein position:absolute – bleibt im Flex-Flow.
       margin-top positioniert ihn ca. 22% von oben. */
    .hero-content-wrapper {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1.5rem !important;
        display: block !important;
        text-align: center !important;
        margin-top: 22vh !important;
        margin-top: 22dvh !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Titel-Schrift auf Mobile */
    .hero-handwriting {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        font-size: clamp(2.2rem, 10vw, 4rem) !important;
        margin: 0 auto !important;
        line-height: 1.2 !important;
        padding: 0 !important;
    }

    /* Titelzeilen zentriert (hero-animations.js nutzt title-line-1/2) */
    .hero-handwriting .title-line-1,
    .hero-handwriting .title-line-2 {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
        white-space: normal !important;
    }

    /* Falls GSAP noch läuft: word-container inline damit text-align:center greift */
    .hero-handwriting .word-container {
        display: inline !important;
        white-space: normal !important;
    }

    .hero-handwriting .char {
        display: inline !important;
        white-space: normal !important;
    }
}

@media (max-width: 480px) {
    .hero,
    .estelle-hero-v3 {
        height: 100dvh !important;
        min-height: 100dvh !important;
    }
    
    /* Noch weniger Padding auf sehr kleinen Screens */
    .hero-mobile-text-section {
        padding: 1.5rem 1.2rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 100vh;
    }
    
    .hero-subtitle-box {
        padding: 1.2rem 1.5rem;
    }
    
    .hero-handwriting {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle,
    .hero-subtitle-secondary {
        font-size: clamp(0.8rem, 3vw, 1rem);
        margin-bottom: 0.5rem;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
}

/* ==========================================
   BLUR INTENSITY VIA CSS VARIABLE
   (Wird per data-attribute gesetzt)
   ========================================== */

.estelle-hero-v3[data-textbox-blur] .hero-subtitle-box {
    --hero-blur: attr(data-textbox-blur px, 12px);
}

/* ==========================================
   HERO PARTICLES RING - WEIßE/SILBERNE GLITZERPARTIKEL
   ========================================== */

.hero-particles-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 900px;
    height: 400px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: fadeInParticles 3s ease-out 1s forwards;
}

.hero-particles-ring svg {
    width: 100%;
    height: 100%;
}

.hero-handwriting {
    position: relative;
    z-index: 2;
}

@keyframes fadeInParticles {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive Anpassungen */
@media (max-width: 1024px) {
    .hero-particles-ring {
        max-width: 750px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    .hero-particles-ring {
        max-width: 600px;
        height: 280px;
        opacity: 0.7;
    }
}

@media (max-width: 480px) {
    .hero-particles-ring {
        max-width: 450px;
        height: 220px;
        opacity: 0.6;
    }
}

/* ==========================================
   MOBILE: HERO TEXT UNTERHALB DES VIDEOS
   ========================================== */

.hero-mobile-text-section {
    display: none;
    background: linear-gradient(to bottom, #F9F5F0, #FFFFFF);
    padding: 2rem 1.5rem; /* Reduziert von 3rem für iOS */
    text-align: center;
}

.hero-mobile-text-section h2 {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    color: #4A3F35;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-mobile-text-section .hero-mobile-handwriting {
    font-family: 'Scriptina Pro', cursive !important;
    font-size: clamp(2rem, 10vw, 3rem) !important;
    font-weight: normal !important;
    color: #4A3F35;
    letter-spacing: 2px;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    text-align: center;
}

.hero-mobile-text-section p {
    font-family: 'Questrial', sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #6B5D52;
    margin-bottom: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-mobile-text-section p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .hero-mobile-text-section {
        display: block;
    }
}
