/*
 * Kfz-Gutachter Rabe — Custom Homepage
 * Modelled after excellent-unfallgutachten.de
 * Font: Prompt | Primary: #0091dc | Navy: #1c2e4b
 */

/* ── Root variables ──────────────────────────────────────────────────────── */
:root {
    --rh-primary:  #0091dc;
    --rh-navy:     #1c2e4b;
    --rh-bg:       #ffffff;
    --rh-alt-bg:   #f4f7fb;
    --rh-text:     #333c4e;
    --rh-muted:    #6b7a99;
    --rh-border:   #e4eaf3;
    --rh-radius:   8px;
    --rh-shadow:   0 4px 28px rgba(28,46,75,.10);
    --rh-shadow-lg:0 8px 40px rgba(28,46,75,.15);
}

/* ── Section scroll margin (compensates for sticky header) ──────────────── */
#rh-hero, #rabe-services, #rh-steps, #rh-contact {
    scroll-margin-top: var(--rh-scroll-offset, 80px);
}

/* ── Prompt font on the whole custom page ────────────────────────────────── */
.rh-page,
.rh-page h1, .rh-page h2, .rh-page h3, .rh-page h4,
.rh-page p,  .rh-page li, .rh-page a,
.rh-page input, .rh-page select, .rh-page textarea, .rh-page button,
.rh-page .rabe-section-title, .rh-page .rabe-section-sub,
.rh-page .rabe-card-title-bar span, .rh-page .rabe-card-text {
    font-family: 'Prompt', Arial, sans-serif;
}

/* ── Container ───────────────────────────────────────────────────────────── */
.rh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Section header ──────────────────────────────────────────────────────── */
.rh-section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.rh-section-header h2 {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--rh-navy);
    margin: 0 0 0.6rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.rh-section-header p {
    font-size: var(--steps-sub, 1.05rem);
    color: var(--rh-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}
/* Accent line under section heading */
.rh-section-header h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--rh-primary);
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════════════ */
.rh-hero {
    position: relative;
    overflow: hidden;          /* clips the crop-extended background image */
    min-height: 88vh;
}

/* Background image – absolutely fills hero, extends beyond edges for crop */
.rh-hero-bg {
    position: absolute;
    /* Negative offsets push image beyond the hero edge; overflow:hidden clips it.
       Values come from config ui.hero_crop (plain numbers = %) */
    top:    calc(var(--hc-t, 0) * -1%);
    bottom: calc(var(--hc-b, 0) * -1%);
    left:   calc(var(--hc-l, 0) * -1%);
    right:  calc(var(--hc-r, 0) * -1%);
    width:  calc(100% + var(--hc-l, 0) * 1% + var(--hc-r, 0) * 1%);
    height: calc(100% + var(--hc-t, 0) * 1% + var(--hc-b, 0) * 1%);
    object-fit: cover;
    z-index: 0;
}

/* Directional overlay: dark navy left → transparent right (car photo shows) */
.rh-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        100deg,
        rgba(15, 26, 55, 0.97) 0%,
        rgba(15, 26, 55, 0.94) 35%,
        rgba(15, 26, 55, 0.75) 52%,
        rgba(15, 26, 55, 0.35) 68%,
        rgba(15, 26, 55, 0.08) 82%,
        transparent 100%
    );
}

/* Text box – positioned by config ui.hero_box (left/top/width as %)  */
.rh-hero-inner {
    position: absolute;
    left:  calc(var(--hbox-l, 5)  * 1%);
    top:   calc(var(--hbox-t, 15) * 1%);
    width: calc(var(--hbox-w, 58) * 1%);
    padding: 0 1rem;   /* inner breathing room so text never touches the edge */
    z-index: 2;
    box-sizing: border-box;
}

/* Kicker label */
.rh-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 145, 220, 0.18);
    color: #a8d4f0;
    font-size: var(--hf-label, 0.78rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.45em 1em;
    border-radius: 2rem;
    border: 1px solid rgba(0, 145, 220, 0.35);
    margin-bottom: 1.4rem;
}
.rh-hero-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rh-primary);
    flex-shrink: 0;
}

