/*
Theme Name: German Trucks Listing Portal
Theme URI: https://germantrucks.it/
Author: German Trucks SRL
Author URI: https://germantrucks.it/
Description: Professional Italian truck listing portal for German Trucks SRL with backend truck listings, multilingual translator, vehicle filters, share buttons, WhatsApp status poster generator, WhatsApp inquiries, speed optimization and responsive design.
Version: 1.3.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: german-trucks
Tags: custom-logo, one-page, vehicles, business, responsive, multilingual
*/

:root {
  --orange: #ff4b16;
  --orange-dark: #d93106;
  --black: #0b1015;
  --black-soft: #111820;
  --text: #1d2730;
  --muted: #64707d;
  --line: #e7ebef;
  --bg: #f7f9fb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(11, 16, 21, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.section, .stock, .services, .contact { content-visibility: auto; contain-intrinsic-size: 1px 900px; }
button, input, select, textarea { font: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }

.topbar {
  background: var(--black);
  color: #dbe2ea;
  font-size: 13px;
}
.topbar__inner {
  min-height: 32px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
}
.topbar a:hover { color: var(--orange); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231,235,239,.9);
}

body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
.wa-svg {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.18em;
  flex: 0 0 auto;
}
.btn--whatsapp .wa-svg,
.share-btn--whatsapp .wa-svg,
.mini-share--whatsapp .wa-svg { width: 1.25em; height: 1.25em; }

.nav {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 218px; max-height: 74px; height: auto; object-fit: contain; filter: drop-shadow(0 4px 7px rgba(11,16,21,.14)); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
}
.nav-links a { color: #17212b; }
.nav-links a:hover { color: var(--orange); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.language {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}
.language select {
  border: 0;
  background: transparent;
  outline: 0;
  font-weight: 700;
  color: var(--text);
}
.menu-btn {
  display: none;
  margin-left: auto;
  border: 0;
  background: var(--black);
  color: var(--white);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary { background: var(--orange); color: var(--white); }
.btn--primary:hover { background: var(--orange-dark); }
.btn--ghost { color: var(--white); border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.08); }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 12px; }

.hero {
  min-height: 590px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 10%, rgba(255,75,22,.35), transparent 34%),
    linear-gradient(100deg, rgba(9,13,18,.98) 0%, rgba(9,13,18,.92) 48%, rgba(9,13,18,.78) 100%),
    url("assets/hero-truck.jpg") center right/cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 150px;
  background: linear-gradient(to top, rgba(247,249,251,1), transparent);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr .95fr;
  gap: 38px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 13px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 84px);
  line-height: .9;
  letter-spacing: -.05em;
  text-transform: uppercase;
}
.hero h1 strong { color: var(--orange); font-style: normal; }
.hero__text {
  max-width: 560px;
  margin: 24px 0 32px;
  color: #f1f4f7;
  font-size: 20px;
}
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__visual { position: relative; min-height: 360px; }
.hero__image {
  position: absolute;
  inset: 0 0 0 30px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255,75,22,.2), transparent 40%),
    url("assets/hero-truck.jpg") center/cover no-repeat;
  box-shadow: 0 26px 80px rgba(0,0,0,.44);
  border: 1px solid rgba(255,255,255,.16);
}
.hero__image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(11,16,21,.25), transparent 50%);
}
.hero__badge {
  position: absolute;
  left: 0;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.95);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 900;
}
.hero__badge-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--orange);
  color: var(--white);
}

