/*
 * Child Theme – Design Token Overrides
 *
 * Override the parent theme's visual identity here.
 * Uncomment and change only what you need — everything else
 * inherits from the parent automatically.
 *
 * No build step needed — just edit and save.
 *
 * Full token reference: see parent theme's src/css/app.css
 */

:root {
    /* ==========================================================
     * COLORS — CABA Vertriebsberatung
     *
     * Palette:
     * Main Blue:      #274F7E  → Primary (Hauptblau, Buttons, Links)
     * Maya Blue:      #6cc7ff  → Akzent (Light-Varianten, Highlights)
     * White:          #ffffff  → Hintergrund
     * Charcoal Blue:  #2b3b4c  → Text
     * Ultrasonic Blue: #151fe2  → Secondary (alternatives Blau)
     * ========================================================== */

    /* Primary — Main Blue */
    --color-primary: #274F7E;
    --color-primary-hover: #1d3d63;
    --color-primary-light: #e4eef7;

    /* Secondary — Ultrasonic Blue */
    --color-secondary: #151fe2;
    --color-secondary-hover: #1018b3;

    /* Akzent — Hellgrün (sparsam: Subtitles + Bilder-Offset-Frame im Clesk-Stil) */
    --color-accent: #7CB342;        /* Material Light Green 600 */
    --color-accent-frame: #C5E1A5;  /* Material Light Green 200 */

    /* Text — Charcoal Blue */
    --color-heading: #274F7E;
    --color-text: #2b3b4c;
    --color-text-muted: #5a6a7a;
    --color-text-light: #8a97a4;

    /* Backgrounds & surfaces */
    --color-background: #ffffff;
    --color-surface: #f5f8fb;
    --color-surface-dark: #eaf0f6;
    --color-border: #d4dde6;

    /* Status colors */
    /* --color-success: #10b981; */
    /* --color-warning: #f59e0b; */
    /* --color-error: #ef4444; */

    /* ==========================================================
     * TYPOGRAPHY
     * ========================================================== */

    /* Font families — using parent theme default (Inter) */
    /* --font-heading: 'Inter', system-ui, sans-serif; */
    /* --font-body: 'Inter', system-ui, sans-serif; */
    /* --font-mono: 'JetBrains Mono', monospace; */

    /* Font sizes — controls the global type scale
     * Components use these via Tailwind classes (text-sm, text-lg, etc.)
     * and via the clesk-heading-1/2/3 utility classes */
    /* --font-size-xs: 0.75rem; */    /* 12px — badges, fine print */
    /* --font-size-sm: 0.875rem; */   /* 14px — card text, meta, small UI */
    /* --font-size-base: 1rem; */     /* 16px — body text default */
    /* --font-size-lg: 1.125rem; */   /* 18px — lead paragraphs, subheadlines */
    /* --font-size-xl: 1.25rem; */    /* 20px — small headings */
    /* --font-size-2xl: 1.5rem; */    /* 24px — card headings */
    /* --font-size-3xl: 1.875rem; */  /* 30px — section headings (mobile) */
    /* --font-size-4xl: 2.25rem; */   /* 36px — section headings (desktop) */
    /* --font-size-5xl: 3rem; */      /* 48px — hero headings */

    /* ==========================================================
     * SPACING & LAYOUT
     * ========================================================== */

    /* Section vertical padding — controls whitespace between page sections */
    /* --section-padding-y: 4rem; */      /* 64px — mobile */
    /* --section-padding-y-lg: 6rem; */   /* 96px — desktop (lg breakpoint) */

    /* Container — max content width and horizontal padding */
    /* --container-max-width: 85rem; */   /* 1360px */
    /* --container-padding-x: 1rem; */    /* 16px (sm:24px lg:32px via Tailwind) */

    /* ==========================================================
     * BORDER RADIUS
     * ========================================================== */

    /* Controls roundness of all elements globally
     * Set all to 0 for a sharp, corporate look
     * Set --radius-lg to 1.5rem for a softer, modern feel */
    /* --radius-sm: 0.25rem; */   /* 4px — badges, tags, small pills */
    /* --radius-md: 0.5rem; */    /* 8px — inputs, small cards, dropdowns */
    /* --radius-lg: 0.75rem; */   /* 12px — cards, modals, feature blocks */
    /* --radius-xl: 1rem; */      /* 16px — large cards, hero images */
    /* --radius-full: 9999px; */  /* Fully round — avatars, pill buttons */

    /* ==========================================================
     * SHADOWS
     * ========================================================== */

    /* --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); */       /* Subtle — inputs, small cards */
    /* --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1); */      /* Medium — card hover states */
    /* --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1); */    /* High — dropdowns, mega menu */
    /* --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1); */    /* Highest — modals, overlays */

    /* ==========================================================
     * TRANSITIONS
     * ========================================================== */

    /* --transition-fast: 150ms ease; */    /* Hover color changes, micro-interactions */
    /* --transition-normal: 200ms ease; */  /* Card hover, link transitions */
    /* --transition-slow: 300ms ease; */    /* Dropdown open, larger animations */
}

