/* ==========================================================================
   Chat Sardegna — Style
   Colori della terra sarda: ocra, verde macchia, azzurro mare
   ========================================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  line-height: 1.7;
  color: #3b2e24;
  background-color: #fdf7f0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  background: linear-gradient(160deg, #5c3d2e 0%, #7a5c3e 50%, #3d6b35 100%);
  color: #fff;
  text-align: center;
  padding: 2.5rem 1rem;
  border-bottom: 6px solid #c67b3c;
}

.site-header .site-brand {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.site-header .tagline {
  font-size: 1rem;
  opacity: 0.85;
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: linear-gradient(180deg, #fdf7f0 0%, #f8efe4 100%);
}

.hero h1 {
  font-size: clamp(1.6rem, 5.5vw, 2.4rem);
  color: #5c3d2e;
  margin-bottom: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
}

.hero .hero-lead {
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.08rem;
  color: #5c4a3a;
  line-height: 1.75;
}

/* --- CTA Button --- */
.cta-button {
  display: inline-block;
  background: #1a8fc9;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(26, 143, 201, 0.3);
  letter-spacing: 0.5px;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: #1579ad;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26, 143, 201, 0.4);
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button--large {
  font-size: 1.35rem;
  padding: 1.15rem 3rem;
  box-shadow: 0 6px 22px rgba(26, 143, 201, 0.35);
}

.cta-subtext {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: #7a6a5a;
  font-style: italic;
}

/* --- Spunta decorativa --- */
.section-divider {
  text-align: center;
  padding: 1.5rem 0 0;
  font-size: 2rem;
  color: #c67b3c;
  opacity: 0.6;
}

/* --- Sezione racconto (ex deep-dive) --- */
.racconto {
  padding: 2.5rem 1.5rem 3rem;
  background-color: #f8efe4;
}

.racconto h2 {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  color: #3d6b35;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.racconto p {
  max-width: 720px;
  font-size: 1.02rem;
  color: #5c4a3a;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.racconto p:last-child {
  margin-bottom: 0;
}


/* --- Confronto (tabella comparativa) --- */
.confronto {
  padding: 3rem 1.5rem;
  background-color: #f8efe4;
}

.confronto h2 {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  color: #5c3d2e;
  margin-bottom: 2rem;
  text-align: center;
}

.confronto-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.confronto-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
  background: #fdf7f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.confronto-table thead th {
  background: #5c3d2e;
  color: #fff;
  padding: 0.9rem 0.75rem;
  font-size: 0.9rem;
  text-align: left;
  font-weight: 700;
}

.confronto-table thead th:first-child {
  border-radius: 12px 0 0 0;
}

.confronto-table thead th:last-child {
  border-radius: 0 12px 0 0;
}

.confronto-table thead th:nth-child(2) {
  background: #7a5c3e;
}

.confronto-table thead th:nth-child(3) {
  background: #3d6b35;
}

.confronto-table td {
  padding: 0.85rem 0.75rem;
  font-size: 0.88rem;
  border-bottom: 1px solid #e8d9c5;
  vertical-align: top;
  line-height: 1.5;
}

.confronto-table tbody tr:last-child td {
  border-bottom: none;
}

.confronto-table td:first-child {
  font-weight: 700;
  color: #5c3d2e;
  white-space: nowrap;
}

.conf-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.conf-label--altri {
  background: #7a5c3e;
  color: #fff;
}

.conf-label--noi {
  background: #3d6b35;
  color: #fff;
}

.conf-no {
  color: #a04040;
}

.conf-si {
  color: #3d6b35;
  font-weight: 600;
}