.trust-panel { margin-top: -58px; position: relative; z-index: 3; }
.trust-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--black-soft);
  color: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.trust-panel article {
  padding: 26px 24px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.trust-panel article:last-child { border-right: 0; }
.icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--orange);
  border: 1px solid rgba(255,75,22,.45);
  border-radius: 14px;
  margin-bottom: 12px;
  font-size: 24px;
}
.trust-panel h3 { margin: 0 0 4px; font-size: 14px; text-transform: uppercase; }
.trust-panel p { margin: 0; color: #c9d0d8; font-size: 14px; }

.section { padding: 92px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2, .split h2, .finance h2, .contact h2 {
  margin: 0;
  color: var(--black);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.section-head p:not(.eyebrow) { color: var(--muted); margin: 14px auto 0; max-width: 650px; }
.section-head--left { text-align: left; }
.split {
  display: grid;
  grid-template-columns: .85fr 1.1fr;
  gap: 58px;
  align-items: start;
}
.about__copy {
  color: var(--muted);
  font-size: 18px;
}
.about__copy p:first-child { margin-top: 0; }

.filters {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(11,16,21,.06);
  margin-bottom: 18px;
}
.field { display: grid; gap: 7px; }
.field label {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--text);
  border-radius: 12px;
  padding: 13px 12px;
  outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(255,75,22,.65);
  box-shadow: 0 0 0 4px rgba(255,75,22,.12);
  background: var(--white);
}
.result-line { margin: 18px 0; color: var(--muted); }
.result-line strong { color: var(--orange); font-size: 22px; }

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.vehicle-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(11,16,21,.07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.vehicle-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(255,75,22,.35); }
.vehicle-card__image {
  position: relative;
  aspect-ratio: 16/9;
  background: #d7dee6;
  overflow: hidden;
}
.vehicle-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.vehicle-card:hover .vehicle-card__image img { transform: scale(1.04); }
.vehicle-card__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(11,16,21,.86);
  color: var(--white);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.vehicle-card__content { padding: 16px; }
.vehicle-card h3 { margin: 0 0 12px; font-size: 18px; line-height: 1.2; color: var(--black); }
.vehicle-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.vehicle-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.vehicle-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.price { font-size: 20px; color: var(--orange); font-weight: 950; }
.details-btn {
  border: 0;
  background: transparent;
  color: var(--black);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 950;
  cursor: pointer;
}
.details-btn:hover { color: var(--orange); }
.card-share {
  display: grid;
  grid-template-columns: 1.15fr 1fr .75fr;
  gap: 8px;
  margin-top: 12px;
}
.mini-share,
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--black);
  border-radius: 11px;
  cursor: pointer;
  font-weight: 900;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.mini-share:hover,
.share-btn:hover { transform: translateY(-2px); border-color: rgba(255,75,22,.45); color: var(--orange); }
.mini-share {
  min-height: 38px;
  padding: 0 10px;
  font-size: 11px;
  text-transform: uppercase;
}
.mini-share--whatsapp,
.share-btn--whatsapp { background: #25d366; color: var(--white); border-color: #25d366; }
.mini-share--whatsapp:hover,
.share-btn--whatsapp:hover { color: var(--white); background: #1fad55; }
.mini-share--status,
.share-btn--status { background: linear-gradient(135deg, var(--orange), #ff7a18); color: var(--white); border-color: transparent; }
.mini-share--status:hover,
.share-btn--status:hover { color: var(--white); }
.share-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #f7f9fb);
}
.share-panel h3 { margin: 0 0 6px; color: var(--black); font-size: 20px; }
.share-panel p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.share-btn {
  min-height: 44px;
  padding: 0 12px;
  font-size: 12px;
  text-transform: uppercase;
}

.services { background: var(--white); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.service-grid article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.service-grid span { font-size: 30px; }
.service-grid h3 { margin: 14px 0 8px; color: var(--black); }
.service-grid p { color: var(--muted); margin: 0; }

.finance__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 44px;
  color: var(--white);
  border-radius: 26px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,75,22,.35), transparent 35%),
    linear-gradient(135deg, var(--black), #1d2834);
  box-shadow: var(--shadow);
}
.finance h2 { color: var(--white); }
.finance p:not(.eyebrow) { color: #d7dee6; max-width: 760px; }

.contact { background: var(--white); }
.contact__grid {
  display: grid;
  grid-template-columns: .95fr 1fr;
  gap: 54px;
  align-items: start;
}
.contact-cards { display: grid; gap: 12px; margin-top: 26px; }
.contact-cards a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.contact-cards a:hover { border-color: rgba(255,75,22,.35); }
.contact-cards span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--orange);
  color: var(--white);
}
.quote-form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.quote-form h3 { margin: 0 0 18px; font-size: 24px; color: var(--black); }
.form-note { color: var(--muted); font-size: 13px; margin-bottom: 0; }

.footer {
  background: var(--black);
  color: #cfd7df;
  padding-top: 56px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr .7fr;
  gap: 46px;
}
.footer__brand-logo { display: inline-flex; align-items: center; justify-content: center; width: 290px; max-width: 100%; min-height: 96px; padding: 10px 14px; margin-bottom: 16px; background: var(--white); border-radius: 16px; box-shadow: 0 16px 34px rgba(0,0,0,.28); }
.footer__brand-logo img { width: 100%; max-height: 108px; object-fit: contain; margin: 0; filter: none; }
.footer h4 { margin: 0 0 14px; color: var(--white); }
.footer a { display: block; margin: 7px 0; }
.footer a:hover { color: var(--orange); }
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  font-weight: 900;
}
.socials__whatsapp { background: #25d366; color: var(--white); border-color: #25d366 !important; }
.socials__whatsapp:hover { background: #1fad55; color: var(--white) !important; }
.socials a .wa-svg { width: 20px; height: 20px; }

.footer__bottom {
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 18px;
  color: #97a3af;
  font-size: 14px;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  font-size: 28px;
  box-shadow: 0 14px 30px rgba(37,211,102,.34);
}
.whatsapp-float .wa-svg { width: 34px; height: 34px; }
.whatsapp-float:hover { transform: translateY(-3px); background: #1fad55; }

.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(11,16,21,.72); }
.modal__panel {
  position: relative;
  width: min(920px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.modal__close {
  position: sticky;
  float: right;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  margin: 12px;
}
.modal-vehicle__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.modal-vehicle__hero img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.modal-vehicle__info { padding: 38px; }
.modal-vehicle__info h2 { margin: 0 0 10px; font-size: 36px; line-height: 1; color: var(--black); }
.modal-vehicle__info .price { margin-bottom: 18px; display: block; }
.spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.spec-list div {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.spec-list small { display: block; color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 11px; }
.spec-list strong { color: var(--black); }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.feature-tags span {
  padding: 7px 10px;
  background: rgba(255,75,22,.1);
  color: var(--orange-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

[dir="rtl"] body { font-family: Tahoma, Arial, sans-serif; }
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }
[dir="rtl"] .hero__image { inset: 0 30px 0 0; }
[dir="rtl"] .hero__badge { left: auto; right: 0; }

@media (max-width: 1100px) {
  .vehicle-grid, .service-grid { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .field--wide { grid-column: 1 / -1; }
  .nav-links { gap: 16px; }
  .nav-actions .btn { display: none; }
}
@media (max-width: 860px) {
  .topbar__inner { justify-content: center; flex-wrap: wrap; padding: 7px 0; gap: 10px 16px; }
  .menu-btn { display: inline-grid; place-items: center; }
  .nav { height: 74px; }
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 16px 20px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px rgba(11,16,21,.08);
  }
  .nav-links.is-open { display: grid; }
  .nav-actions { margin-left: 0; }
  .brand img { width: 180px; max-height: 64px; }
  .hero { min-height: auto; padding: 70px 0 120px; }
  .hero__grid, .split, .contact__grid, .modal-vehicle__hero { grid-template-columns: 1fr; }
  .hero__visual { min-height: 260px; }
  .hero__image { inset: 0; }
  .trust-panel { margin-top: -70px; }
  .trust-panel__grid { grid-template-columns: repeat(2, 1fr); }
  .vehicle-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .finance__box { display: grid; padding: 30px; }
  .modal-vehicle__hero img { min-height: 260px; }
}
@media (max-width: 580px) {
  .container { width: min(100% - 26px, var(--container)); }
  .brand img { width: 146px; }
  .nav { gap: 10px; }
  .nav-actions { display: flex; }
  .nav-actions .language { height: 38px; padding: 0 7px; font-size: 12px; }
  .nav-actions .language span { display: none; }
  .menu-btn { width: 38px; height: 38px; font-size: 19px; }
  .hero__buttons, .modal-actions { display: grid; }
  .trust-panel__grid, .vehicle-grid, .service-grid, .filters, .footer__grid, .spec-list { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .hero h1 { font-size: 44px; }
  .vehicle-card__bottom { align-items: flex-start; flex-direction: column; }
  .card-share, .share-grid { grid-template-columns: 1fr; }
  .modal-vehicle__info { padding: 26px; }
  .modal-vehicle__info h2 { font-size: 28px; }
}

/* Backend-driven listing performance and mobile polish */
.vehicle-card__image img, .modal-vehicle__hero img { aspect-ratio: 16 / 9; object-fit: cover; }
.vehicle-card { transform: translateZ(0); }
@media (max-width: 480px) {
  .topbar { font-size: 11px; }
  .brand img { width: 148px; max-height: 58px; object-fit: contain; }
  .hero { padding-top: 54px; }
  .hero h1 { font-size: 38px; line-height: .98; }
  .hero__text { font-size: 16px; }
  .filters { gap: 12px; padding: 16px; }
  .vehicle-meta { grid-template-columns: 1fr; }
  .vehicle-card__content { padding: 16px; }
  .btn { width: 100%; justify-content: center; }
  .whatsapp-float { right: 14px; bottom: 14px; }
}
.footer a.footer__brand-logo {
  display: inline-flex;
  margin: 0 0 16px;
  color: inherit;
}