.rh-hero h1 {
    font-size: var(--hf-title, 3.2rem);
    font-weight: var(--h1-weight, 700);
    color: #fff;
    line-height: 1.13;
    margin: 0 0 1.1rem;
    letter-spacing: -0.02em;
    -webkit-text-stroke: var(--h1-stroke, 0 transparent);
    paint-order: stroke fill;
}
/* The key accent word */
.rh-hero h1 strong {
    color: var(--rh-primary);
    font-weight: 700;
}

.rh-hero-sub {
    font-size: var(--hf-sub, 1.1rem);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.72;
    margin: 0 0 1.75rem;
    max-width: 520px;
}

/* Checklist */
.rh-hero-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5em;
    display: flex;
    flex-direction: column;
    gap: 0.45em;
}
.rh-hero-list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: var(--hf-list, 0.97rem);
    line-height: 1.5;
}
.rh-hero-list li::before {
    content: '\f00c';   /* fa-check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75em;
    color: var(--rh-primary);
    background: rgba(0, 145, 220, 0.18);
    border: 1px solid rgba(0, 145, 220, 0.35);
    border-radius: 50%;
    width: 1.375em;
    height: 1.375em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Contact section call button font size */
.rh-contact-info > .rh-btn {
    font-size: var(--contact-btn, 0.97rem);
}

/* CTA buttons */
.rh-hero-btns {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}
/* Hero buttons use their own font var */
.rh-hero .rh-btn {
    font-size: var(--hf-btn, 0.97rem);
    padding: 0.9em 1.8em;
}

.rh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.8rem;
    border-radius: var(--rh-radius);
    font-family: 'Prompt', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.97rem;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
    cursor: pointer;
    border: none;
    line-height: 1.2;
    white-space: nowrap;
}
.rh-btn:hover { transform: translateY(-2px); }

.rh-btn--primary {
    background: var(--rh-primary);
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(0, 145, 220, 0.45);
}
.rh-btn--primary:hover {
    background: #0082c8;
    box-shadow: 0 6px 24px rgba(0, 145, 220, 0.55);
}

.rh-btn--whatsapp {
    background: #25d366;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}
.rh-btn--whatsapp:hover {
    background: #1eb85a;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* ══════════════════════════════════════════════════════════════════════════
   SERVICES (carousel tweaks for this template)
   ══════════════════════════════════════════════════════════════════════════ */
.rh-page .rabe-services {
    background: var(--rh-bg);
    padding: 6rem 0 5rem;
}

/* Make section heading match reference style */
.rh-page .rabe-section-header {
    margin-bottom: 3.5rem;
}
.rh-page .rabe-section-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--rh-navy);
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
    margin-bottom: 0;
}
.rh-page .rabe-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    background: var(--rh-primary);
    border-radius: 2px;
}
.rh-page .rabe-section-sub {
    font-size: var(--services-sub, 1.05rem);
    color: var(--rh-muted);
    margin-top: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   PROCESS STEPS
   ══════════════════════════════════════════════════════════════════════════ */
.rh-steps-section {
    background: var(--rh-alt-bg);
    padding: 6.5rem 0;
}

.rh-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;            /* no gap – connector spans between items */
    position: relative;
}

/* Horizontal connector line through the centres of all number circles */
.rh-steps-grid::before {
    content: '';
    position: absolute;
    top: 48px;          /* half of 96px circle */
    left: calc(12.5%);  /* starts at centre of first circle */
    right: calc(12.5%); /* ends at centre of last circle */
    height: 2px;
    background: var(--rh-border);
    z-index: 0;
}

.rh-step {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 1.5rem;
}

