/* ===========================================================
   B&B Il Frattiero — www.ilfrattiero.it
   Design tokens replicated from the original Ignition Aegean theme
   =========================================================== */

/* ---------- Self-hosted Jost font (latin subset) ---------- */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jost-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/jost-700.woff2) format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jost-400-italic.woff2) format('woff2');
}

:root {
  --primary: #0188e4;
  --link: #0070c0;
  --button-bg: #2083d5;
  --text: #373737;
  --text-secondary: #6f6f6f;
  --border: #dddddd;
  --grey-bg: #dddddd;
  --topbar-bg: #222222;
  --font: 'Jost', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}
img { max-width: 100%; height: auto; border-style: none; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* In-text links carry an underline so they don't rely on colour alone.
   Nav, sidebar, buttons and card CTAs stay non-underlined. */
main p a, main td a, main li a, .footer a { text-decoration: underline; }
.sidebar a, main a.btn-outline { text-decoration: none; }
h1, h2, h3 { line-height: 1.2; color: var(--text); font-weight: 700; }
h2 { font-size: 30px; margin: 1.6em 0 0.6em; }
h3 { font-size: 22px; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 15px; position: relative; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
[class^="col-"] { padding: 0 15px; width: 100%; }
@media (min-width: 992px) {
  .col-lg-9 { width: 75%; }
  .col-lg-3 { width: 25%; }
  .col-lg-8 { width: 66.66%; }
  .col-lg-6 { width: 50%; }
  .col-lg-4 { width: 33.33%; }
}

/* ---------- Top bar ---------- */
.head-intro {
  background: var(--topbar-bg);
  color: #fff;
  font-size: 14px;
  padding: 7px 0;
}
.head-intro .head-intro-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.head-intro a { color: #fff; }
.head-intro img { vertical-align: middle; }

/* ---------- Header ---------- */
.head-mast { background: #fff; border-bottom: 1px solid var(--border); }
.head-mast-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.site-logo img { width: 220px; height: auto; display: block; }
.nav-main { display: none; }
@media (min-width: 992px) {
  .nav-main { display: block; }
  .mobile-nav-trigger { display: none !important; }
}
.nav-main ul { margin: 0; padding: 0; list-style: none; }
.nav-main > ul > li { display: inline-block; position: relative; }
.nav-main > ul > li > a { display: block; padding: 10px 0; margin: 0 12px; color: #0a0a0a; white-space: nowrap; }
.nav-main a:hover { color: var(--primary); text-decoration: none; }
.nav-main li.current > a { color: var(--primary); }
.nav-main .sub-menu {
  position: absolute; left: 0; top: 100%;
  min-width: 220px; padding: 12px 0;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 0 24px rgba(0,0,0,0.08);
  visibility: hidden; opacity: 0; transform: translateY(10px);
  transition: all .18s ease;
  z-index: 50;
}
.nav-main li:hover > .sub-menu,
.nav-main li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: none; }
.nav-main .sub-menu a { display: block; padding: 6px 18px; color: var(--text); font-size: 15px; }
.has-children > a::after { content: "▾"; font-size: 10px; margin-left: 5px; position: relative; top: -2px; }

.mobile-nav-trigger {
  display: inline-block; border: 2px solid currentColor;
  padding: 6px 18px; color: #0a0a0a; text-transform: uppercase;
  font-size: 14px; background: none; font-family: inherit; cursor: pointer;
}
/* Mobile menu panel */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 10px 0 18px;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0 15px; }
.mobile-nav a { display: block; padding: 10px 4px; color: var(--text); border-bottom: 1px solid #eee; font-size: 17px; }
.mobile-nav .sub a { padding-left: 24px; font-size: 15px; }

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  height: 325px; padding: 45px 0;
  background-size: cover; background-position: center;
  text-align: center;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,0.30);
}
.page-hero h1 {
  position: relative; z-index: 2;
  color: #fff; font-size: 36px; margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
@media (max-width: 991px) { .page-hero { height: 278px; } }
@media (max-width: 575px) { .page-hero { height: 192px; } .page-hero h1 { font-size: 28px; } }

.hero-home     { background-image: url(/assets/img/hero-home.avif); }
.hero-camere   { background-image: url(/assets/img/hero-camere.webp); }
.hero-giardino { background-image: url(/assets/img/hero-giardino.webp); }
.hero-wellness { background-image: url(/assets/img/hero-wellness.webp); }

/* ---------- Main ---------- */
.main { padding: 40px 0 60px; }
.entry-content > :first-child { margin-top: 0; }

/* Sidebar */
.sidebar { margin-top: 10px; }
.widget-title { font-size: 19px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { border-bottom: 1px solid #eee; }
.sidebar a { display: block; padding: 8px 2px; color: var(--text); }
.sidebar a:hover { color: var(--primary); text-decoration: none; }

/* Rounded banner strips (home) */
.banner-strip {
  height: 240px; border-radius: 31px;
  margin: 24px 0;
  width: 100%; object-fit: cover; object-position: right center; display: block;
}

/* Cards row (home) */
.cards { gap: 0; }
.card-col { display: flex; flex-direction: column; }
.card-col img { border-radius: 4px; }
.card-col h3 { margin: 16px 0 8px; }
.card-col p { flex: 1; margin-top: 0; }
.btn-outline {
  display: block; text-align: center;
  border: 2px solid currentColor; border-radius: 50px;
  padding: 10px 28px; color: var(--text); font-weight: 400;
  transition: all .15s ease;
}
.btn-outline:hover { background: var(--primary); border-color: var(--primary); color: #fff; text-decoration: none; }
.btn-solid {
  display: inline-block; background: var(--button-bg); color: #fff;
  padding: 12px 34px; border: 0; border-radius: 3px;
  font-family: inherit; font-size: 17px; cursor: pointer;
}
.btn-solid:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 0; }
.table-stripes { margin: 18px 0; }
.table-stripes table td, .table-stripes table th { padding: 9px 12px; border: 0; text-align: left; vertical-align: middle; }
.table-stripes tbody tr:nth-child(odd) { background: #f5f5f5; }
.table-stripes thead th { border-bottom: 2px solid var(--border); }
.table-caption { font-size: 14px; color: var(--text-secondary); margin-top: 8px; }

/* Two-thirds layouts */
.split { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; margin: 24px 0; }
.split > .third { flex: 1 1 280px; }
.split > .two-thirds { flex: 2.05 1 380px; min-width: 0; }
.lead-italic { font-style: italic; font-size: 19px; }

/* Grey band */
.band { background: var(--grey-bg); padding: 18px 24px; border-radius: 4px; margin: 28px 0; }

/* Icon list */
.icon-list { list-style: none; margin: 0; padding: 0; font-size: 18px; }
.icon-list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.icon-list svg { width: 24px; height: 24px; flex: none; }

/* ---------- Carousel ---------- */
.carousel { position: relative; border: 8px solid #fff; box-shadow: 0 0 18px rgba(0,0,0,0.18); }
.carousel-track {
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  aspect-ratio: 3 / 2;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35); color: #fff; border: 0;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer; z-index: 5;
}
.carousel-btn:hover { background: rgba(0,0,0,0.6); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px; z-index: 5;
}
.carousel-dots button {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid #fff; background: transparent; padding: 0; cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: #fff; }

/* Framed image (theme "border-image" style) */
.framed { border: 8px solid #fff; box-shadow: 0 0 18px rgba(0,0,0,0.18); display: block; }

/* ---------- FAQ accordion ---------- */
.faq details { margin-bottom: 8px; }
.faq summary {
  background: var(--grey-bg); padding: 13px 18px;
  cursor: pointer; font-weight: 400; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 14px 18px; border: 1px solid var(--border); border-top: 0; }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--grey-bg); border-radius: 4px;
  padding: 26px 22px 20px; margin: 26px 0; text-align: center;
}
.testimonial .avatar {
  width: 150px; height: 150px; border-radius: 50%;
  object-fit: cover; margin: -60px auto 12px; display: block;
  border: 5px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.testimonial { margin-top: 80px; }
.testimonial .t-body { font-size: 20px; }
.testimonial .t-cite { font-size: 15px; color: var(--text-secondary); font-style: normal; display: block; margin-top: 10px; }
.testimonial .t-source { font-weight: 700; font-size: 16px; margin-top: 4px; }

/* ---------- Forms (contatti) ---------- */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 5px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #929292; border-radius: 2px;
  font-family: inherit; font-size: 16px; color: var(--text);
  background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--primary); outline-offset: -1px;
}
.form-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.form-check input { width: 18px; height: 18px; margin-top: 4px; flex: none; }
/* Checkbox group (servizio): legend matches the field labels */
.form-fieldset { border: 0; padding: 0; margin: 0 0 16px; min-inline-size: 0; }
.form-fieldset legend { padding: 0; margin-bottom: 8px; }
.form-fieldset .form-check { margin-bottom: 10px; }

/* ---------- CTA centred ---------- */
.center { text-align: center; }

/* ---------- Footer ---------- */
.footer { background: #fff; border-top: 1px solid var(--border); padding: 22px 0; font-size: 14px; color: var(--text-secondary); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.btn-to-top {
  position: fixed; right: 18px; bottom: 18px;
  width: 42px; height: 42px; border-radius: 3px;
  background: var(--button-bg); color: #fff; border: 0;
  font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .2s; z-index: 90;
}
.btn-to-top.show { opacity: 1; pointer-events: auto; }

/* Long-text pages */
.prose { max-width: 820px; }
.prose h3 { margin-top: 1.8em; }

/* Utility */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: #fff; padding: 10px; z-index: 200;
}
.skip-link:focus { left: 10px; }
@media (max-width: 575px) {
  h2 { font-size: 25px; }
  .testimonial .t-body { font-size: 18px; }
  .site-logo img { width: 170px; }
}
