/* ═══════════════════════════════════════════════════
   Sardegna B&B Portal - Tema principale v2.0
   ═══════════════════════════════════════════════════ */

:root {
  --primary:   #FF5A5F;
  --secondary: #00A699;
  --dark:      #222222;
  --gray:      #717171;
  --gray-light:#EBEBEB;
  --gray-bg:   #F7F7F7;
  --white:     #FFFFFF;
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --radius:    12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--dark); background: var(--white); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.sbb-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Header ─────────────────────────────────────── */
#sbb-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.sbb-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1200px; margin: 0 auto;
}
.sbb-logo {
  font-size: 22px; font-weight: 800; color: var(--primary);
  letter-spacing: -0.5px; text-decoration: none;
}
.sbb-logo span { color: var(--dark); }
.sbb-nav { display: flex; gap: 28px; align-items: center; }
.sbb-nav a { font-size: 14px; font-weight: 500; color: var(--dark); text-decoration: none; }
.sbb-nav a:hover { color: var(--primary); text-decoration: none; }

/* ── Hero Homepage ──────────────────────────────── */
.sbb-hero {
  background: linear-gradient(135deg, #FF5A5F 0%, #FF8A5B 50%, #FFBC42 100%);
  padding: 80px 24px 100px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.sbb-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 300 Q300 200 600 280 Q900 360 1200 250 L1200 400 L0 400Z' fill='white' fill-opacity='0.1'/%3E%3C/svg%3E") bottom/cover no-repeat;
}
.sbb-hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.sbb-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin-bottom: 16px; line-height: 1.1; }
.sbb-hero p  { font-size: 18px; opacity: .9; margin-bottom: 36px; }
.sbb-hero-search {
  background: var(--white);
  border-radius: 40px;
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  max-width: 600px;
  margin: 0 auto;
}
.sbb-hero-search input {
  flex: 1; border: none; padding: 12px 16px; font-size: 15px;
  outline: none; background: transparent; color: var(--dark);
}
.sbb-hero-search button {
  background: var(--primary); color: var(--white);
  border: none; padding: 12px 24px; border-radius: 30px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.sbb-hero-search button:hover { background: #e0484d; }

/* ── Numeri stats ───────────────────────────────── */
.sbb-stats {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 700px;
  margin: -30px auto 50px;
  position: relative;
  z-index: 10;
  overflow: hidden;
}
.sbb-stat {
  flex: 1; text-align: center; padding: 20px 10px;
  border-right: 1px solid var(--gray-light);
}
.sbb-stat:last-child { border-right: none; }
.sbb-stat-num { font-size: 28px; font-weight: 800; color: var(--primary); }
.sbb-stat-label { font-size: 12px; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; }

/* ── Section ────────────────────────────────────── */
.sbb-section { padding: 50px 0; }
.sbb-section-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.sbb-section-sub   { color: var(--gray); font-size: 15px; margin-bottom: 28px; }
.sbb-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 10px; }
.sbb-see-all { font-size: 14px; font-weight: 600; color: var(--dark); text-decoration: underline; }

/* ── Zone cards ─────────────────────────────────── */
.sbb-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.sbb-zona-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.sbb-zona-card:hover img { transform: scale(1.05); }
.sbb-zona-card img { width:100%;height:100%;object-fit:cover;transition:transform .3s; }
.sbb-zona-card-bg-placeholder {
  width:100%;height:100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.sbb-zona-overlay {
  position:absolute;inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
  display:flex;flex-direction:column;justify-content:flex-end;
  padding:20px;color:var(--white);
}
.sbb-zona-overlay h3 { font-size:20px;font-weight:700; }
.sbb-zona-overlay span { font-size:13px;opacity:.85; }

/* ── Archivio ───────────────────────────────────── */
.sbb-archive-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: var(--white);
  padding: 60px 24px 50px;
  text-align: center;
}
.sbb-archive-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.sbb-archive-hero p  { opacity: .8; margin-top: 8px; font-size: 16px; }
.sbb-archive-hero .sbb-breadcrumb { justify-content: center; opacity: .7; margin-top: 16px; }

/* ── Breadcrumb ─────────────────────────────────── */
.sbb-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gray);
  padding: 14px 0;
}
.sbb-breadcrumb a { color: var(--gray); }
.sbb-breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.sbb-breadcrumb span { opacity: .5; }