/* --- CTA Intermedia --- */
.cta-intermedia {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: linear-gradient(180deg, #fdf7f0 0%, #f8efe4 100%);
}

.cta-intermedia h2 {
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  color: #5c3d2e;
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-intermedia p {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.02rem;
  color: #5c4a3a;
  line-height: 1.7;
}

/* --- Features Section (più organica) --- */
.features {
  padding: 3rem 1.5rem;
  background-color: #fdf7f0;
}

.features .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

.feature-card:hover {
  transform: none;
  box-shadow: none;
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  color: #3d6b35;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.feature-card p {
  font-size: 0.95rem;
  color: #6b5b4a;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.65;
}

/* --- Cities Section --- */
.cities {
  padding: 3rem 1.5rem;
  background-color: #f8efe4;
}

.cities h2 {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  color: #5c3d2e;
  margin-bottom: 0.5rem;
  text-align: center;
}

.cities-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  color: #6b5b4a;
}

.city-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.city-card {
  background: #fdf7f0;
  border-left: 4px solid #c67b3c;
  border-radius: 6px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.city-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.city-card h3 {
  font-size: 1.1rem;
  color: #3d6b35;
  margin-bottom: 0.5rem;
}

.city-card p {
  font-size: 0.93rem;
  color: #6b5b4a;
  line-height: 1.65;
}

/* --- Luoghi Section --- */
.luoghi {
  padding: 3rem 1.5rem;
  background-color: #fdf7f0;
}

.luoghi h2 {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  color: #5c3d2e;
  margin-bottom: 0.5rem;
  text-align: center;
}

.luoghi-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  color: #6b5b4a;
}

.luoghi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.luogo-card {
  background: #f8efe4;
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.luogo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.luogo-card h3 {
  font-size: 1.1rem;
  color: #3d6b35;
  margin-bottom: 0.6rem;
}

.luogo-card p {
  font-size: 0.93rem;
  color: #6b5b4a;
  line-height: 1.65;
  margin-bottom: 1rem;
  font-style: italic;
}

.maps-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #c67b3c;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.maps-link:hover {
  background: #a8632e;
}

/* --- FAQ Section --- */
.faq {
  padding: 3rem 1.5rem;
  background-color: #f8efe4;
}

.faq h2 {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  color: #5c3d2e;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-list {
  max-width: 620px;
  margin: 0 auto;
}

.faq-item {
  background: #fdf7f0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid #e8d9c5;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item dt {
  font-weight: 700;
  font-size: 1.02rem;
  color: #5c3d2e;
  margin-bottom: 0.4rem;
}

.faq-item dd {
  font-size: 0.93rem;
  color: #6b5b4a;
  line-height: 1.6;
  margin-left: 0;
}

/* --- CTA Final Section --- */
.cta-final {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: linear-gradient(160deg, #5c3d2e 0%, #3d6b35 100%);
  color: #fff;
}

.cta-final h2 {
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-final p {
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  opacity: 0.9;
  line-height: 1.7;
}

.cta-final-sub {
  margin-top: 1rem;
  font-size: 0.88rem;
  opacity: 0.65;
  font-style: italic;
}

/* --- Generic Page Content --- */
.page-content {
  padding: 3rem 1.5rem;
  background-color: #fdf7f0;
}

.page-content h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: #5c3d2e;
  margin-bottom: 1rem;
}

.page-content p {
  font-size: 1rem;
  color: #5c4a3a;
  margin-bottom: 1.5rem;
}

.back-link {
  margin-top: 2rem;
  font-size: 0.95rem;
}

.back-link a {
  color: #c67b3c;
  font-weight: 600;
  transition: color 0.2s ease;
}

.back-link a:hover {
  color: #a8632e;
}

/* --- Contact Form --- */
.contact-form {
  max-width: 520px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #3b2e24;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d4c8b6;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a8fc9;
  box-shadow: 0 0 0 3px rgba(26, 143, 201, 0.12);
}

.contact-form .cta-button {
  margin-top: 0.5rem;
}

/* --- Footer --- */
.site-footer {
  background: #3b2e24;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 2rem 1.5rem;
}

.site-footer nav a {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.site-footer nav a:hover {
  color: #c67b3c;
}

.site-footer .separator {
  margin: 0 0.6rem;
  opacity: 0.35;
}

.site-footer .copyright {
  font-size: 0.82rem;
  margin-top: 0.75rem;
  opacity: 0.55;
}

/* --- Accessibility --- */
:focus-visible {
  outline: 2px solid #c67b3c;
  outline-offset: 2px;
}

/* --- Responsive: Tablet & up --- */
@media (min-width: 600px) {
  .features .container {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 4.5rem 2rem;
  }

  .racconto {
    padding: 3.5rem 2rem 4rem;
  }

  .cta-intermedia {
    padding: 4.5rem 2rem;
  }

  .features {
    padding: 4rem 2rem;
  }

  .cities {
    padding: 4rem 2rem;
  }

  .city-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .luoghi {
    padding: 4rem 2rem;
  }

  .luoghi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-final {
    padding: 4.5rem 2rem;
  }

  .page-content {
    padding: 4rem 2rem;
  }
}

/* --- Responsive: Desktop --- */
@media (min-width: 960px) {
  .hero {
    padding: 5rem 2rem;
  }

  .racconto {
    padding: 4rem 2rem 5rem;
  }

  .cta-intermedia {
    padding: 5rem 2rem;
  }

  .cities {
    padding: 5rem 2rem;
  }

  .luoghi {
    padding: 5rem 2rem;
  }

  .luoghi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-final {
    padding: 5rem 2rem;
  }
}

/* --- Print Styles --- */
@media print {
  .cta-button,
  .contact-form,
  .site-footer nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}