/* Roboterservice Theme — Global Styles 2026 (Apple/GoPro Level) */

/* ============================================================
   1. CONTAINER SYSTEM + CUSTOM PROPERTIES
   ============================================================ */

:root {
    --width-content: 1280px;
    --width-text:    720px;
    --width-wide:    1440px;
    --padding-x:     clamp(1.5rem, 5vw, 4rem);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --primary-rgb: 26, 86, 219;
    --accent-rgb: 0, 168, 120;
    --dark-rgb: 26, 26, 46;
}

.container {
    width: 100%;
    max-width: var(--width-content);
    margin-inline: auto;
    padding-inline: var(--padding-x);
}

.container--wide {
    width: 100%;
    max-width: var(--width-wide);
    margin-inline: auto;
    padding-inline: var(--padding-x);
}

.container--text {
    width: 100%;
    max-width: var(--width-text);
    margin-inline: auto;
    padding-inline: var(--padding-x);
}

/* ============================================================
   2. SECTION SPACING
   ============================================================ */

.wp-block-group.alignfull {
    padding-top: clamp(3rem, 8vw, 6rem);
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

.section-padding {
    padding-top:    clamp(5rem, 12vw, 10rem) !important;
    padding-bottom: clamp(5rem, 12vw, 10rem) !important;
}

.section-padding-sm {
    padding-top:    clamp(3rem, 6vw, 5rem) !important;
    padding-bottom: clamp(3rem, 6vw, 5rem) !important;
}

.wp-block-cover.alignfull {
    min-height: 85vh;
}

/* ============================================================
   3. SCROLL-REVEAL (2026 — smoother, scale + blur entrance)
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(3rem) scale(0.98);
    filter: blur(4px);
    transition:
        opacity   0.9s var(--ease-out-expo),
        transform 0.9s var(--ease-out-expo),
        filter    0.9s var(--ease-out-expo);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Reveal from left/right for split layouts */
.reveal-left {
    opacity: 0;
    transform: translateX(-3rem);
    filter: blur(4px);
    transition:
        opacity   0.9s var(--ease-out-expo),
        transform 0.9s var(--ease-out-expo),
        filter    0.9s var(--ease-out-expo);
}
.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(3rem);
    filter: blur(4px);
    transition:
        opacity   0.9s var(--ease-out-expo),
        transform 0.9s var(--ease-out-expo),
        filter    0.9s var(--ease-out-expo);
}
.reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(2rem) scale(0.97);
    filter: blur(3px);
    transition:
        opacity   0.8s var(--ease-out-expo),
        transform 0.8s var(--ease-out-expo),
        filter    0.8s var(--ease-out-expo);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay:   0ms; opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 120ms; opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 240ms; opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 360ms; opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 480ms; opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 600ms; opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}

/* ============================================================
   4. CARDS (2026 — glass morphism subtle, glow on hover)
   ============================================================ */

.card {
    background:    var(--wp--preset--color--white);
    border-radius: 1.25rem;
    padding:       2.5rem 2rem;
    border:        1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0  1px  2px rgba(0, 0, 0, 0.03),
        0  4px 16px rgba(0, 0, 0, 0.04);
    transition:
        transform  0.6s var(--ease-out-expo),
        box-shadow 0.6s var(--ease-out-expo),
        border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.card:hover {
    transform:  translateY(-6px);
    border-color: rgba(var(--primary-rgb), 0.15);
    box-shadow:
        0  1px  2px rgba(0, 0, 0, 0.03),
        0 16px 48px rgba(var(--primary-rgb), 0.12),
        0  4px 12px rgba(0, 0, 0, 0.06);
}

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

.service-icon-img { margin-bottom: 0.75rem !important; }
.service-icon-img img { width: 48px; height: auto; }

/* ============================================================
   5. BUTTONS (2026 — pill, glow, micro-interaction)
   ============================================================ */

.wp-block-button__link,
.wp-element-button {
    border-radius:  100px !important;
    font-weight:    600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position:       relative;
    transition:
        background 0.3s ease,
        transform  0.4s var(--ease-out-expo),
        box-shadow 0.4s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    transform:  translateY(-2px);
    box-shadow:
        0  4px 12px rgba(var(--primary-rgb), 0.25),
        0 12px 32px rgba(var(--primary-rgb), 0.2);
}

.wp-block-button__link:active,
.wp-element-button:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    border:     2px solid var(--wp--preset--color--primary);
    color:      var(--wp--preset--color--primary);
    background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--wp--preset--color--primary);
    color:      var(--wp--preset--color--white);
    box-shadow:
        0  4px 12px rgba(var(--primary-rgb), 0.25),
        0 12px 32px rgba(var(--primary-rgb), 0.2);
}