.rh-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width:  var(--steps-circle, 96px);
    height: var(--steps-circle, 96px);
    border-radius: 50%;
    background: var(--rh-primary);
    color: #fff;
    font-size: var(--steps-num, 2rem);
    font-weight: 700;
    margin: 0 auto 1.75rem;
    position: relative;
    box-shadow: 0 6px 24px rgba(0, 145, 220, 0.3);
    outline: 6px solid var(--rh-alt-bg);
    aspect-ratio: 1 / 1;   /* stays circular even if size changes */
    flex-shrink: 0;
}

/* Steps connector line: centres on the circle */
.rh-steps-grid::before {
    top: calc(var(--steps-circle, 96px) / 2);
}

.rh-step h3 {
    font-size: var(--steps-title, 1.05rem);
    font-weight: 600;
    color: var(--rh-navy);
    margin: 0 0 0.6rem;
    line-height: 1.3;
}
.rh-step p {
    font-size: var(--steps-text, 0.92rem);
    color: var(--rh-muted);
    line-height: 1.7;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   CONTACT SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.rh-contact-section {
    background: var(--rh-navy);
    padding: 6.5rem 0;
}

.rh-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 5rem;
    align-items: start;
}

/* --- Left: info column --- */
.rh-contact-info > h2 {
    font-size: var(--contact-heading, 2.2rem);
    font-weight: var(--contact-h2-weight, 700);
    color: #fff;
    margin: 0 0 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    -webkit-text-stroke: var(--contact-h2-stroke, 0 transparent);
    paint-order: stroke fill;
}
.rh-contact-info > h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--rh-primary);
    border-radius: 2px;
    margin-top: 0.75rem;
}
.rh-contact-info > p {
    color: rgba(255,255,255,0.7);
    font-size: var(--contact-body, 1rem);
    line-height: 1.65;
    margin: 1.25rem 0 2rem;
}

.rh-contact-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
}
.rh-contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95rem;
    line-height: 1.5;
}
.rh-contact-info-list li:first-child { border-top: 1px solid rgba(255,255,255,0.08); }

