/* ============================================================
   Bamar Rent - Noleggio Imbarcazioni
   Foglio di stile principale - mobile-first
   ============================================================ */

/* ---------- 1. Variabili / palette marina ---------- */
:root {
  /* Colori */
  --blu-profondo: #0a3d62;   /* blu mare profondo  */
  --blu-medio:    #1e6091;   /* blu intermedio     */
  --blu-chiaro:   #d6e6f2;   /* azzurro tenue      */
  --sabbia:       #f4ead8;   /* sabbia / beige     */
  --bianco:       #ffffff;
  --grigio-testo: #2b3a44;
  --grigio-soft:  #6b7a85;
  --arancio:      #f0871e;   /* accento CTA        */
  --arancio-dark: #d7740d;
  --verde:        #2e9e5b;   /* badge senza patente */

  /* Misure */
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 6px 20px rgba(10, 61, 98, 0.10);
  --shadow-hover: 0 10px 28px rgba(10, 61, 98, 0.18);
  --header-h:  64px;
  --transition: 0.25s ease;

  /* Tipografia */
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- 2. Reset di base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font);
  color: var(--grigio-testo);
  background: var(--bianco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blu-medio); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 3. Layout / container ---------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow { max-width: 680px; }

.section { padding: 56px 0; }
.section-alt { background: var(--sabbia); }

.section-title {
  font-size: 1.7rem;
  color: var(--blu-profondo);
  text-align: center;
  margin-bottom: 12px;
}
.section-intro {
  text-align: center;
  color: var(--grigio-soft);
  max-width: 620px;
  margin: 0 auto 36px;
}

/* Sezione "Chi siamo" */
.about-subtitle {
  font-size: 1.2rem;
  color: var(--blu-profondo);
  text-align: center;
  margin-bottom: 16px;
}
.about-text {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.7;
}

/* ---------- 4. Pulsanti ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-cta { background: var(--arancio); color: var(--bianco); }
.btn-cta:hover { background: var(--arancio-dark); }

.btn-whatsapp { background: #25d366; color: var(--bianco); }
.btn-whatsapp:hover { background: #1da851; }

.btn-outline {
  background: transparent;
  color: var(--blu-profondo);
  border: 2px solid var(--blu-medio);
}
.btn-outline:hover { background: var(--blu-chiaro); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.92rem; }

/* ---------- 5. Header sticky ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bianco);
  box-shadow: 0 2px 10px rgba(10, 61, 98, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--blu-profondo);
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--arancio); }

/* Navigazione */
.main-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}
.nav-link {
  color: var(--grigio-testo);
  font-weight: 600;
  padding: 6px 0;
}
.nav-link:hover { color: var(--arancio); text-decoration: none; }
.nav-cta { padding: 9px 18px; }

/* Selettore lingua (IT | EN) */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 20px;
  font-weight: 700;
  font-size: 0.92rem;
}
.lang-switch a { color: var(--grigio-testo); }
.lang-switch a:hover { color: var(--arancio); text-decoration: none; }
.lang-switch .is-active { color: var(--blu-profondo); }
.lang-switch .sep { color: var(--blu-chiaro); font-weight: 400; }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--blu-profondo);
  border-radius: 3px;
  transition: var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  min-height: 64vh;
  display: flex;
  align-items: center;
  background: var(--blu-profondo) url('../img/hero.jpg') center/cover no-repeat;
  color: var(--bianco);
  text-align: center;
  padding-bottom: 56px;   /* spazio per l'indicatore di scroll */
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,61,98,0.55) 0%, rgba(10,61,98,0.75) 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero-subtitle {
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 28px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

/* Indicatore "scorri": chevron animato in basso, cliccabile */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bianco);
  z-index: 2;
}
.hero-scroll:hover { text-decoration: none; }
.hero-scroll span {
  display: block;
  width: 14px;
  height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -6px;
  animation: heroBounce 1.8s ease-in-out infinite;
}
@keyframes heroBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.7; }
  50%      { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

/* ---------- 7. Le Barche (griglia card) ---------- */
.boats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.boat-card {
  background: var(--bianco);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.boat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.boat-figure {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--blu-chiaro);
}
.boat-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.boat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--verde);
  color: var(--bianco);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