/* Accent buttons get teal glow */
.has-accent-background-color.wp-block-button__link:hover,
.wp-block-button__link.has-accent-background-color:hover {
    box-shadow:
        0  4px 12px rgba(var(--accent-rgb), 0.3),
        0 12px 32px rgba(var(--accent-rgb), 0.2);
}

/* Inverted buttons on primary bg */
.has-primary-background-color .wp-block-button__link {
    border-radius: 100px !important;
}

.has-primary-background-color .wp-block-button__link:hover {
    box-shadow:
        0  4px 12px rgba(255, 255, 255, 0.3),
        0 12px 32px rgba(255, 255, 255, 0.15);
}

/* ============================================================
   6. NAVIGATION (sticky, blur, Apple-style)
   ============================================================ */

.wp-block-group[style*="position:sticky"],
.wp-block-group[style*="position: sticky"] {
    backdrop-filter:         blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background:              rgba(255, 255, 255, 0.85) !important;
    z-index:                 100;
    border-bottom:           1px solid rgba(0, 0, 0, 0.08);
    transition:              box-shadow 0.3s ease;
}

.wp-block-group[style*="position:sticky"].scrolled,
.wp-block-group[style*="position: sticky"].scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.has-topbar-background-color { z-index: 101; }

.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-submenu__content {
    background:    var(--wp--preset--color--white);
    border:        1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    padding:       0.5rem 0;
    box-shadow:
        0  4px 16px rgba(0, 0, 0, 0.08),
        0 16px 40px rgba(0, 0, 0, 0.06);
    min-width: 220px;
}

.wp-block-navigation .wp-block-navigation-submenu__content .wp-block-navigation-item__content {
    padding:    0.5rem 1.25rem;
    display:    block;
    transition: background 0.2s ease, color 0.2s ease;
}

.wp-block-navigation .wp-block-navigation-submenu__content .wp-block-navigation-item__content:hover {
    background: var(--wp--preset--color--surface);
    color:      var(--wp--preset--color--primary);
}

/* ============================================================
   7. STATS (2026 — counter animation ready, gradient text)
   ============================================================ */

