/*
 * Tris Trasporti SNC — Rutigliano (BA)
 * Fogli di stile del sito. Design token estratti dal sito originale
 * (trasportitris.it, WordPress + Elementor) e ricostruiti a mano.
 * Font self-hosted in assets/fonts/fonts.css (Alfa Slab One, Roboto,
 * Roboto Slab, Allerta — sottoinsieme latin).
 */

/* ---------------------------------------------------------------------
   Token
--------------------------------------------------------------------- */
:root {
  --red: #F90000;
  --red-dark: #C40000;
  --black: #000000;
  --ink: #111111;
  --body-text: #333333;
  --muted: #686868;
  --muted-on-dark: #9A9A9A;
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --white: #FFFFFF;

  --font-display: 'Alfa Slab One', 'Arial Black', sans-serif;
  --font-tagline: 'Allerta', sans-serif;
  --font-eyebrow: 'Roboto Slab', 'Roboto', serif;
  --font-body: 'Roboto', 'Segoe UI', Arial, sans-serif;

  --container: 1140px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------------------------------------------------------
   Reset di base
--------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0 0 16px; line-height: 1.15; }
p { margin: 0 0 16px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Salta al contenuto — solo per tastiera/screen reader */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Pulsanti
--------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--white);
  background: var(--red);
  border: 1px solid var(--red);
  padding: 14px 26px;
  border-radius: 4px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover, .btn:focus-visible { background: var(--red-dark); border-color: var(--red-dark); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--outline { background: var(--white); color: var(--ink); border-color: #DDDDDD; }
.btn--outline:hover { background: #F5F5F5; }

/* ---------------------------------------------------------------------
   Barra avviso (aiuti di Stato)
--------------------------------------------------------------------- */
.notice-bar { background: var(--red); padding: 14px 0; }
.notice-bar p {
  margin: 0;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------
   Hero
--------------------------------------------------------------------- */
.hero { background: var(--black); padding: 56px 0; }
.hero__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__row { grid-template-columns: 1.1fr 1fr; gap: 56px; }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--white);
  text-transform: uppercase;
  margin: 0 0 20px;
}
@media (min-width: 640px) { .hero h1 { font-size: 40px; } }
@media (min-width: 900px) { .hero h1 { font-size: 45px; } }
.hero__tagline {
  font-family: var(--font-tagline);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  max-width: 34ch;
  margin: 0;
  line-height: 1.6;
}
.hero__media { order: -1; }
@media (min-width: 900px) { .hero__media { order: 0; } }
.hero__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  max-width: 480px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------
   Citazione
--------------------------------------------------------------------- */
.quote { background: var(--white); padding: 72px 0; }
.quote__text { margin: 0; text-align: center; max-width: 900px; margin: 0 auto; }
.quote__text p {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 20px;
}
@media (min-width: 768px) { .quote__text p { font-size: 32px; } }
.quote__text cite {
  display: block;
  font-style: normal;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------------------------------------------------------------------
   I nostri servizi (accordion)
--------------------------------------------------------------------- */
.servizi { background: var(--black); padding: 80px 0; text-align: center; }
.servizi__eyebrow {
  display: block;
  font-family: var(--font-eyebrow);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4A4A4A;
  margin-bottom: 14px;
}
.servizi h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 32px;
  color: var(--white);
  margin: 0 0 8px;
}
@media (min-width: 768px) { .servizi h2 { font-size: 45px; } }
.servizi__kicker {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 48px;
}

.accordion { max-width: 860px; margin: 0 auto; text-align: left; }
.accordion-item { border-bottom: 1px solid var(--line-on-dark); }
.accordion-item__q { margin: 0; font-weight: normal; }
.accordion-item__q button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  padding: 22px 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--white);
  text-align: left;
}
.accordion-item__chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--white);
  transition: transform 0.25s var(--ease);
}
.accordion-item[data-open="true"] .accordion-item__chevron { transform: rotate(90deg); }
.accordion-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.accordion-item__a-inner { padding: 0 4px 22px; }
.accordion-item__a-inner p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: #C2C2C2;
  margin: 0;
  max-width: 68ch;
}

/* ---------------------------------------------------------------------
   Richiedi informazioni (banner foto)
--------------------------------------------------------------------- */
.cta { background: var(--black); }
.cta__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 300px;
  background-image: url('/assets/img/banner-richiedi-informazioni.jpg');
  background-size: cover;
  background-position: center 55%;
}
@media (min-width: 900px) { .cta__link { min-height: 460px; } }
.cta__overlay {
  width: 100%;
  padding: 32px 24px;
  background: linear-gradient(90deg, rgba(155, 12, 12, 0.88) 0%, rgba(155, 12, 12, 0.72) 48%, rgba(155, 12, 12, 0) 85%);
}
@media (min-width: 900px) { .cta__overlay { padding: 0 0 0 80px; } }
.cta__overlay h2 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 30px;
  text-transform: uppercase;
  line-height: 1.15;
  color: #E0E6EC;
  max-width: 420px;
  margin: 0;
  transition: color 0.2s var(--ease);
}
@media (min-width: 768px) { .cta__overlay h2 { font-size: 45px; } }
.cta__link:hover h2, .cta__link:focus-visible h2 { color: var(--white); }

