/* ==========================================================================
   Anna Ruede - Consolidated Stylesheet
   ========================================================================== */

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    background-color: #2a3a7b; /* brand-primary */
    color: #f3f4f6; /* gray-100 */
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Anchor offset under fixed header */
section[id] {
    scroll-margin-top: 80px;
}

/* Wenn Sub-Nav vorhanden: mehr Offset für Sprungmarken */
body.has-sub-nav section[id],
body.has-sub-nav [data-anchor] {
    scroll-margin-top: 140px;
}

/* ==========================================================================
   Top-Bar (Promo-Leiste, Desktop only)
   ========================================================================== */

.topbar a {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alle Menüpunkte immer in Großbuchstaben (Desktop-Nav + Mobile-Menu) */
#main-header nav a,
.mobile-link {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header-sticky {
    background-color: rgba(42, 58, 123, 0.9); /* brand-primary mit Transparenz */
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* ==========================================================================
   Nav-Dropdowns (Desktop) – Full-Width Mega-Panel, via JS injiziert
   ========================================================================== */

.nav-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-group > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.nav-group.is-open .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* Full-Width Mega-Menu Panel */
.nav-mega {
    position: fixed;
    top: 88px; /* unter Main-Header */
    left: 0;
    width: 100%;
    z-index: 45;
    background-color: rgba(30, 42, 90, 0.97); /* brand-secondary */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, top 0.3s ease;
    pointer-events: none;
}

.nav-mega.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

body.header-is-sticky .nav-mega {
    top: 68px;
}

.nav-mega-inner {
    padding-top: 2rem;
    padding-bottom: 2.25rem;
}

.nav-mega-eyebrow {
    display: block;
    color: #b5c531;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.nav-mega-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .nav-mega-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem 1.25rem;
    }
}

@media (min-width: 1280px) {
    .nav-mega-grid--wide {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

#main-header ~ .nav-mega .nav-mega-item {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    color: #f3f4f6;
    text-transform: none;
    letter-spacing: 0;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
}

#main-header ~ .nav-mega .nav-mega-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(181, 197, 49, 0.25);
    transform: translateY(-1px);
}

.nav-mega-label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #ffffff;
    transition: color 0.2s ease;
}

#main-header ~ .nav-mega .nav-mega-item:hover .nav-mega-label {
    color: #b5c531;
}

.nav-mega-desc {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: rgba(243, 244, 246, 0.65);
    font-weight: 400;
}

/* ==========================================================================
   Mobile-Menu-Accordion (Unterseiten) – via JS injiziert
   ========================================================================== */

#mobile-menu {
    /* Layout anpassen: scrollbar, kein vertical-center */
    justify-content: flex-start !important;
    padding-top: 6rem;
    padding-bottom: 3rem;
    overflow-y: auto;
}

/* Wenn Mobile-Menu offen ist, andere overlay-Elemente verstecken */
body.overflow-hidden .sub-nav,
body.overflow-hidden .nav-mega {
    display: none !important;
}

.mobile-nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 22rem;
}

.mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-nav-toggle:hover {
    color: #ffffff;
}

.mobile-nav-chevron {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.mobile-nav-group.is-open .mobile-nav-chevron {
    transform: rotate(180deg);
}

.mobile-nav-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.mobile-nav-group.is-open .mobile-nav-children {
    max-height: 600px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.mobile-nav-child {
    color: rgba(243, 244, 246, 0.75);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: color 0.15s ease, background-color 0.15s ease;
    text-transform: none;
    letter-spacing: 0;
}

.mobile-nav-child:hover {
    color: #b5c531;
    background-color: rgba(255, 255, 255, 0.06);
}

.mobile-nav-child.mobile-nav-child--overview {
    color: #b5c531;
    font-weight: 600;
}

/* Auf Mobile die Single-Link-Items (ohne Dropdown) etwas kompakter */
#mobile-menu > .mobile-link {
    font-size: 1.75rem;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tab-active {
    background-color: #b5c531; /* brand-accent */
    color: #1e2a5a; /* brand-secondary */
}

/* ==========================================================================
   Animations
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transform: translateY(20px);
}

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

/* ==========================================================================
   Embedded iFrames (HalloPetra-Registrierung, Calendly)
   Großzügig dimensioniert, damit Inhalte nicht abgeschnitten werden
   und intern nicht gescrollt werden muss.
   ========================================================================== */

.embed-frame {
    width: 100%;
    border: 0;
    display: block;
}

/* HalloPetra-Formular: variable Höhe je nach Step. Mobil deutlich höher. */
.embed-frame--form {
    height: 1500px;
}

#registrieren .embed-frame--form {
    max-height: 750px !important;
}

@media (min-width: 768px) {
    .embed-frame--form {
        height: 1250px;
    }
}

/* Calendly: braucht ähnlich Platz für Monatsansicht + Slot-Liste */
.embed-frame--calendly {
    height: 1200px;
}
.Yirv_lcEoJvq0f_H9E0w.XUKnHm8j4G7Hgt84mtar {
    max-height: 1150px !important;
}

#termin .embed-frame--calendly  {
    padding-top: 0px !important;
}

 .bg-white {
    min-width: 100% !important;
    background-color: #e5e6e5 !important;
}