/* ==========================================================
 * CUSTOM STYLES
 *
 * Add project-specific CSS below. You can:
 * - Override component styles (use higher specificity or !important sparingly)
 * - Add new utility classes
 * - Style custom post type templates
 *
 * All Tailwind utilities from the parent theme are available.
 * ========================================================== */

/* CF7 Submit Button */
.wpcf7 input[type="submit"] {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--color-primary);
    color: #ffffff;
    font-weight: 600;
    font-size: var(--font-size-base, 1rem);
    border: none;
    border-radius: var(--radius-md, 0.5rem);
    cursor: pointer;
    transition: background-color var(--transition-normal, 200ms ease);
}

.wpcf7 input[type="submit"]:hover {
    background-color: var(--color-primary-hover);
}

/* Lucide SVG Icons in Feature-Karten einfärben (currentColor funktioniert nicht in <img>) */
/* Filter erzeugt ca. #274F7E (--color-primary) aus schwarzem stroke */
.clesk-features img[src$=".svg"] {
    filter: invert(27%) sepia(30%) saturate(1200%) hue-rotate(178deg) brightness(90%) contrast(90%);
}

/* Text + Image: Inhalt oben bündig statt vertikal zentriert */
.clesk-text-image .grid {
    align-items: start;
}

/* Transparent Header: Menüpunkte auf hellem Hero-Hintergrund lesbar */
.clesk-header--transparent:not(.clesk-header--scrolled) .clesk-desktop-menu .clesk-menu-item > a {
    color: var(--color-heading);
}
.clesk-header--transparent:not(.clesk-header--scrolled) .clesk-desktop-menu .clesk-menu-item > a:hover {
    color: var(--color-primary);
    background-color: rgba(39, 79, 126, 0.08);
}

/* Transparent Header: Erste Hero-Section bekommt extra Top-Padding,
   damit der fixed Header die H1 nicht überdeckt */
body:has(.clesk-header--transparent) .clesk-hero--centered,
body:has(.clesk-header--transparent) .clesk-hero--left-aligned,
body:has(.clesk-header--transparent) .clesk-hero--carousel,
body:has(.clesk-header--transparent) .clesk-hero--video-play {
    padding-top: 8rem; /* 128px (64px Header + 64px Atemraum) */
}

@media (min-width: 1024px) {
    body:has(.clesk-header--transparent) .clesk-hero--centered,
    body:has(.clesk-header--transparent) .clesk-hero--left-aligned,
    body:has(.clesk-header--transparent) .clesk-hero--carousel,
    body:has(.clesk-header--transparent) .clesk-hero--video-play {
        padding-top: 10rem; /* 160px */
    }
}

/* Grüner Offset-Frame für alle Content-Bilder/Videos (Clesk-Stil) */
.clesk-section :is(img, video, iframe) {
    box-shadow: 6px 6px 0 0 var(--color-accent-frame);
    border-radius: var(--radius-xl, 1rem);
}

/* Ausnahmen: Header-Logo, SVG-Icons, Feature-Icons, Logo-Cloud-Partnerlogos */
.custom-logo,
.clesk-section img[src$=".svg"],
.clesk-features :is(img, video, iframe),
.clesk-logo-cloud :is(img, video, iframe) {
    box-shadow: none;
    border-radius: 0;
}

/* Subtitles in Akzent-Grün (Hero + Section-Headlines) */
.clesk-hero h1 + p,
h2.clesk-heading-2 + p {
    color: var(--color-accent) !important;
    font-weight: 400;
}

/* ==========================================================
 * HERO – kräftigere Inszenierung (Clesk-Frame-Stil als Deko)
 * ========================================================== */