.stat-number {
    font-size:      clamp(2.5rem, 5vw, 4rem);
    font-weight:    800;
    letter-spacing: -0.04em;
    line-height:    1;
    background:     linear-gradient(135deg, var(--wp--preset--color--primary), #4f8aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   8. HERO SECTION (2026 — deep dark gradient, blue glow)
   ============================================================ */

.wp-block-group.hero-section,
.wp-block-group.hero-section.alignfull,
.wp-block-group.hero-section.has-global-padding {
    background:
        radial-gradient(ellipse 500px 325px at 50% 45%, rgba(30,64,175,0.41) 0%, transparent 70%),
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.008) 40px, rgba(255,255,255,0.008) 41px),
        linear-gradient(170deg, #0c4a79 0%, #000105 50%, #545659 100%) !important;
    min-height: 600px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 24px rgba(0,0,0,0.4);
    animation: heroEntrance 1.2s var(--ease-out-expo) both;
}

.hero-section .has-white-color,
.hero-section .has-text-color,
.hero-section h1,
.hero-section p {
    color: #ffffff !important;
}

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(2rem);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@media (max-width: 768px) {
    .hero-section {
        background:
            radial-gradient(ellipse 300px 200px at 50% 40%, rgba(30,64,175,0.35) 0%, transparent 70%),
            linear-gradient(170deg, #0c4a79 0%, #000105 50%, #545659 100%) !important;
        min-height: 480px;
    }
}

/* ============================================================
   9. IMAGES
   ============================================================ */

.wp-block-image:not(.site-logo):not(.trust-bar .wp-block-image) img {
    border-radius: 1rem;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-block-image a:hover img {
    transform: scale(1.03);
}

.img-hero {
    border-radius: 1.5rem;
    overflow:      hidden;
    display:       block;
}

.img-hero img {
    width:      100%;
    height:     auto;
    display:    block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-hero:hover img {
    transform: scale(1.03);
}

.wp-block-gallery .wp-block-image img {
    border-radius: 0.75rem;
    transition:    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-block-gallery .wp-block-image:hover img {
    transform: scale(1.02);
}

/* ============================================================
   10. SECTION DIVIDER
   ============================================================ */

.section-divider {
    height:     1px;
    border:     none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.1) 70%,
        transparent 100%
    );
    margin: 0;
}

/* ============================================================
   11. SMOOTH SCROLL + SELECTION + SOCIAL LINKS
   ============================================================ */

html {
    scroll-behavior: smooth;
    overflow-wrap: break-word;
    word-break: break-word;
}

.wp-block-heading {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

::selection {
    background: var(--wp--preset--color--primary);
    color:      var(--wp--preset--color--white);
}

.wp-block-social-links.is-style-logos-only .wp-block-social-link {
    transition:
        opacity   0.3s ease,
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-block-social-links.is-style-logos-only .wp-block-social-link:hover {
    opacity:   0.7;
    transform: translateY(-2px);
}

/* ============================================================
   12. PRIMARY SECTION RULES (2026 — gradient bg, glow)
   ============================================================ */

.has-primary-background-color {
    background: linear-gradient(135deg, #1a56db 0%, #2563eb 50%, #1e40af 100%) !important;
    position: relative;
}

.has-primary-background-color .wp-block-heading,
.has-primary-background-color p,
.has-primary-background-color li {
    color: var(--wp--preset--color--white) !important;
}

.has-primary-background-color .wp-block-button__link {
    background: var(--wp--preset--color--white) !important;
    color:      var(--wp--preset--color--primary) !important;
}

/* ============================================================
   12b. ACCENT SECTION RULES
   ============================================================ */

.has-accent-background-color .wp-block-heading,
.has-accent-background-color p,
.has-accent-background-color li {
    color: var(--wp--preset--color--white) !important;
}

/* ============================================================
   13. GRID UTILITIES
   ============================================================ */

.grid-2 {
    display:               grid;
    grid-template-columns: repeat(2, 1fr);
    gap:                   var(--wp--preset--spacing--40, 2rem);
}

.grid-3 {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   var(--wp--preset--spacing--40, 2rem);
}

.grid-4 {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   var(--wp--preset--spacing--40, 2rem);
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3,
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   14. TRUST / LOGO BAR
   ============================================================ */

.trust-bar .wp-block-group {
    gap:         2rem !important;
    align-items: center;
}

.trust-bar .wp-block-image {
    margin: 0 !important;
}

.trust-bar .wp-block-image img {
    filter:     grayscale(1) opacity(0.4);
    transition: filter 0.3s ease;
    max-height: 35px;
    width:      auto !important;
    object-fit: contain;
}

.trust-bar .wp-block-image img:hover {
    filter: grayscale(0) opacity(1);
}

/* ============================================================
   15. MODERN LINK STYLES (2026 — animated underlines)
   ============================================================ */

/* "MEHR ERFAHREN" text links in cards */
.card a:not(.wp-block-button__link) {
    text-decoration: none;
    position: relative;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8125rem;
    color: var(--wp--preset--color--primary);
    transition: color 0.3s ease;
}

.card a:not(.wp-block-button__link)::after {
    content: ' →';
    display: inline-block;
    transition: transform 0.3s var(--ease-out-expo);
}

.card a:not(.wp-block-button__link):hover::after {
    transform: translateX(4px);
}

/* ============================================================
   16. SECTION TRANSITIONS (smooth BG changes)
   ============================================================ */

.wp-block-group.alignfull {
    position: relative;
}

/* Subtle top gradient on surface sections for depth */
.has-surface-background-color.alignfull::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(0,0,0,0.04) 50%, transparent 90%);
    pointer-events: none;
}

/* ============================================================
   17. FAQ STYLES (2026 — clean, scannable)
   ============================================================ */

/* FAQ questions get subtle left accent border */
.wp-block-group.alignfull .wp-block-heading[class*="large-font-size"] + .has-muted-color {
    padding-left: 1.25rem;
    border-left: 3px solid rgba(var(--primary-rgb), 0.15);
    margin-left: 0;
}

/* ============================================================
   18. TOPBAR REFINEMENTS
   ============================================================ */

.has-topbar-background-color {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    letter-spacing: 0.01em;
}

/* ============================================================
   19. FOOTER REFINEMENTS
   ============================================================ */

.has-dark-background-color {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1e 100%) !important;
}

/* ============================================================
   20. FOCUS STATES (accessibility)
   ============================================================ */

.wp-block-button__link:focus-visible,
.wp-element-button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--wp--preset--color--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================================
   21. CROSS-LINK SECTION (brand switching)
   ============================================================ */

.cross-links {
    text-align: center;
    padding-top: var(--wp--preset--spacing--40);
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: var(--wp--preset--spacing--50);
}

.cross-links a {
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