/* Variante per le barche con comandante a bordo (patente: true) */
.boat-badge-skipper { background: var(--blu-medio); }

.boat-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.boat-name { font-size: 1.25rem; color: var(--blu-profondo); margin-bottom: 4px; }
.boat-type { color: var(--arancio); font-weight: 600; font-size: 0.92rem; margin-bottom: 14px; }

.boat-specs { list-style: none; margin-bottom: 14px; }
.boat-specs li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--blu-chiaro);
  font-size: 0.95rem;
}
.boat-specs li:last-child { border-bottom: none; }
.boat-specs .spec-label { color: var(--grigio-soft); }
.boat-specs .spec-value { font-weight: 600; text-align: right; }

.boat-desc { color: var(--grigio-soft); font-size: 0.95rem; margin-bottom: 16px; }

/* Dotazioni: elenco a "tag" compatti */
.boat-equip { margin-bottom: 18px; }
.boat-equip-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blu-profondo);
  margin-bottom: 8px;
}
.boat-equip-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.boat-equip-list li {
  font-size: 0.8rem;
  color: var(--blu-profondo);
  background: var(--blu-chiaro);
  padding: 4px 10px;
  border-radius: 999px;
}
.boat-card .btn { margin-top: auto; }

/* ---------- 7b. Prezzi / listino ---------- */
.pricing-season + .pricing-season { margin-top: 34px; }
.pricing-season-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 1.15rem;
  color: var(--blu-profondo);
  margin-bottom: 12px;
}
.pricing-period {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grigio-soft);
}
.pricing-table {
  overflow-x: auto;              /* sicurezza su schermi molto stretti */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bianco);
}
.pricing-table-el {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}
.pricing-table-el thead th {
  background: var(--blu-profondo);
  color: var(--bianco);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 14px 16px;
  text-align: center;
}
.pricing-table-el thead th:first-child { text-align: left; }
.pricing-table-el tbody td,
.pricing-table-el tbody th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--blu-chiaro);
  text-align: center;
}
.pricing-table-el tbody tr:last-child td,
.pricing-table-el tbody tr:last-child th { border-bottom: none; }
.pricing-table-el tbody tr:nth-child(even) { background: #fafcfe; }

.price-boat {
  text-align: left;
  font-weight: 700;
  color: var(--blu-profondo);
}
.price-type {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--arancio);
}
.pricing-table-el tbody td { font-weight: 600; }
.price-onreq {
  font-style: italic;
  font-weight: 600 !important;
  color: var(--grigio-soft);
}

.pricing-notes { margin-top: 18px; }
.pricing-notes ul {
  list-style: none;
  max-width: 620px;
  margin: 0 auto;
}
.pricing-notes li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 7px;
  font-size: 0.9rem;
  color: var(--grigio-soft);
}
.pricing-notes li::before {
  content: "\2693";              /* ancora */
  position: absolute;
  left: 0;
  color: var(--blu-medio);
}

/* ---------- 8. Servizi ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.service-card {
  background: var(--bianco);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  text-align: center;
}
.service-icon { font-size: 2.6rem; margin-bottom: 12px; }
.service-card h3 { color: var(--blu-profondo); margin-bottom: 10px; }
.service-card p { color: var(--grigio-soft); font-size: 0.96rem; }

/* ---------- 9. Form richiesta ---------- */
.request-form {
  background: var(--bianco);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0; }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.req { color: var(--arancio); }
.opt { color: var(--grigio-soft); font-weight: 400; font-size: 0.85rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #cdd8e0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--grigio-testo);
  background: var(--bianco);
  transition: border-color var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blu-medio);
}
.field textarea { resize: vertical; }
.field input.invalid,
.field select.invalid { border-color: #d63031; }

.field-check { margin-bottom: 20px; }
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}
.checkbox input { width: auto; margin-top: 3px; flex-shrink: 0; }

