/* ===== SULCIS HOUSE THEME v2 — Mediterraneo ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #fffef9;
  color: #1c1917;
  line-height: 1.6;
}
img  { max-width: 100%; height: auto; }
a    { color: #1593b8; }

/* ---- HEADER ---- */
.sh-header {
  background: #fff;
  border-bottom: 1px solid #e7e5e4;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 12px rgba(21,147,184,.10);
}
.sh-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sh-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  color: #0e6f8f;
  text-decoration: none;
  flex-shrink: 0;
}
.sh-logo-icon { font-size: 24px; }

.sh-header-flag {
  height: 64px;
  width: auto;
  margin-right: 14px;
  flex-shrink: 0;
  display: block;
}

/* Link "Relax" piccolo nell'header, subito dopo la bandiera. L'auto-margin (prima
   sulla bandiera) sta qui, così la nav resta spinta a destra. */
.sh-header-relax {
  margin-right: auto;
  align-self: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .75px;
  color: #0e6f8f;
  text-decoration: none;
  padding: 6px 16px;
  border: 1px solid rgba(21,147,184,.4);
  border-radius: 999px;
  line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.sh-header-relax:hover { background: #1593b8; color: #fff; border-color: #1593b8; }

.sh-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}
.sh-nav ul {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sh-nav li { margin: 0; padding: 0; list-style: none; }
.sh-nav li::marker { content: ''; }
.sh-nav a {
  color: #44403c;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
  white-space: nowrap;
}
.sh-nav a:hover { color: #1593b8; }
.sh-nav .current-menu-item > a,
.sh-nav .current_page_item > a,
.sh-nav .current_page_parent > a,
.sh-nav a[aria-current="page"] {
  color: #1593b8;
  background: rgba(21,147,184,.12);
  border-radius: 6px;
  padding: 5px 8px;
}
.sh-nav-cta {
  background: #1593b8;
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: background .15s !important;
}
.sh-nav-cta:hover { background: #0e6f8f !important; }
.sh-nav-cta.sh-nav-cta--current { background: #0e6f8f !important; box-shadow: 0 0 0 3px rgba(21,147,184,.18); }

.sh-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.sh-hamburger span { display: block; width: 24px; height: 2px; background: #1c1917; border-radius: 2px; transition: all .2s; }

/* ---- MAIN ---- */
.sh-main {
  min-height: calc(100vh - 68px - 240px);
  padding: 24px 20px 0;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---- FOOTER ---- */
.sh-footer {
  background: #102a36;
  color: #9fb3bd;
  margin-top: 80px;
  padding: 56px 20px 0;
}
.sh-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 24px;
}
.sh-footer-brand { }
.sh-footer-logo { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.sh-footer-sardegna-logo {
  display: block;
  width: 135px;
  height: auto;
  margin-top: 16px;
}
.sh-footer p { font-size: 14px; margin: 6px 0; line-height: 1.6; }
.sh-footer h4 { color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 16px; }
.sh-footer a { color: #9fb3bd; text-decoration: none; }
.sh-footer a:hover { color: #fff; }
.sh-footer br { display: block; margin-bottom: 6px; content: ''; }
.sh-footer-cta {
  display: inline-block;
  background: #1593b8;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.sh-footer-cta:hover { background: #0e6f8f !important; }
.sh-footer-bottom {
  border-top: 1px solid #1c3a48;
  padding: 14px 0;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  color: #78716c;
}
.sh-footer-bottom p { margin: 0; }

/* ---- SCROLL OFFSET (sticky header) ---- */
[id] { scroll-margin-top: 84px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .sh-hamburger { display: flex; }
  .sh-nav { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e7e5e4; padding: 16px 20px; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.1); }
  .sh-nav.open { display: flex; }
  .sh-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .sh-nav li { width: 100%; text-align: center; }
  .sh-nav a { padding: 8px 0; border-bottom: 1px solid #f5f5f4; }
  .sh-nav a:last-child { border-bottom: none; }
  .sh-header { position: relative; }
  .sh-main { padding: 16px; }
  .sh-footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .sh-header-flag { height: 48px; }
  .sh-footer-sardegna-logo { width: 105px; margin-top: 12px; }
}

/* ===== Selettore lingua (Polylang) ===== */
.sh-lang{display:inline-flex;gap:4px;align-items:center;vertical-align:middle}
.sh-lang--header{margin-left:0;align-self:center;flex-shrink:0}
.sh-lang-item{font-size:12px;font-weight:700;letter-spacing:.5px;color:#5a6b76;text-decoration:none;padding:3px 6px;border-radius:6px;line-height:1;transition:color .15s,background .15s}
.sh-lang-item:hover{color:#1593b8;background:rgba(21,147,184,.08)}
.sh-lang-item--current{color:#1593b8;background:rgba(21,147,184,.12)}
.sh-lang--footer{margin-top:10px;justify-content:center}
.sh-lang--footer .sh-lang-item{color:#9fb4c0}
.sh-lang--footer .sh-lang-item--current{color:#fff}
@media(max-width:880px){.sh-lang--header{margin:10px 0 0;justify-content:center;width:100%}}

/* ===== NAV compatta su viewport intermedi (901-1280px) ===== */
@media (min-width: 901px) and (max-width: 1280px) {
  .sh-nav { gap: 10px; }
  .sh-nav a { font-size: 13px; }
  .sh-nav-cta { padding: 8px 14px; }
}
