/*
Theme Name: Soggiorni Benessere
Theme URI: https://www.soggiornibenessere.it
Author: Soggiorni Benessere
Description: Tema per portale di SPA, terme e centri benessere in Italia. Directory strutture con localizzazione e rating, ricerca in home, destinazioni, weekend benessere, SPA in giornata, guide e news, newsletter con sconti, box autore e modulo segnalazione strutture.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sbn
Tags: blog, directory, custom-menu, custom-logo, featured-images, right-sidebar, translation-ready
*/

:root {
  --sbn-green: #2f6b5f;
  --sbn-green-dark: #1f4a41;
  --sbn-gold: #c69b5e;
  --sbn-sand: #f6f1e9;
  --sbn-ink: #1f2422;
  --sbn-muted: #6b7671;
  --sbn-line: #e3ded5;
  --sbn-white: #ffffff;
  --sbn-radius: 14px;
  --sbn-shadow: 0 10px 30px rgba(31, 74, 65, .08);
  --sbn-wrap: 1200px;
  --sbn-sidebar: 300px;
  --sbn-font-title: "Georgia", "Times New Roman", serif;
  --sbn-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sbn-font-body);
  color: var(--sbn-ink);
  background: var(--sbn-white);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sbn-green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--sbn-font-title); line-height: 1.2; color: var(--sbn-ink); }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