.clesk-hero--centered {
    background: linear-gradient(180deg, #fff4ec 0%, var(--color-surface, #f5f8fb) 70%) !important;
    position: relative;
    overflow: hidden;
}

/* Startseite: Hero deutlich größer (echter Hero) */
.home .clesk-hero--centered {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-block: 6rem !important;
}
.home .clesk-hero--centered .clesk-heading-1 {
    font-size: clamp(2.75rem, 5.5vw, 4.5rem);
    line-height: 1.05;
}
.home .clesk-hero--centered h1 + p {
    font-size: clamp(1.125rem, 1.6vw, 1.5rem);
    margin-top: 1.5rem;
}

/* ==========================================================
 * CABA HERO ASSEMBLY – Logo-Puzzle-Animation
 *
 * Phase 1: Globe baut sich MITTIG zusammen (absolute center)
 * Phase 2: Globe GLEITET sanft nach links, Content fadet rechts ein
 * ========================================================== */
.caba-hero-assembly {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;  /* Verhindert Flex-Shrink innerhalb der Section */
    min-width: 0;
    min-height: 50vh;
}

/* Globe: startet mittig (absolute, zentriert) */
.caba-hero-assembly__globe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Sanftes Gleiten nach links */
    transition: left 1.2s cubic-bezier(.55, .02, .25, 1.1),
                transform 1.2s cubic-bezier(.55, .02, .25, 1.1);
}

/* Phase 2: Globe gleitet nach links (responsive calc) */
.caba-hero-assembly.is-settled .caba-hero-assembly__globe {
    left: clamp(120px, 22%, 320px);
}

/* Content: initial unsichtbar, rechte Hälfte */
.caba-hero-assembly__content {
    position: relative;
    z-index: 1;
    width: 55%;
    margin-left: auto;
    padding-left: 1rem;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.34, 1.2, .64, 1);
}

/* Phase 2: Content sichtbar */
.caba-hero-assembly.is-settled .caba-hero-assembly__content {
    opacity: 1;
    transform: translateX(0);
}