@media (min-width: 768px) {
    .embed-frame--calendly {
        height: 980px;
    }
}

/* ==========================================================================
   Video Aspect Ratio
   ========================================================================== */

.aspect-video-16-9 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.aspect-video-16-9 iframe,
.aspect-video-16-9 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Floating Label Form
   ========================================================================== */

.floating-label-group {
    position: relative;
}

.floating-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    transition: all 0.2s ease-out;
    pointer-events: none;
    color: #9ca3af; /* gray-400 */
}

.floating-input:not(:placeholder-shown) ~ .floating-label,
.floating-input:focus ~ .floating-label {
    top: 0.25rem;
    font-size: 0.75rem;
    color: #b5c531; /* brand-accent */
}

.floating-input:focus {
    outline: none;
    border-color: #b5c531; /* brand-accent */
    box-shadow: 0 0 0 2px rgba(181, 197, 49, 0.4);
}

/* ==========================================================================
   Slider Dots (Testimonial- und Galerie-Slider)
   ========================================================================== */

.slider-dot {
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    transform: scale(1.2);
    opacity: 0.85;
}

.slider-dot.bg-brand-accent {
    transform: scale(1.15);
}

/* ==========================================================================
   Takeaway-, Step-, Resource-, Audio-, Method-Cards
   ========================================================================== */

.takeaway-card {
    position: relative;
    overflow: hidden;
}

.takeaway-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(181, 197, 49, 0.08), transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.takeaway-card:hover::before {
    opacity: 1;
}

