/* === Markenfarben (Logo-Update: Gold statt Blau) === */
:root {
    --color-dd-blue:      #c49a00;
    --color-dd-blue-dark: #1e1e1e;
    --font-tech:          "Inter";
}

/* === Screenreader-only Hilfstext (z.B. Contao-Formulare: "Pflichtfeld"-Label) ===
   Contaos eigene .invisible-Definition greift hier offenbar nicht (Text war
   unsichtbar, hat aber weiterhin Platz belegt und sichtbaren Text eingerückt).
   Robustes, sitewide gültiges "sr-only"-Muster erzwungen. */
.invisible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* === Globaler Hintergrund ===
   Höhere Spezifität über die feste body#top-ID nötig, da die Contao-Layout-
   Einstellung "CSS-Klasse Body-Tag" dunkle Tailwind-Utilities (bg-slate-900
   text-slate-200) setzt, die eine reine "body"-Regel sonst nicht schlägt. */
body#top {
    background-color: #ffffff;
    color: var(--color-dd-slate);
}

/* === Einfache Textseiten ohne eigenes RSCE-Element (z.B. Impressum, Datenschutz) === */
.content-text {
    max-width: 65rem;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}
.content-text > h2 {
    font-family: var(--font-tech);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-dd-slate);
    margin-bottom: 1.5rem;
}
.content-text .rte {
    color: #475569;
    line-height: 1.75;
}
.content-text .rte h2 {
    font-family: var(--font-tech);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-dd-slate);
    margin: 2rem 0 0.75rem;
}
.content-text .rte h2:first-child {
    margin-top: 0;
}
.content-text .rte p {
    margin-bottom: 1rem;
}
.content-text .rte a {
    color: var(--color-dd-blue);
    text-decoration: underline;
}
.content-text .rte ul,
.content-text .rte ol {
    margin: 0 0 1rem 1.5rem;
}

.ce_image img, .ce_text img {
    width: 100%;
    height: auto;
    display: block;
}

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

/* Desktop: ul Flex-Layout */
.dd-nav-desktop > ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mobile: ul Reset */
.dd-nav-mobile > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Desktop-Navlinks */
.dd-nav-desktop > ul > li > a {
    font-weight: 600;
    color: var(--color-dd-slate);
    white-space: nowrap;
    transition: color .15s;
    text-decoration: none;
}
.dd-nav-desktop > ul > li > a:hover,
.dd-nav-desktop > ul > li.active > a,
.dd-nav-desktop > ul > li.trail > a {
    color: var(--color-dd-blue);
}

/* Aktive Seite Desktop (<strong> statt <a>) */
.dd-nav-desktop > ul > li > strong {
    font-weight: 700;
    color: var(--color-dd-blue);
    white-space: nowrap;
    font-style: normal;
}

/* Mobile-Navlinks */
.dd-nav-mobile > ul > li > a {
    display: block;
    padding: .75rem;
    border-radius: .5rem;
    font-weight: 500;
    color: var(--color-dd-slate);
    transition: color .15s, background-color .15s;
    text-decoration: none;
}
.dd-nav-mobile > ul > li > a:hover,
.dd-nav-mobile > ul > li.active > a,
.dd-nav-mobile > ul > li.trail > a {
    background-color: #fef9e7;
    color: var(--color-dd-blue);
}

/* Aktive Seite Mobile (<strong> statt <a>) */
.dd-nav-mobile > ul > li > strong {
    display: block;
    padding: .75rem;
    border-radius: .5rem;
    font-weight: 700;
    color: var(--color-dd-blue);
    font-style: normal;
}

/* CTA-Button in der Nav – nicht als aktiven Navlink überschreiben */
.dd-nav-desktop .dd-nav-cta {
    color: #1a1a1a !important;
}
.dd-nav-desktop .dd-nav-cta:hover {
    background-color: var(--color-dd-blue-dark) !important;
    color: #fff !important;
}

/* === Logo-Swap: weiss → Original bei Hover === */
.dd-logo-swap {
    position: relative;
    display: inline-block;
}
.dd-logo-swap img.logo-color {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .35s ease;
}
.dd-logo-swap img.logo-white {
    display: block;
    transition: opacity .35s ease;
}
.dd-logo-swap:hover img.logo-color { opacity: 1; }
.dd-logo-swap:hover img.logo-white { opacity: 0; }

/* === Service-Karten === */
.dd-service-card:hover .dd-service-link {
    gap: .375rem;
}