/* ---------------------------------------------------------------------
   Contatti
--------------------------------------------------------------------- */
.contatti {
  background-color: var(--black);
  background-image: url('/assets/img/texture-contatti.png');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  padding: 80px 0;
}
.contatti h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 34px;
  color: var(--white);
  margin: 0 0 40px;
}
.contatti__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
}
@media (min-width: 780px) {
  .contatti__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
.contatti__card h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  color: var(--white);
  margin: 18px 0 8px;
}
.contatti__card p { font-size: 15px; color: #D8DEE4; margin: 0; }
.contatti__card a { color: #D8DEE4; text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s var(--ease); }
.contatti__card a:hover { color: var(--white); }

.map {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0D0D0D;
  border: 1px solid var(--line-on-dark);
  border-radius: 6px;
  overflow: hidden;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__load {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: none;
  border: none;
  color: #C2C2C2;
  font-family: var(--font-body);
  font-size: 14px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.map__load svg { width: 30px; height: 30px; }
.map__load:hover { color: var(--white); background: rgba(249, 0, 0, 0.08); }
.map.is-loaded .map__load { display: none; }

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */
.site-footer { background: var(--black); padding: 36px 0 28px; text-align: center; border-top: 1px solid var(--line-on-dark); }
.site-footer__legal {
  font-size: 13px;
  color: #B8B8B8;
  max-width: 900px;
  margin: 0 auto 18px;
  line-height: 1.7;
}
.site-footer__legal a { color: #B8B8B8; text-decoration: underline; }
.site-footer__legal a:hover { color: var(--white); }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin: 0 0 16px;
}
.site-footer__links a, .site-footer__cookie-reopen {
  font-family: var(--font-body);
  font-size: 13px;
  color: #8A8A8A;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
}
.site-footer__links a:hover, .site-footer__cookie-reopen:hover { color: var(--white); }
.site-footer__credits { font-size: 12px; color: #555555; margin: 0; }
.site-footer__credits a { color: #777777; text-decoration: underline; }

/* ---------------------------------------------------------------------
   Intestazione pagine legali
--------------------------------------------------------------------- */
.legal-topbar { background: var(--black); padding: 20px 0; }
.legal-topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.legal-topbar__brand {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--white);
  letter-spacing: 0.02em;
}
.legal-topbar__brand span { color: var(--red); }
.legal-topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #CCCCCC;
  transition: color 0.2s var(--ease);
}
.legal-topbar__back svg { width: 16px; height: 16px; }
.legal-topbar__back:hover { color: var(--white); }

/* ---------------------------------------------------------------------
   Pagine legali
--------------------------------------------------------------------- */
.legal { padding: 56px 0 100px; background: var(--white); }
.legal .container { max-width: 820px; }
.legal h1 { font-family: var(--font-display); font-size: 28px; color: var(--ink); margin: 0 0 8px; text-transform: uppercase; }
.legal__updated { color: #999999; font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-weight: 700; font-size: 21px; color: var(--ink); margin-top: 40px; margin-bottom: 14px; }
.legal h3 { font-weight: 600; font-size: 16px; color: var(--ink); margin-top: 26px; margin-bottom: 10px; }
.legal p, .legal li { font-size: 16px; color: var(--body-text); }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 16px; }
.legal ul { list-style: disc; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--red-dark); text-decoration: underline; }
.legal a:hover { color: var(--red); }
.legal table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 10px 14px; border: 1px solid #EEEEEE; vertical-align: top; }
.legal th { background: #FAFAFA; font-weight: 700; color: var(--ink); }
.legal code { background: #F2F2F2; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* ---------------------------------------------------------------------
   Banner cookie
--------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  padding: 24px;
  z-index: 200;
  border: 1px solid #EEEEEE;
  transform: translateY(140%);
  transition: transform 0.4s var(--ease);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner p { font-size: 14px; color: var(--body-text); margin: 0 0 16px; line-height: 1.55; }
.cookie-banner a { color: var(--red-dark); text-decoration: underline; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-banner__actions .btn { flex: 1; min-width: 150px; }

/* ---------------------------------------------------------------------
   Torna su / WhatsApp flottante
--------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 88px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  z-index: 60;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.back-to-top.is-visible { display: inline-flex; }
.back-to-top:hover { background: var(--red); transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; }

.wa-float {
  position: fixed;
  right: 15px;
  bottom: 15px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  z-index: 70;
  transition: transform 0.2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------------------------------------------------------------------
   Utility
--------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
