/* style.css ottimizzato per smartphone */
:root {
  --primary: #007b8f;
  --primary-dark: #005969;
  --bg: #f5f7fa;
  --text: #222;
  --accent: #ffc857;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* HEADER */

header {
  background: linear-gradient(135deg, #003f5c, #007b8f);
  color: white;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: #e6f7fb;
  text-decoration: none;
  margin-left: 10px;
  font-size: 0.9rem;
}

nav a:hover {
  text-decoration: underline;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #fff;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.btn-whatsapp span {
  font-size: 1.1rem;
}

/* HERO */

.hero {
  padding: 28px 0 24px;
  background: linear-gradient(135deg, #007b8f, #00a8b5);
  color: white;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 20px;
  align-items: center;
}

.hero h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.hero p {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.hero-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  margin-bottom: 10px;
}

.hero-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.hero-box ul {
  margin-top: 6px;
  padding-left: 18px;
}

.hero-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #222;
  padding: 9px 16px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-outline {
  border-radius: 999px;
  border: 1px solid #fff;
  padding: 8px 14px;
  color: #fff;
  background: transparent;
  text-decoration: none;
  font-size: 0.85rem;
}

/* HERO CARD + IMAGE */

.hero-card-wrapper {
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
}

.hero-card-image {
  background: radial-gradient(circle at 10% 20%, #ffffff22 0, #00000011 60%);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 0.85rem;
}

.car-badge {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.hero-card {
  background: #fff;
  color: #222;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.hero-card h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.hero-form label {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 3px;
  font-weight: 600;
}

.hero-form input,
.hero-form textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid #ccd5dd;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.hero-form textarea {
  min-height: 56px;
  resize: vertical;
}

.hero-form button {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 0;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.hero-form button:hover {
  background: var(--primary-dark);
}

.hero-small {
  font-size: 0.75rem;
  margin-top: 6px;
}

.hero-small.alt {
  margin-top: 10px;
  border-top: 1px solid #e6e6e6;
  padding-top: 6px;
}

/* SEZIONI GENERICHE */

section {
  padding: 26px 0;
}

h2.section-title {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: #fff;
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  font-size: 0.85rem;
}

.card h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  background: #e5f7fa;
  color: #006a7a;
  border-radius: 999px;
  padding: 3px 7px;
  margin-bottom: 5px;
}

/* TABELLE TRATTE */

.routes-group {
  margin-bottom: 20px;
}

.routes-group h3 {
  font-size: 0.98rem;
  margin-bottom: 3px;
}

.routes-group small {
  color: #555;
  font-size: 0.78rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 420px;
}

th, td {
  padding: 7px 9px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
}

th {
  background: #edf7fa;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

.note {
  font-size: 0.78rem;
  color: #666;
  margin-top: 5px;
}

/* FOOTER */

footer {
  background: #0b1720;
  color: #b9c5d1;
  padding: 14px 0;
  margin-top: 18px;
  font-size: 0.78rem;
  text-align: left;
}

footer a {
  color: #e6f7fb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* WHATSAPP FLOATING BUTTON */

.wa-floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.6rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  z-index: 50;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  header {
    padding: 10px 10px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  nav a {
    margin-left: 0;
    margin-right: 8px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 22px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .btn-primary, .btn-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