.sbn-wrap { max-width: var(--sbn-wrap); margin: 0 auto; padding: 0 20px; }
.sbn-muted { color: var(--sbn-muted); }
.sbn-center { text-align: center; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Buttons */
.sbn-btn {
  display: inline-block;
  background: var(--sbn-green);
  color: #fff !important;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-decoration: none !important;
  font-size: .95rem;
}
.sbn-btn:hover { background: var(--sbn-green-dark); }
.sbn-btn-gold { background: var(--sbn-gold); }
.sbn-btn-gold:hover { background: #b0854a; }
.sbn-btn-ghost { background: transparent; color: var(--sbn-green) !important; border: 1px solid var(--sbn-green); }
.sbn-btn-ghost:hover { background: var(--sbn-sand); }
.sbn-btn-block { display: block; width: 100%; text-align: center; }

/* Header */
.sbn-topbar { background: var(--sbn-green-dark); color: #dfeae6; font-size: .82rem; }
.sbn-topbar .sbn-wrap { display: flex; justify-content: space-between; gap: 16px; padding: 8px 20px; }
.sbn-topbar a { color: #fff; }
.sbn-header { border-bottom: 1px solid var(--sbn-line); background: #fff; position: relative; z-index: 20; }
.sbn-header-inner { display: flex; align-items: center; gap: 24px; padding: 18px 20px; }
.sbn-brand { font-family: var(--sbn-font-title); font-size: 1.55rem; font-weight: 700; color: var(--sbn-ink); }
.sbn-brand span { color: var(--sbn-green); }
.sbn-brand small { display: block; font-family: var(--sbn-font-body); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sbn-muted); font-weight: 600; }
.sbn-nav { margin-left: auto; }
.sbn-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; align-items: center; }
.sbn-nav li { position: relative; }
.sbn-nav a { color: var(--sbn-ink); font-weight: 600; font-size: .95rem; }
.sbn-nav a:hover { color: var(--sbn-green); text-decoration: none; }
.sbn-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--sbn-line); border-radius: 10px; padding: 10px; min-width: 220px; flex-direction: column; gap: 8px; box-shadow: var(--sbn-shadow); }
.sbn-nav li:hover > .sub-menu { display: flex; }
.sbn-menu-toggle { display: none; background: none; border: 1px solid var(--sbn-line); border-radius: 8px; padding: 8px 12px; cursor: pointer; }

/* Hero + search */
.sbn-hero { position: relative; background: linear-gradient(135deg, #24544b, #2f6b5f 55%, #3f8375); color: #fff; padding: 76px 0 96px; }
.sbn-hero h1 { color: #fff; max-width: 760px; margin: 0 0 12px; font-size: 2.7rem; }
.sbn-hero p.sbn-lead { max-width: 640px; color: #e7f1ee; font-size: 1.1rem; margin: 0 0 28px; }
.sbn-search {
  background: #fff; border-radius: var(--sbn-radius); padding: 18px; box-shadow: var(--sbn-shadow);
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end;
}
.sbn-search label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sbn-muted); font-weight: 700; margin-bottom: 6px; }
.sbn-search select, .sbn-search input[type="text"], .sbn-search input[type="search"] {
  width: 100%; padding: 11px 12px; border: 1px solid var(--sbn-line); border-radius: 10px; background: #fdfcfa; font-size: .95rem; color: var(--sbn-ink);
}
.sbn-search-toggle { display: inline-flex; gap: 6px; background: rgba(255,255,255,.14); padding: 6px; border-radius: 999px; margin-bottom: 18px; }
.sbn-search-toggle a { color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.sbn-search-toggle a.is-active { background: #fff; color: var(--sbn-green-dark) !important; }

/* Sections */
.sbn-section { padding: 56px 0; }
.sbn-section-alt { background: var(--sbn-sand); }
.sbn-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.sbn-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 700; color: var(--sbn-gold); margin: 0 0 6px; }
.sbn-section-head h2 { margin: 0; }
.sbn-grid { display: grid; gap: 22px; }
.sbn-grid-2 { grid-template-columns: repeat(2, 1fr); }
.sbn-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sbn-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards */
.sbn-card { position: relative; background: #fff; border: 1px solid var(--sbn-line); border-radius: var(--sbn-radius); overflow: hidden; display: flex; flex-direction: column; }
.sbn-card:hover { box-shadow: var(--sbn-shadow); }
.sbn-card-thumb { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, #dbe7e3, #f2ece2); overflow: hidden; }
.sbn-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sbn-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sbn-card-body h3 { margin: 0; font-size: 1.14rem; }
.sbn-card-body h3 a { color: var(--sbn-ink); }
.sbn-card-excerpt { font-size: .93rem; color: var(--sbn-muted); margin: 0; }
.sbn-card-meta { font-size: .82rem; color: var(--sbn-muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sbn-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 6px; }
.sbn-price { font-weight: 700; color: var(--sbn-green-dark); font-size: .95rem; }
.sbn-badge { display: inline-block; background: var(--sbn-sand); color: var(--sbn-green-dark); border-radius: 999px; padding: 4px 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sbn-badge-verified { background: #e6f2ec; color: #1f6b4c; }
.sbn-badge-float { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94); }
.sbn-fav { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.94); border: 0; border-radius: 999px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; line-height: 1; }
.sbn-fav.is-on { background: var(--sbn-gold); color: #fff; }

/* Rating */
.sbn-rating { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--sbn-green-dark); font-size: .9rem; }
.sbn-stars { color: var(--sbn-gold); letter-spacing: 1px; }
.sbn-rating-big { background: var(--sbn-green); color: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 700; }

/* Destinations */
.sbn-area-card { background: #fff; border: 1px solid var(--sbn-line); border-radius: var(--sbn-radius); padding: 22px; }
.sbn-area-card h3 { margin: 0 0 10px; }
.sbn-area-card ul { list-style: none; margin: 0; padding: 0; columns: 2; font-size: .93rem; }
.sbn-area-card li { margin-bottom: 6px; }

/* Content + sidebar layout */
.sbn-layout { display: grid; grid-template-columns: minmax(0,1fr) var(--sbn-sidebar); gap: 40px; padding: 44px 0 60px; align-items: start; }
.sbn-sidebar { width: var(--sbn-sidebar); position: sticky; top: 20px; }
.sbn-widget { background: #fff; border: 1px solid var(--sbn-line); border-radius: var(--sbn-radius); padding: 18px; margin-bottom: 22px; }
.sbn-widget-title { margin: 0 0 12px; font-size: 1.05rem; }
.sbn-widget ul { list-style: none; margin: 0; padding: 0; }
.sbn-widget li { padding: 8px 0; border-bottom: 1px dashed var(--sbn-line); font-size: .93rem; }
.sbn-widget li:last-child { border-bottom: 0; }
.sbn-mini { display: flex; gap: 12px; align-items: flex-start; }
.sbn-mini img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; flex: 0 0 68px; }

/* Entry */
.sbn-entry-header h1 { margin: 0 0 10px; }
.sbn-entry-meta { font-size: .88rem; color: var(--sbn-muted); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sbn-entry-content > * { margin-bottom: 1.15rem; }
.sbn-entry-content h2 { margin-top: 2rem; }
.sbn-entry-content blockquote { border-left: 4px solid var(--sbn-gold); margin: 0; padding: 6px 18px; background: var(--sbn-sand); }
.sbn-entry-thumb { border-radius: var(--sbn-radius); overflow: hidden; margin-bottom: 22px; }

/* Author box */
.sbn-author-box { display: flex; gap: 18px; background: var(--sbn-sand); border-radius: var(--sbn-radius); padding: 22px; margin: 34px 0; }
.sbn-author-box img { border-radius: 50%; width: 84px; height: 84px; }
.sbn-author-box h3 { margin: 0 0 4px; font-size: 1.1rem; }
.sbn-author-role { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--sbn-gold); font-weight: 700; margin: 0 0 8px; }
.sbn-author-box p { margin: 0 0 8px; font-size: .95rem; }

/* Struttura single */
.sbn-struttura-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; margin-bottom: 26px; }
.sbn-struttura-hero .sbn-main-img, .sbn-struttura-hero .sbn-gallery img { border-radius: var(--sbn-radius); overflow: hidden; }
.sbn-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sbn-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; background: var(--sbn-sand); border-radius: var(--sbn-radius); padding: 20px; margin-bottom: 26px; }
.sbn-fact { font-size: .93rem; }
.sbn-fact strong { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sbn-muted); }
.sbn-services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.sbn-services li { font-size: .93rem; padding-left: 22px; position: relative; }
.sbn-services li:before { content: "✔"; color: var(--sbn-green); position: absolute; left: 0; }
.sbn-booking-box { border: 2px solid var(--sbn-green); border-radius: var(--sbn-radius); padding: 20px; }
.sbn-booking-box .sbn-price { font-size: 1.35rem; }
.sbn-map { border-radius: var(--sbn-radius); overflow: hidden; border: 1px solid var(--sbn-line); }
.sbn-map iframe { display: block; width: 100%; height: 320px; border: 0; }

/* Filters */
.sbn-filters { background: var(--sbn-sand); border-radius: var(--sbn-radius); padding: 18px; margin-bottom: 26px; display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end; }
.sbn-filters select, .sbn-filters input { width: 100%; padding: 10px 12px; border: 1px solid var(--sbn-line); border-radius: 10px; background: #fff; }
.sbn-filters label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--sbn-muted); margin-bottom: 5px; }

/* Newsletter */
.sbn-newsletter { background: linear-gradient(135deg, var(--sbn-green-dark), var(--sbn-green)); color: #fff; border-radius: var(--sbn-radius); padding: 34px; }
.sbn-newsletter h2, .sbn-newsletter h3 { color: #fff; margin-top: 0; }
.sbn-newsletter p { color: #e3efeb; }
.sbn-newsletter form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.sbn-newsletter input[type="email"], .sbn-newsletter input[type="text"] { flex: 1 1 200px; padding: 12px 14px; border: 0; border-radius: 999px; font-size: .95rem; }
.sbn-newsletter .sbn-btn { background: var(--sbn-gold); }
.sbn-coupon { display: inline-block; background: rgba(255,255,255,.15); border: 1px dashed rgba(255,255,255,.6); border-radius: 10px; padding: 10px 16px; font-weight: 700; letter-spacing: .12em; margin-top: 14px; }
.sbn-widget .sbn-newsletter { padding: 20px; }

/* Forms / notices */
.sbn-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sbn-form-grid .sbn-full { grid-column: 1 / -1; }
.sbn-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.sbn-form input[type="text"], .sbn-form input[type="email"], .sbn-form input[type="tel"], .sbn-form input[type="url"], .sbn-form input[type="number"], .sbn-form input[type="date"], .sbn-form select, .sbn-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--sbn-line); border-radius: 10px; font-size: .95rem; font-family: inherit; background: #fff;
}
.sbn-form textarea { min-height: 150px; }
.sbn-hp { position: absolute; left: -9999px; }
.sbn-dropzone { border: 2px dashed var(--sbn-line); border-radius: var(--sbn-radius); padding: 26px; text-align: center; background: #fdfcfa; cursor: pointer; }
.sbn-dropzone.is-over { border-color: var(--sbn-green); background: #f1f7f4; }
.sbn-filelist { list-style: none; padding: 0; margin: 10px 0 0; font-size: .88rem; }
.sbn-notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; }
.sbn-notice-ok { background: #e7f4ec; border: 1px solid #b9dfc9; color: #1c5b3a; }
.sbn-notice-err { background: #fdecec; border: 1px solid #f2c2c2; color: #8a2222; }
.sbn-trust { background: var(--sbn-sand); border-left: 4px solid var(--sbn-gold); border-radius: 10px; padding: 16px 20px; font-size: .92rem; }

/* Modal */
.sbn-modal { position: fixed; inset: 0; background: rgba(20,30,28,.6); display: none; align-items: center; justify-content: center; z-index: 999; padding: 20px; }
.sbn-modal.is-open { display: flex; }
.sbn-modal-inner { background: #fff; border-radius: var(--sbn-radius); padding: 26px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; position: relative; }
.sbn-modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 1.4rem; cursor: pointer; }

/* Pagination */
.sbn-pagination { display: flex; gap: 8px; justify-content: center; margin: 34px 0; flex-wrap: wrap; }
.sbn-pagination .page-numbers { padding: 9px 14px; border: 1px solid var(--sbn-line); border-radius: 8px; color: var(--sbn-ink); }
.sbn-pagination .current { background: var(--sbn-green); color: #fff; border-color: var(--sbn-green); }

/* Footer */
.sbn-footer { background: var(--sbn-ink); color: #cbd4d1; margin-top: 40px; padding: 50px 0 20px; font-size: .93rem; }
.sbn-footer h3 { color: #fff; font-size: 1.05rem; }
.sbn-footer a { color: #eae3d6; }
.sbn-footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.sbn-footer ul { list-style: none; padding: 0; margin: 0; }
.sbn-footer li { padding: 5px 0; }
.sbn-footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 16px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* WhatsApp float */
.sbn-wa { position: fixed; right: 18px; bottom: 18px; background: #25d366; color: #fff !important; border-radius: 999px; padding: 12px 18px; font-weight: 700; box-shadow: var(--sbn-shadow); z-index: 80; }

/* WP core */
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.wp-caption, .gallery-caption { font-size: .85rem; color: var(--sbn-muted); }
.sticky .sbn-card { border-color: var(--sbn-gold); }
.comment-list { list-style: none; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--sbn-line); padding: 14px 0; }

@media (max-width: 1080px) {
  .sbn-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sbn-search, .sbn-filters { grid-template-columns: repeat(2, 1fr); }
  .sbn-search .sbn-btn, .sbn-filters .sbn-btn { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .sbn-layout { grid-template-columns: 1fr; }
  .sbn-sidebar { width: 100%; position: static; }
  .sbn-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .sbn-struttura-hero { grid-template-columns: 1fr; }
  .sbn-footer-cols { grid-template-columns: repeat(2, 1fr); }
  .sbn-menu-toggle { display: block; margin-left: auto; }
  .sbn-nav { display: none; width: 100%; order: 3; }
  .sbn-nav.is-open { display: block; }
  .sbn-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; }
  .sbn-nav .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding: 4px 0 4px 14px; }
  .sbn-header-inner { flex-wrap: wrap; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  h1, .sbn-hero h1 { font-size: 1.9rem; }
  .sbn-grid-2, .sbn-grid-3, .sbn-grid-4 { grid-template-columns: 1fr; }
  .sbn-search, .sbn-filters, .sbn-form-grid, .sbn-facts { grid-template-columns: 1fr; }
  .sbn-footer-cols { grid-template-columns: 1fr; }
  .sbn-author-box { flex-direction: column; }
}

/* === v1.0.1 fix layout pagine interne === */
.sbn-sidebar .sbn-search,.sbn-sidebar form.sbn-search{display:flex!important;flex-direction:column;gap:10px;grid-template-columns:none!important;padding:14px}
.sbn-sidebar .sbn-search>*,.sbn-sidebar .sbn-search select,.sbn-sidebar .sbn-search input,.sbn-sidebar .sbn-search button{width:100%;min-width:0}
ul.sbn-mini{display:block!important;list-style:none;margin:0;padding:0}
ul.sbn-mini>li{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(0,0,0,.07)}
ul.sbn-mini>li:last-child{border-bottom:0}
ul.sbn-mini img,ul.sbn-mini .sbn-placeholder,ul.sbn-mini svg{width:68px!important;height:68px!important;flex:0 0 68px;object-fit:cover;border-radius:8px}
ul.sbn-mini li>div,ul.sbn-mini li>span{min-width:0;flex:1}
.sbn-placeholder{display:flex!important;align-items:center;justify-content:center;width:100%;aspect-ratio:4/3;background:linear-gradient(135deg,#2f6b5f,#c69b5e 120%);color:#f6f1e9;font-family:Georgia,serif;font-size:2.6rem;font-weight:700;border-radius:inherit;overflow:hidden}
ul.sbn-mini .sbn-placeholder{font-size:1.4rem;aspect-ratio:1}
.sbn-sort,.sbn-filters.sbn-sort,.sbn-orderby{display:flex!important;flex-wrap:wrap;gap:12px;align-items:center;grid-template-columns:none!important;margin:0 0 18px}