.step-item {
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-item:hover {
    transform: translateX(4px);
    border-color: rgba(181, 197, 49, 0.3);
}

.audio-card {
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.audio-card:hover {
    border-color: rgba(181, 197, 49, 0.35);
}

.audio-player {
    color-scheme: dark;
    accent-color: #b5c531;
    height: 44px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.04);
    outline: 1px solid rgba(255, 255, 255, 0.08);
    outline-offset: 0;
    width: 100%;
}

.audio-player:focus-visible {
    outline: 2px solid #b5c531;
    outline-offset: 2px;
}

.audio-player::-webkit-media-controls-panel {
    background-color: transparent;
}

/* Method-Cards (10 Methoden-Seite) */
.method-card {
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.method-card:hover {
    border-color: rgba(181, 197, 49, 0.35);
}

/* Copy-to-clipboard feedback (Rabattcodes etc.) */
.copy-code {
    cursor: pointer;
    user-select: all;
}

.copy-code.is-copied {
    background-color: #ffffff;
    color: #2a3a7b;
}

/* ==========================================================================
   FAQ Accordion (native <details>)
   ========================================================================== */

.faq-card {
    transition: border-color 0.3s ease;
}

.faq-card:hover {
    border-color: rgba(181, 197, 49, 0.25);
}

.faq-card[open] {
    border-color: rgba(181, 197, 49, 0.35);
}

.faq-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.faq-summary::-webkit-details-marker,
.faq-summary::marker {
    display: none;
    content: '';
}

.faq-summary:hover .faq-question {
    color: #b5c531;
}

.faq-question {
    transition: color 0.2s ease;
}

.faq-chevron {
    transition: transform 0.3s ease;
}

.faq-card[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-card[open] .faq-body {
    animation: fade-in 0.4s ease-out;
}

.faq-card[open] .faq-summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Sub-Navigation (Sprungmarken auf Unterseiten)
   ========================================================================== */

.sub-nav {
    position: sticky;
    top: 88px; /* unter Main-Header (py-6 + Logo-Zeile) */
    z-index: 40;
    background-color: rgba(30, 42, 90, 0.92); /* brand-secondary mit Transparenz */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: top 0.3s ease, box-shadow 0.3s ease;
}

/* Schatten zeigt sich nur, wenn die Sub-Nav tatsächlich oben klebt */
body.header-is-sticky .sub-nav {
    top: 87px; /* wenn Main-Header geschrumpft ist */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sub-nav-inner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
}

.sub-nav-inner::-webkit-scrollbar {
    display: none;
}

.sub-nav-link {
    display: inline-block;
    white-space: nowrap;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(243, 244, 246, 0.7);
    transition: color 0.2s ease, background-color 0.2s ease;
    letter-spacing: 0.01em;
}

.sub-nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.sub-nav-link.is-active {
    color: #b5c531; /* brand-accent */
    background-color: rgba(181, 197, 49, 0.12);
}

/* Sub-Nav auf Mobile: kleiner Sticky-Offset, kleinere Pills */
@media (max-width: 767px) {
    .sub-nav {
        top: 72px;
    }
    body.header-is-sticky .sub-nav {
        top: 80px;
    }
    .sub-nav-link {
        font-size: 0.8125rem;
        padding: 0.35rem 0.75rem;
    }
}

/* Hero-Section über der Sub-Nav braucht kein zusätzliches pt-XX,
   da die Sub-Nav nicht mehr fixed über dem Hero schwebt. Das pt-32 (128px)
   reicht knapp für die Main-Nav (~88px) plus etwas Luft. */

/* ==========================================================================
   Back-to-Top Button (global)
   ========================================================================== */

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background-color: rgba(181, 197, 49, 0.92); /* brand-accent */
    color: #2a3a7b; /* brand-primary */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.back-to-top.is-visible {
    opacity: 0.9;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    opacity: 1;
    background-color: #ffffff;
    transform: translateY(-2px);
}

.back-to-top:focus-visible {
    outline: 2px solid #b5c531;
    outline-offset: 3px;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 768px) {
    .back-to-top {
        right: 1.75rem;
        bottom: 1.75rem;
        width: 48px;
        height: 48px;
    }
    .back-to-top svg {
        width: 22px;
        height: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none !important;
    }
}

/* ==========================================================================
   Mobile Menu (Blur-Hintergrund)
   ========================================================================== */

#mobile-menu {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   Reduce Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Formate-Slider (horizontaler Karten-Slider mit zentrierter aktiver Karte)
   verwendet in seiten/wie-anna-vermittelt.html – gesteuert via initFormateSlider() in main.js
   ========================================================================== */

/* Schritt-Indikator über dem Slider (klickbar) */
.formate-step {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: rgba(181, 197, 49, 0.4);
    transition: color 0.3s ease;
}
.formate-step:hover { color: rgba(181, 197, 49, 0.75); }
.formate-step.is-active { color: #b5c531; }

.formate-slider { position: relative; }

/* Track: horizontale Scroll-Leiste mit Snap, Scrollbar versteckt */
.formate-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 0 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.formate-track::-webkit-scrollbar { display: none; }

/* Platzhalter links/rechts, damit erste & letzte Karte mittig stehen können */
.formate-spacer { flex: 0 0 7%; }

/* Karten: nur die aktive ist voll sichtbar & groß, Nachbarn transparent & kleiner */
.formate-card {
    flex: 0 0 86%;
    max-width: 640px;
    scroll-snap-align: center;
    opacity: 0.3;
    transform: scale(0.93);
    transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.3s ease;
    will-change: opacity, transform;
}
.formate-card.is-active {
    opacity: 1;
    transform: scale(1);
    border-color: rgba(181, 197, 49, 0.5);
}

@media (min-width: 768px) {
    .formate-card { flex-basis: 58%; }
    .formate-spacer { flex-basis: 21%; }
}

/* Weicher Verlauf an den Rändern (Karten faden in den Hintergrund) */
.formate-slider::before,
.formate-slider::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12%;
    z-index: 2;
    pointer-events: none;
}
.formate-slider::before { left: 0; background: linear-gradient(to right, #1e2a5a, rgba(30, 42, 90, 0)); }
.formate-slider::after { right: 0; background: linear-gradient(to left, #1e2a5a, rgba(30, 42, 90, 0)); }

/* Navigationspfeile */
.formate-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: #b5c531;
    color: #1e2a5a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: background 0.25s ease, opacity 0.25s ease;
}
.formate-nav:hover { background: #ffffff; }
.formate-prev { left: 0; }
.formate-next { right: 0; }
.formate-nav:disabled { opacity: 0; pointer-events: none; }
@media (min-width: 768px) {
    .formate-prev { left: -0.5rem; }
    .formate-next { right: -0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .formate-track { scroll-behavior: auto; }
    .formate-card { transition: opacity 0.2s ease, border-color 0.2s ease; transform: none; }
    .formate-card.is-active { transform: none; }
}

/* ==========================================================================
   Ergebnis-Beispiele (KI-Status-quo-Analyse): animierte Balken-Diagramme
   ========================================================================== */
.sq-row { margin-bottom: 0.85rem; }
.sq-row:last-child { margin-bottom: 0; }
.sq-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.sq-row-label { font-size: 0.85rem; color: #e5e7eb; }
.sq-row-val { font-size: 0.8rem; font-weight: 800; color: #b5c531; flex: 0 0 auto; }
.sq-bar {
    height: 0.55rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.sq-bar-fill {
    display: block;
    height: 100%;
    border-radius: 9999px;
    background: #b5c531;
    width: 0;
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.sq-bar-fill--muted { background: rgba(181, 197, 49, 0.4); }
.animate-on-scroll.is-visible .sq-bar-fill { width: var(--w, 0%); }

@media (prefers-reduced-motion: reduce) {
    .sq-bar-fill { transition: none; }
}