.form-error {
  background: #fdecea;
  color: #b3231a;
  border: 1px solid #f5b7b1;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}
.form-success {
  background: #eaf7ef;
  color: #1d7a45;
  border: 1px solid #b6e0c6;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  font-weight: 600;
}
.form-note {
  margin-top: 12px;
  font-size: 0.83rem;
  color: var(--grigio-soft);
  text-align: center;
}

/* Honeypot anti-spam: nascosto agli utenti, visibile ai bot */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* ---------- 10. Contatti ---------- */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.contact-card {
  background: var(--bianco);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  text-align: center;
}
.contact-card h3 { color: var(--blu-profondo); font-size: 1.3rem; margin-bottom: 4px; }
.contact-role { color: var(--grigio-soft); font-size: 0.9rem; margin-bottom: 16px; }
.contact-phone { font-weight: 600; margin-bottom: 16px; display: block; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; }

.contacts-email {
  text-align: center;
  margin-top: 22px;
  font-size: 1.05rem;
  color: var(--grigio-testo);
}
.contacts-email a { font-weight: 600; }

.contacts-place {
  text-align: center;
  margin-top: 26px;
  color: var(--grigio-soft);
}

/* ---------- 11. Footer ---------- */
.site-footer {
  background: var(--blu-profondo);
  color: var(--blu-chiaro);
  padding-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-bottom: 30px;
}
.logo-footer { color: var(--bianco); font-size: 1.3rem; }
.footer-brand p { margin-top: 6px; font-size: 0.92rem; }

.footer-company h4 {
  color: var(--bianco);
  font-size: 1rem;
  margin-bottom: 8px;
}
.footer-company p { font-size: 0.88rem; margin-bottom: 3px; }
.footer-company a { color: var(--blu-chiaro); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 16px 0;
  font-size: 0.85rem;
}
.footer-bottom .container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
.footer-bottom a { color: var(--bianco); }

/* ---------- 12. Pulsante WhatsApp flottante ---------- */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: var(--bianco);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); text-decoration: none; }
.whatsapp-float svg { width: 30px; height: 30px; }

/* ---------- 13. Pagina privacy ---------- */
.legal-page { padding: 40px 0 60px; }
.legal-page h1 { color: var(--blu-profondo); font-size: 1.8rem; margin-bottom: 8px; }
.legal-page h2 { color: var(--blu-medio); font-size: 1.2rem; margin: 28px 0 10px; }
.legal-page p, .legal-page li { color: var(--grigio-testo); margin-bottom: 10px; }
.legal-page ul { padding-left: 22px; }
.legal-back { display: inline-block; margin-top: 30px; }

/* ============================================================
   14. MEDIA QUERIES (tablet e desktop)
   ============================================================ */

/* Tablet */
@media (min-width: 600px) {
  .hero h1 { font-size: 2.6rem; }
  .hero-actions { flex-direction: row; justify-content: center; }
  .boats-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .section-title { font-size: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1.4fr; }
  .footer-bottom .container { flex-direction: row; justify-content: space-between; }
}

/* Desktop */
@media (min-width: 900px) {
  .boats-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { min-height: 54vh; }   /* su desktop più basso: si vede che sotto continua */
  .hero h1 { font-size: 3rem; }
}

/* ---------- 15. Navigazione mobile ---------- */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  /* Selettore lingua sempre visibile, accanto all'hamburger */
  .lang-switch { margin-left: auto; margin-right: 14px; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(78vw, 320px);
    height: calc(100vh - var(--header-h));
    background: var(--bianco);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 22px;
    box-shadow: -6px 0 20px rgba(10,61,98,0.15);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul li { border-bottom: 1px solid var(--blu-chiaro); }
  .nav-link { display: block; padding: 14px 0; }
  .nav-cta { margin-top: 18px; text-align: center; }
}

/* ---------- 16. Accessibilita': riduzione movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 17. Banner consenso cookie ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  background: var(--bianco);
  border-top: 3px solid var(--arancio);
  box-shadow: 0 -6px 24px rgba(10, 61, 98, 0.18);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
}
.cookie-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--grigio-testo);
}
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-actions .btn { padding: 9px 20px; }

.footer-legal-links a { margin: 0 8px; white-space: nowrap; }

@media (min-width: 700px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-text { max-width: 68%; }
}