.rh-contact-info-list .rh-ci-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(0, 145, 220, 0.18);
    border: 1px solid rgba(0, 145, 220, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rh-contact-info-list .rh-ci-icon i {
    color: var(--rh-primary);
    font-size: 1rem;
}
.rh-contact-info-list .rh-ci-text strong {
    display: block;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    font-size: var(--contact-label, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}
.rh-contact-info-list .rh-ci-text span,
.rh-contact-info-list .rh-ci-text a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: var(--contact-value, 0.97rem);
}
.rh-contact-info-list .rh-ci-text a:hover { color: var(--rh-primary); }

/* --- Right: form card --- */
.rh-contact-form-card {
    background: #fff;
    border-radius: 14px;
    padding: 2.75rem 2.5rem;
    box-shadow: var(--rh-shadow-lg);
}
.rh-contact-form-card h3 {
    font-size: var(--form-heading, 1.4rem);
    font-weight: 700;
    color: var(--rh-navy);
    margin: 0 0 0.4rem;
}
.rh-contact-form-card > p {
    font-size: var(--form-sub, 0.9rem);
    color: var(--rh-muted);
    margin: 0 0 1.75rem;
    line-height: 1.5;
}

.rh-form-group { margin-bottom: 1.1rem; }
.rh-form-group label {
    display: block;
    font-size: var(--form-label, 0.83rem);
    font-weight: 600;
    color: var(--rh-navy);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rh-form-group input,
.rh-form-group select,
.rh-form-group textarea {
    width: 100%;
    padding: 0.78rem 1rem;
    border: 1.5px solid var(--rh-border);
    border-radius: var(--rh-radius);
    font-size: var(--form-input, 0.95rem);
    color: var(--rh-text);
    background: #fdfdfe;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}
.rh-form-group input:focus,
.rh-form-group select:focus,
.rh-form-group textarea:focus {
    border-color: var(--rh-primary);
    box-shadow: 0 0 0 3px rgba(0,145,220,0.12);
    background: #fff;
}
.rh-form-group textarea { min-height: 110px; resize: vertical; }

.rh-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

.rh-form-submit {
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.95rem 1.5rem;
    background: var(--rh-primary);
    color: #fff;
    border: none;
    border-radius: var(--rh-radius);
    font-family: 'Prompt', Arial, sans-serif;
    font-size: var(--form-submit, 1rem);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(0,145,220,0.35);
}
.rh-form-submit:hover {
    background: #0082c8;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,145,220,0.45);
}

.rh-form-msg {
    padding: 0.8rem 1rem;
    border-radius: var(--rh-radius);
    margin-bottom: 1.25rem;
    font-size: 0.93rem;
    font-weight: 500;
}
.rh-form-msg--ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.rh-form-msg--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤1023px) ─────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    /* Container */
    .rh-container { padding: 0 1.5rem; }

    /* Hero: extend overlay further across so text stays readable on tablet */
    .rh-hero-overlay {
        background: linear-gradient(
            100deg,
            rgba(15, 26, 55, 0.97) 0%,
            rgba(15, 26, 55, 0.94) 50%,
            rgba(15, 26, 55, 0.80) 68%,
            rgba(15, 26, 55, 0.40) 84%,
            rgba(15, 26, 55, 0.10) 100%
        );
    }
    /* Widen text box so content has room at tablet widths */
    .rh-hero-inner { width: 78% !important; }

    /* Sections: reduce vertical padding */
    .rh-page .rabe-services  { padding: 4.5rem 0; }
    .rh-steps-section        { padding: 4.5rem 0; }
    .rh-contact-section      { padding: 4.5rem 0; }

    /* Steps: 2-column grid; remove horizontal connector */
    .rh-steps-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 3rem;
    }
    .rh-steps-grid::before { display: none; }

    /* Contact: stack columns */
    .rh-contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── Mobile (≤767px) ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Container */
    .rh-container { padding: 0 1.1rem; }

    /* Hero: switch to relative so it wraps the text again */
    .rh-hero { min-height: 85vh; }
    .rh-hero-inner {
        position: relative !important;
        left: auto !important; top: auto !important;
        width: 90% !important;
        margin: 5.5rem auto 3rem;
    }
    /* Full overlay on narrow screens — car photo not visible anyway */
    .rh-hero-overlay {
        background: linear-gradient(
            180deg,
            rgba(15, 26, 55, 0.88) 0%,
            rgba(15, 26, 55, 0.82) 100%
        );
    }
    .rh-hero h1 { font-size: 2rem; }

    /* Section headers */
    .rh-section-header        { margin-bottom: 2.5rem; }
    .rh-section-header h2     { font-size: 1.9rem; }
    .rh-page .rabe-section-title { font-size: 1.9rem; }

    /* Sections: reduce padding further */
    .rh-page .rabe-services  { padding: 3.5rem 0; }
    .rh-steps-section        { padding: 3.5rem 0; }
    .rh-contact-section      { padding: 3.5rem 0; }
}

/* ── Small mobile (≤639px) ────────────────────────────────────────────── */
@media (max-width: 639px) {
    /* Hero */
    .rh-hero { min-height: 80vh; }
    .rh-hero-inner { width: 100% !important; margin-top: 5rem; }
    .rh-hero h1 { font-size: 1.75rem; }
    .rh-hero-sub { font-size: 0.97rem; }
    .rh-hero-btns { flex-direction: column; }
    .rh-hero-btns .rh-btn { justify-content: center; }

    /* Steps: 1 column */
    .rh-steps-grid { grid-template-columns: 1fr; row-gap: 2.5rem; }

    /* Contact form */
    .rh-contact-form-card { padding: 1.75rem 1.25rem; }
    .rh-form-row { grid-template-columns: 1fr; }

    /* Section headers */
    .rh-section-header h2     { font-size: 1.6rem; }
    .rh-page .rabe-section-title { font-size: 1.6rem; }
}