.caba-hero-assembly__svg {
    width: clamp(260px, 30vw, 400px);
    height: clamp(260px, 30vw, 400px);
}
.caba-hero-assembly__svg svg {
    width: 100%;
    height: 100%;
}
.caba-hero-assembly__svg svg path {
    fill: var(--color-primary, #274F7E);
    transform-box: fill-box;
    transform-origin: center center;
}

/* Mobile: Stack */
@media (max-width: 1023px) {
    .caba-hero-assembly {
        flex-direction: column;
        min-height: auto;
    }
    .caba-hero-assembly__globe {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        transition: transform 1s ease;
        margin-bottom: 2rem;
    }
    .caba-hero-assembly.is-settled .caba-hero-assembly__globe {
        left: auto;
        transform: scale(0.75);
    }
    .caba-hero-assembly__content {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        text-align: center;
    }
    .caba-hero-assembly__svg {
        width: 220px;
        height: 220px;
    }
}

/* Zwei dekorative, gerundete Akzent-Blöcke in den Ecken */
.clesk-hero--centered::before,
.clesk-hero--centered::after {
    content: "";
    position: absolute;
    border-radius: var(--radius-xl, 1rem);
    background: var(--color-accent-frame);
    pointer-events: none;
    z-index: 0;
}
.clesk-hero--centered::before {
    width: 280px;
    height: 280px;
    top: -90px;
    left: -110px;
    transform: rotate(-14deg);
    background: var(--color-accent-frame);
    opacity: 0.6;
}
.clesk-hero--centered::after {
    width: 320px;
    height: 320px;
    bottom: -130px;
    right: -130px;
    transform: rotate(10deg);
    background: var(--color-accent-frame);
    opacity: 0.55;
}

/* Inhalt über die Deko legen + volle Breite erzwingen (Flex-Shrink-Bug bei kurzen Texten verhindern) */
.clesk-hero--centered > .max-w-\[85rem\],
.clesk-hero--centered > div {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Akzent-Strich unter der Hero-Headline — deaktiviert */

/* ==========================================================
 * CABA GLOBE – Hintergrund-Element + Scroll-FAB
 *
 * Initial: riesiger, fast unsichtbarer Globus mittig, atmet leicht.
 * Beim Scrollen → schrumpft, wandert nach rechts unten, wird voll farbig
 * und klickbar (Tooltip on hover, Link zur Kontaktseite).
 *
 * Outer-Layer .caba-globe trägt Position/Größe (transform).
 * Inner-Layer .caba-globe__inner trägt das Hintergrundbild + die Rotation
 * (so dass die beiden Animationen sich nicht gegenseitig überschreiben).
 * ========================================================== */
.caba-globe {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    text-decoration: none;
    /* Initial: rechts unten versteckt, damit beim Scrollen der FAB nur "reinfährt" */
    top: calc(100vh - 88px);
    left: calc(100vw - 88px);
    width: 64px;
    height: 64px;
    transform: translate(120px, 120px) rotate(-180deg) scale(0.4);
    transform-origin: center center;
    opacity: 0;
    /* "Fly in"-Animation */
    transition:
        transform 1.1s cubic-bezier(.55, .02, .25, 1.15),
        opacity 0.7s ease;
}

.caba-globe__inner {
    position: absolute;
    inset: 0;
    transform-origin: center center;
    animation: caba-globe-rotate 180s linear infinite;
    transition: opacity 0.7s ease;
    will-change: transform, opacity;
}

/* Initial-Layer: Linien in CABA-Blau via SVG-Mask */
.caba-globe__inner--lines {
    -webkit-mask-image: url("assets/caba-globe.svg");
            mask-image: url("assets/caba-globe.svg");
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
    background-color: var(--color-primary, #274F7E);
    opacity: 1;
}

/* FAB-Layer: das echte gefüllte Logo, unverändert */
.caba-globe__inner--filled {
    background-image: url("assets/caba-globe-filled.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0;
    transition: opacity 0.4s ease, background-image 0s;
}

/* Über dunklem Hintergrund (z. B. CTA-Section): weiße Variante */
.caba-globe.is-on-dark .caba-globe__inner--filled {
    background-image: url("assets/caba-globe-filled-white.svg");
}

/* Crossfade zwischen den beiden Layern */
.caba-globe-scrolled .caba-globe__inner--lines { opacity: 0; }
.caba-globe-scrolled .caba-globe__inner--filled { opacity: 1; }

.caba-globe {
    animation: caba-globe-breathe 14s ease-in-out infinite;
}

@keyframes caba-globe-breathe {
    0%, 100% { opacity: 0.04; }
    50%      { opacity: 0.07; }
}

@keyframes caba-globe-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* === Scroll-Zustand: kleiner, rechts unten, echtes Logo, klickbar === */
.caba-globe-scrolled .caba-globe {
    /* Ziel-Position: rechts unten, als top/left-Werte damit top/left sauber interpolieren */
    top: calc(100vh - 88px);  /* 24px Abstand + 64px Größe */
    left: calc(100vw - 88px);
    width: 64px;
    height: 64px;
    /* Mini-Spin während Travel (rotate 360° ist der "Cool"-Effekt) */
    transform: translate(0, 0) rotate(360deg);
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    clip-path: none;
    animation: none;
    filter: drop-shadow(0 8px 20px rgba(39, 79, 126, 0.35));
    /* Über Videos/Bilder (z 10000), damit Tooltip nicht dahinter verschwindet */
    z-index: 100000;
}
.caba-globe-scrolled .caba-globe .caba-globe__inner {
    /* In der Ecke etwas schneller drehen */
    animation: caba-globe-rotate 45s linear infinite;
}
.caba-globe-scrolled .caba-globe:hover {
    transform: translate(0, 0) rotate(360deg) scale(1.1);
}

/* === Tooltip === */
.caba-globe__tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: var(--color-primary, #274F7E);
    color: #ffffff;
    padding: 0.6rem 0.95rem;
    border-radius: var(--radius-md, 0.5rem);
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    box-shadow: 0 6px 18px rgba(39, 79, 126, 0.25);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.caba-globe__tooltip::after {
    /* kleines Dreieck nach unten */
    content: "";
    position: absolute;
    top: 100%;
    right: 32px;
    border: 6px solid transparent;
    border-top-color: var(--color-primary, #274F7E);
}
.caba-globe-scrolled .caba-globe:hover .caba-globe__tooltip {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .caba-globe__inner { animation: none; }
    .caba-globe { transition: opacity 0.4s ease; }
}

/* FAB ausblenden wenn der Footer im Viewport ist,
   damit Social Icons / Copyright nicht überdeckt werden */
.caba-globe-footer-visible .caba-globe {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Header: z-index für sticky nav (Tailwind z-50 reicht, kein Override mehr nötig) */
