/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }
body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: #1a202c; background: #fff; line-height: 1.6; font-size: 16px;
}
.site-main { flex: 1 0 auto; }
a { color: var(--accent-color, #303090); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }

/* === HEADER === */
.site-header {
    background: #fff; color: var(--accent-color, #303090); position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background .3s, color .3s;
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; height: 70px;
}
.site-logo { display: flex; align-items: center; }
.logo-img { height: 44px; width: auto; }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 10px; }
.nav-menu { display: flex; list-style: none; gap: 10px; }
.nav-menu li a {
    display: block; padding: 10px 22px; color: var(--accent-color, #303090);
    font-size: 0.95rem; font-weight: 500; border-radius: 50px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.nav-menu li a:hover { background: #f0f5ff; transform: translateY(-1px); }
.nav-menu li.current-menu-item a { background: var(--accent-color, #303090); color: #fff; box-shadow: 0 2px 8px rgba(var(--accent-color-rgb),.15); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; position: relative; z-index: 101; }
.menu-toggle span {
    display: block; width: 24px; height: 2px; background: var(--accent-color, #303090);
    margin: 6px 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 2px;
}
/* Hamburger → X Animation */
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* === HEADER VARIANTEN === */
.design-variant-3 .site-header {
    background: linear-gradient(160deg, #f0f5ff 0%, #e3ecff 100%);
    border-bottom: 1px solid #d6dcee;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

/* === FOOTER VARIANTEN === */
.design-variant-3 .site-footer { background: #1a202c; border-top: 3px solid var(--accent-color, #303090); }
.design-variant-3 .footer-bottom { border-top-color: #2d3748; }

.vehicle-img-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; width: 100%; min-height: 100px;
    position: relative; overflow: hidden;
    color: #a0aec0; font-size: 1rem; background: linear-gradient(135deg, #e8ecf5, #d6dcee);
}
.vehicle-img-placeholder .ph-logo {
    max-height: 50px; width: auto; opacity: .5; transition: opacity .2s;
}
.vehicle-img-placeholder:hover .ph-logo { opacity: .8; }
.vehicle-img-placeholder .ph-icon { opacity: .4; }
.vehicle-img-placeholder .ph-photo {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.vehicle-img-placeholder .ph-photo-text {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    z-index: 2; white-space: nowrap;
    background: rgba(255, 255, 255, .82);
    color: #16203a;
    font-size: .82rem; font-weight: 600; letter-spacing: .01em;
    padding: 5px 14px; border-radius: 999px;
    box-shadow: 0 1px 6px rgba(13, 22, 32, .08);
}
/* Detailseiten-Galerie (16:10): Bild unbeschnitten einpassen —
   Contain + Hintergrundfarbe des Bildes fuer nahtlosen Uebergang */
.mde-v4-gallery .vehicle-img-placeholder { background: #cdd9e4; }
.mde-v4-gallery .vehicle-img-placeholder .ph-photo { object-fit: contain; }
/* Fallback-Galerie: so hoch wie die rechte Spalte (VW-Block).
   Klasse mde-v4-no-images kommt aus detail.php (kein :has() noetig).
   margin-bottom 24px gleicht die Galerie an die rechte Datenbox an
   (.mde-v4-data hat margin-bottom:24px — sonst ragt die Galerie unten heraus). */
@media(min-width:1024px){
  .mde-v4-detail-layout.mde-v4-no-images { align-items: stretch; }
  .mde-v4-detail-layout.mde-v4-no-images .mde-v4-detail-left { display: flex; flex-direction: column; }
  .mde-v4-detail-layout.mde-v4-no-images .mde-v4-gallery { flex: 1; display: flex; flex-direction: column; margin-bottom: 24px; }
  .mde-v4-detail-layout.mde-v4-no-images .mde-v4-gallery-main { flex: 1; }
}
/* Tablet (Block-Layout): Galerie nicht auf 100px kollabieren lassen */
@media(min-width:769px) and (max-width:1023px){
  .mde-v4-gallery .gallery-ph { min-height: 320px; }
}
.vehicle-featured-img { width: 100%; height: 100%; object-fit: cover; }

/* === PAGE CONTENT === */
.page-content h2 { font-size: 1.4rem; margin: 30px 0 16px; color: var(--accent-color, #303090); }
.page-content h3 { font-size: 1.15rem; margin: 24px 0 12px; color: #2d3748; }
.page-content p { margin-bottom: 16px; color: #4a5568; }
.page-content ul { margin-bottom: 16px; padding-left: 24px; }
.page-content li { margin-bottom: 8px; color: #4a5568; }
/* === FLOATING SIDEBAR === */
.floating-sidebar {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 8px; z-index: 1000;
}
.floating-btn {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s; text-decoration: none;
}
.floating-btn:hover { transform: scale(1.1); text-decoration: none; }
.floating-btn.whatsapp { background: #25D366; }
.floating-btn.email { background: var(--accent-color, #303090); }
.floating-btn.kontakt { background: var(--accent-color, #303090); }


/* === VEHICLE CARDS (shared by .av3-card + .avf-card) === */
.av3-card, .avf-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  text-decoration: none !important;
  color: inherit;
  border: 1px solid #e8ecf5;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
}
.av3-card:hover, .avf-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(var(--accent-color-rgb),.1); border-color: #c8d6f0; }
.av3-card-img, .avf-card-img {
  background: linear-gradient(135deg, #e8ecf5, #d6dcee);
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  position: relative;
}
.av3-card-body, .avf-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.av3-card-title, .avf-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
}
.av3-card-title .av3-marke, .avf-card-title .avf-marke { color: var(--accent-color, #303090); }
.av3-card-meta, .avf-card-meta {
  display: flex;
  gap: 6px;
  font-size: .8rem;
  color: #8a95a5;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.av3-card-meta span::before, .avf-card-meta span::before { content: '•'; margin-right: 3px; color: var(--accent-color, #303090); opacity: .3; }
.av3-card-meta span:first-child::before, .avf-card-meta span:first-child::before { content: ''; margin: 0; }
.av3-card-footer, .avf-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e8ecf5;
  margin-top: auto;
}
.av3-card-price, .avf-card-price { font-size: 1.1rem; font-weight: 700; color: var(--accent-color, #303090); }
.av3-card-link, .avf-card-link { font-size: .8rem; color: var(--accent-color, #303090); font-weight: 600; opacity: .6; }
.av3-card:hover .av3-card-link, .avf-card:hover .avf-card-link { opacity: 1; }

/* Vehicle Grids */
.av3-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.av3-grid > .av3-card { width: calc(33.333% - 14px); text-decoration: none !important; }

.avf-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .av3-grid > .av3-card { width: calc(50% - 10px); }
  .avf-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .av3-grid > .av3-card { width: 100%; }
  .avf-list { grid-template-columns: 1fr; }
}

/* === Similar-Block „Weitere Gebrauchtwagen“ (P2, 04.09.2026): Grid 3/2/1 nach .avf-list, 6 Karten (v2) === */

.mde-v4-similar-title {
  margin: 0 0 1.1rem;
  font-size: 1.4rem;
  font-weight: 700;
}
.mde-v4-similar-list {
  padding: 4px 4px 18px;                 /* Grid (3/2/1) erbt von .avf-list */
}
.mde-v4-similar-back {
  text-align: left;
}

/* === FOOTER === */
.site-footer {
    background: #1a202c; color: #e2e8f0; margin-top: 0;
    position: relative; transition: background .3s; width: 100%;
}
.site-footer::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color,#303090), #5b86e5, var(--accent-color,#303090));
}

.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 50px 20px;
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px;
}
.footer-col { text-align: center; }
.footer-col h4 {
    color: #fff; font-size: 1.1rem; margin-bottom: 16px;
    position: relative; display: inline-block;
}
.footer-col h4::after {
    content: '';
    display: block; height: 2px;
    background: var(--accent-color,#303090);
    margin-top: 6px; border-radius: 2px;
}
.footer-col p { font-size: 0.9rem; color: #cbd5e0; line-height: 1.7; }
.footer-col a { color: #a0aec0; transition: color .2s, transform .2s; display: inline-block; }
.footer-col a:hover { color: #fff; transform: translateY(-2px); }

/* Öffnungszeiten im Footer */
/*.footer-oeffnungszeiten {}*/
.footer-oeffnungszeiten p {
    text-align: center;
    font-size: 0.88rem; color: #cbd5e0; line-height: 1.5; margin-bottom: 10px;
}
.footer-oeffnungszeiten .oh-day {
    font-weight: 500; color: #e2e8f0;
}
.footer-oeffnungszeiten .oh-time {
    color: #a0aec0;
}
.footer-menu { list-style: none; text-align: center; }
.footer-menu li { margin-bottom: 8px; }
.footer-menu a { font-size: 0.9rem; }

/* Kontakt-Icons im Footer */
/*.footer-kontakt {}*/
.footer-kontakt-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.9rem; color: #cbd5e0; line-height: 1.7; margin-bottom: 6px;
    justify-content: center;
}
.footer-kontakt-item a { color: inherit; }
.footer-name {
    display: block;
    font-size: 0.95rem;
    color: #e2e8f0;
    margin-bottom: 6px;
    font-weight: 600;
}

.footer-kontakt-item a:hover { color: #fff; }
.footer-btn-row {
    margin-top: 12px; display: flex; gap: 10px;
    justify-content: center; flex-wrap: wrap;
}
.fk-icon {
    width: 18px; height: 18px; flex-shrink: 0; opacity: .7;
}

/* iOS Data Detector Fix – verhindert automatische iOS-Formatierung von Adressen/Telefonnummern */
[data-detector], [x-apple-data-detectors] {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-decoration: none !important;
}

.footer-bottom { border-top: 1px solid #2d3748; padding: 20px; text-align: center; }
.footer-bottom p { font-size: 0.85rem; color: #8a95a5; }

/* === FORMULAR-ABSTÄNDE: Gleichmäßig === */
.cf7-cf-turnstile { margin-bottom: 0 !important; }

/* Submit-Button zentrieren (Ankauf & Kontakt) */
.avk-content .wpcf7 .wpcf7-submit,
.av-kontakt .wpcf7 .wpcf7-submit {
  display: inline-block !important;
  float: none !important;
}

/* Spinner ausgeblendet (sonst verschiebt er den Button nach links) */
.wpcf7-spinner { display: none !important; }

/* Überflüssiges <br> zwischen Turnstile und Submit-Button ausblenden */
.cf7-cf-turnstile + br { display: none !important; }

/* Checkbox + Label vertikal mittig ausrichten */
.wpcf7-acceptance .wpcf7-list-item label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;
}

/* === KOMPATIBILITÄT: Plugin-Standard-Shortcode === */
/* mobile_api_get_button_classes() (mobile-api-Plugin) liefert u. a. .btn/.btn-primary.
   Der Plugin-Shortcode mobile-api-vehicle-archive ist aktuell nicht in Benutzung —
   falls er je aktiviert wird, behalten die Buttons so das avf-btn-Design statt nackter Links. */
.btn, .btn-primary {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.4;
  font-family: inherit;
  text-decoration: none !important;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .2s;
  background: var(--accent-color, #303090);
  color: #fff !important;
}
.btn:hover, .btn-primary:hover { background: #252575; transform: translateY(-1px); }
/* === RESPONSIVE (Hamburger < 1100px) === */
@media (max-width: 1100px) {
    .menu-toggle { display: block; }
    .main-nav { position: relative; }

    /* Dropdown von oben */
    .nav-menu {
        display: none; position: fixed; top: 70px; left: 0; right: 0;
        padding: 12px 20px 20px;
        background: rgba(255,255,255,.97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
        border-bottom: 1px solid #d6dcee;
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
        z-index: 99;
        animation: slideDown .25s ease;
    }
    .nav-menu.active { display: block; }

    .nav-menu ul {
        list-style: none; display: flex; flex-direction: column; gap: 6px;
        max-width: 400px; margin: 0 auto;
    }
    .nav-menu ul li { margin: 0; }
    .nav-menu ul li a {
        display: block; padding: 14px 20px; color: #1a202c !important;
        font-size: 1rem; font-weight: 500; border-radius: 50px !important;
        text-align: center; border: none !important;
        transition: background .2s, color .2s;
    }
    .nav-menu ul li a:hover,
    .nav-menu ul li.current-menu-item a {
        background: var(--accent-color, #303090) !important;
        color: #fff !important;
    }

    .menu-toggle.active span { background: var(--accent-color, #303090); }
}

/* === RESPONSIVE (Mobile < 768px) === */
@media (max-width: 650px) {
    .section { padding: 40px 0; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .floating-sidebar {
        right: 12px;
        bottom: 16px;
        top: auto;
        transform: none;
        flex-direction: row;
    }
    .floating-btn { width: 48px; height: 48px; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