/* Service-Grid: responsiv ohne Tailwind-Build-Abhängigkeit.
   auto-fit statt fixer Spaltenzahl: bei weniger Karten (z.B. nur "Auto" +
   "Motorrad") füllen sich die vorhandenen Karten gleichmäßig die Zeile,
   statt in einem festen 4er-Raster viel Leerraum zu lassen. Rechnerisch
   passen max. 4 Spalten in den 1600px-Container, darunter wird automatisch
   umgebrochen (kein separater Breakpoint nötig). */
.dd-services-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.25rem), 1fr));
}

/* === Prozess-Grid: 4 Spalten Desktop, 2 Tablet, 1 Mobil === */
.dd-process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 63.99rem) {
    .dd-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 39.99rem) {
    .dd-process-grid {
        grid-template-columns: 1fr;
    }
}

/* === Leistungen-Grid: 4 Spalten Desktop, 2 Tablet, 1 Mobil ===
   Für "Wrapper Start"/"Wrapper Ende" um mehrere rsce_leistung_karte-Elemente,
   CSS-Klasse im Wrapper: dd-leistungen-grid grid gap-8 */
.dd-leistungen-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 63.99rem) {
    .dd-leistungen-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 39.99rem) {
    .dd-leistungen-grid {
        grid-template-columns: 1fr;
    }
}

/* === FAQ Akkordeon === */
.dd-faq-item summary { list-style: none; }
.dd-faq-item summary::-webkit-details-marker { display: none; }
.dd-faq-item .dd-faq-icon { transition: transform .25s ease; }
.dd-faq-item[open] .dd-faq-icon { transform: rotate(45deg); }

/* === Testimonial-Karussell: Scrollbar ausblenden (Swipe/Pfeile/Punkte bleiben nutzbar) === */
.dd-testimonial-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.dd-testimonial-track::-webkit-scrollbar {
    display: none;
}

/* === Native Contao-Formulare (Formular-Generator, z.B. Fahrzeug-Ankauf, Anfrage senden) ===
   Styled per Element-/Attribut-Selektor statt exakter Contao-Klassennamen,
   dadurch unabhängig von internen Formular-Template-Details – rein optisch,
   keine Auswirkung auf Formular-Funktion/Versand. Scope: .ce_form (Contao
   vergibt content-elementen automatisch die Klasse "ce_<alias>", hier "form"). */
.ce_form {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    padding: 3rem 1.5rem;
}
.ce_form label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-dd-slate);
    margin-bottom: 0.375rem;
}
/* Nur das Pflicht-Sternchen (<span class="mandatory">) einfärben, nicht das
   gesamte Label (Contao setzt "mandatory" sowohl auf <label> als auch <span>). */
.ce_form span.mandatory { color: var(--color-dd-blue); }
.ce_form .widget { margin-bottom: 1.25rem; }
/* Contaos Kern-CSS rückt Pflichtfelder (.mandatory) standardmäßig ein –
   hier erzwungen bündig, damit alle Felder gleich ausgerichtet sind. */
.ce_form .widget.mandatory,
.ce_form label.mandatory {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
}

.ce_form input[type="text"],
.ce_form input[type="email"],
.ce_form input[type="tel"],
.ce_form input[type="number"],
.ce_form input[type="password"],
.ce_form textarea,
.ce_form select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    color: var(--color-dd-slate);
    background-color: #ffffff;
    transition: border-color .2s, box-shadow .2s;
}
.ce_form input[type="text"]:focus,
.ce_form input[type="email"]:focus,
.ce_form input[type="tel"]:focus,
.ce_form input[type="number"]:focus,
.ce_form input[type="password"]:focus,
.ce_form textarea:focus,
.ce_form select:focus {
    outline: none;
    border-color: var(--color-dd-blue);
    box-shadow: 0 0 0 3px rgba(196, 154, 0, 0.15);
}
.ce_form textarea { min-height: 8rem; resize: vertical; }

.ce_form input[type="file"] {
    display: block;
    width: 100%;
    font-size: 0.875rem;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background-color: #f8fafc;
}

.ce_form .widget-checkbox label,
.ce_form .widget-radio label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.ce_form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    background-color: var(--color-dd-blue);
    color: #1a1a1a;
    cursor: pointer;
    transition: opacity .2s;
}
.ce_form input[type="submit"]:hover { opacity: 0.9; }

.ce_form p.error {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.ce_form .widget-explanation {
    background-color: #fef9e7;
    border-left: 3px solid var(--color-dd-blue);
    padding: 0.875rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--color-dd-slate);
    margin-bottom: 1.5rem;
}