/* ── Struttura singola ──────────────────────────── */
.sbb-struttura-wrap { max-width: 1100px; margin: 0 auto; padding: 30px 24px 60px; }
.sbb-struttura-title { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin-bottom: 8px; }
.sbb-struttura-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--gray); font-size: 14px; margin-bottom: 24px; align-items: center; }
.sbb-struttura-meta .sbb-card-zona { font-size: 13px; }

.sbb-struttura-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 240px 240px;
  gap: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
}
.sbb-struttura-gallery .sbb-gal-main { grid-row: 1 / 3; }
.sbb-struttura-gallery img { width:100%;height:100%;object-fit:cover;cursor:pointer;transition:opacity .2s; }
.sbb-struttura-gallery img:hover { opacity:.9; }
.sbb-struttura-gallery .sbb-gal-placeholder {
  background:linear-gradient(135deg,#ffecd2,#fcb69f);
  display:flex;align-items:center;justify-content:center;font-size:60px;
}

.sbb-struttura-body { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }

.sbb-struttura-left h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; margin-top: 28px; }
.sbb-struttura-left h2:first-child { margin-top: 0; }
.sbb-struttura-desc { font-size: 16px; line-height: 1.7; color: #333; }

.sbb-servizi-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.sbb-servizio-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; padding: 8px 14px;
  border: 1px solid var(--gray-light);
  border-radius: 8px; background: var(--gray-bg);
}

/* Box prenotazione ─ */
.sbb-booking-box {
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow-md);
}
.sbb-booking-price { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.sbb-booking-price span { font-size: 14px; font-weight: 400; color: var(--gray); }
.sbb-booking-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.sbb-booking-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--gray-light); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.sbb-booking-info-item { padding: 10px 14px; }
.sbb-booking-info-item:first-child { border-right: 1px solid var(--gray-light); }
.sbb-booking-info-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--gray); margin-bottom: 2px; }
.sbb-booking-info-val { font-size: 13px; color: var(--dark); }
.sbb-booking-contacts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sbb-contact-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray); }
.sbb-contact-row a { color: var(--dark); font-weight: 500; }
.sbb-booking-links { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-light); }
.sbb-booking-links a {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 8px 0;
  color: var(--gray); text-decoration: none;
  border-bottom: 1px solid var(--gray-light);
}
.sbb-booking-links a:hover { color: var(--dark); }
.sbb-booking-links a:last-child { border-bottom: none; }

/* ── Footer ─────────────────────────────────────── */
#sbb-footer {
  background: #1a1a2e;
  color: #aaa;
  padding: 50px 24px 24px;
}
.sbb-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 36px;
}
.sbb-footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.sbb-footer-col ul { list-style: none; }
.sbb-footer-col ul li { margin-bottom: 8px; }
.sbb-footer-col ul li a { color: #aaa; font-size: 13px; text-decoration: none; }
.sbb-footer-col ul li a:hover { color: #fff; }
.sbb-footer-col p { font-size: 13px; line-height: 1.6; }
.sbb-footer-logo { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.sbb-footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #333;
  font-size: 12px;
  color: #555;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Lightbox gallery ───────────────────────────── */
.sbb-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
.sbb-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.sbb-lightbox button {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: #fff;
  font-size: 32px; cursor: pointer;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .sbb-struttura-body { grid-template-columns: 1fr; }
  .sbb-booking-box { position: static; }
  .sbb-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sbb-struttura-gallery { grid-template-columns: 1fr; grid-template-rows: auto; }
  .sbb-struttura-gallery .sbb-gal-main { grid-row: auto; }
  .sbb-struttura-gallery .sbb-gal-extra { display: none; }
  .sbb-header-inner { padding: 12px 16px; }
  .sbb-nav { display: none; }
  .sbb-stats { flex-direction: column; }
  .sbb-stat { border-right: none; border-bottom: 1px solid var(--gray-light); }
  .sbb-footer-grid { grid-template-columns: 1fr; }
}
