@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,500;0,600;0,700;1,500&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
  --bosco: #26402f;
  --bosco-scuro: #1a2d21;
  --muschio: #5b7a4b;
  --sole: #d4842f;
  --sole-scuro: #b56c1f;
  --sole-chiaro: #fbeedd;
  --pietra: #f4f1ea;
  --carta: #ffffff;
  --testo: #2c312b;
  --tenue: #6a7166;
  --linea: #e4ded1;
  --titoli: "Lora", Georgia, "Times New Roman", serif;
  --testo-font: "Source Sans 3", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  --raggio: 14px;
  --ombra: 0 1px 2px rgba(38, 64, 47, .06), 0 8px 24px rgba(38, 64, 47, .08);
  --ombra-forte: 0 2px 4px rgba(38, 64, 47, .08), 0 18px 40px rgba(38, 64, 47, .16);
}

/* ---------- Basi ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--pietra) !important;
  color: var(--testo);
  font-family: var(--testo-font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--muschio); text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: var(--sole-scuro); }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  color: var(--bosco);
  font-family: var(--titoli);
  font-weight: 600;
  line-height: 1.25;
}
p { margin: 0 0 1em; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sole); outline-offset: 2px; }

.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Icone (al posto di Font Awesome) ---------- */

.fa {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: var(--icona) center / contain no-repeat;
          mask: var(--icona) center / contain no-repeat;
}
.fa-calendar-o {
  --icona: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}
.fa-user {
  --icona: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E");
}
.fa-angle-double-right {
  --icona: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l6 6-6 6M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
.fa-angle-double-left {
  --icona: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6l-6 6 6 6M11 6l-6 6 6 6'/%3E%3C/svg%3E");
}

/* ---------- Menu in alto ---------- */

#masthead { position: relative; }
#cc_spacer { display: none; }
.main-navigation {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 45, 33, .96);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
          backdrop-filter: saturate(140%) blur(8px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 6px 20px rgba(0, 0, 0, .15);
}
.main-navigation > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}
.navbar-header { display: flex; align-items: center; gap: 12px; }
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff !important;
  font-family: var(--titoli);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .01em;
}
.navbar-brand::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M3 25l8-12 5 7 4-5 9 10z' fill='%23fff'/%3E%3Cpath d='M11 13l2.5 3.5L11 16l-1.5 1.5z' fill='%23d4842f'/%3E%3C/svg%3E") center / 22px no-repeat,
    var(--muschio);
}
.navbar-collapse { display: block; }
.primary-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-menu > li > a {
  display: block;
  padding: 9px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  font-size: 15.5px;
  font-weight: 600;
}
.primary-menu > li > a:hover,
.primary-menu > li > a:focus { background: rgba(255, 255, 255, .08); color: #fff; }
.primary-menu > .current-menu-item > a,
.primary-menu > .current_page_item > a,
.primary-menu > .current-menu-ancestor > a { background: var(--sole); color: #fff; }
.primary-menu .sub-menu { display: none; }

/* pulsante del menu (solo su telefono) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 40px;
  padding: 0 11px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  cursor: pointer;
}
.menu-toggle .icon-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .25s, opacity .25s;
}
.menu-toggle[aria-expanded="true"] .icon-bar:nth-of-type(2) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .icon-bar:nth-of-type(3) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .icon-bar:nth-of-type(4) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Testata con foto ---------- */

.site-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: auto !important;
  min-height: clamp(260px, 36vw, 480px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(26, 45, 33, .1) 0%, rgba(26, 45, 33, .25) 45%, rgba(20, 34, 25, .85) 100%),
    url("/wp-content/uploads/2018/03/cropped-11226215243_339de16a07_o-1.jpg") center 35% / cover no-repeat,
    linear-gradient(160deg, #3d5e46, #1a2d21) !important;
  box-shadow: none !important;
}
.site-branding {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px clamp(30px, 5vw, 56px);
}
.site-branding .home-link { display: inline-block; color: #fff; }
.site-title {
  margin: 0;
  color: #fff !important;
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.05;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.site-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  margin: 18px 0 16px;
  border-radius: 2px;
  background: var(--sole) !important;
}
.site-description {
  margin: 0;
  color: rgba(255, 255, 255, .92) !important;
  font-family: var(--testo-font);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 400;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}

/* ---------- Struttura pagina: articoli + barra laterale ---------- */

.site-content { padding: clamp(36px, 5vw, 64px) 0 clamp(50px, 6vw, 80px); }
.site-content > .container > .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.site-content .col-md-9,
.site-content .col-md-3 { width: auto; padding: 0; float: none; }
.site-main { display: grid; gap: 30px; }

/* ---------- Schede articolo ---------- */

article.post-content,
.site-main > article {
  overflow: hidden;
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: var(--raggio);
  box-shadow: var(--ombra);
  transition: transform .25s, box-shadow .25s;
}
.home .site-main > article:hover,
.blog .site-main > article:hover,
.archive .site-main > article:hover { transform: translateY(-3px); box-shadow: var(--ombra-forte); }

.featured-image { background: var(--bosco); }
.featured-image a { display: block; overflow: hidden; }
.featured-image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .6s ease, opacity .3s;
}
.site-main > article:hover .featured-image img { transform: scale(1.03); }

.entry-header { padding: 26px 32px 0; }
.entry-title {
  margin: 0 0 12px;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.3;
}
.entry-title a { color: var(--bosco); }
.entry-title a:hover { color: var(--sole-scuro); }
.entry-meta h5,
h5.entry-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
  color: var(--tenue);
  font-family: var(--testo-font);
  font-size: 14.5px;
  font-weight: 400;
}
.entry-meta .fa { color: var(--sole); margin-right: 4px; }
.entry-meta a { color: var(--tenue); }
.entry-meta a:hover { color: var(--sole-scuro); }
.entry-meta .byline { display: inline-flex; align-items: center; }
.entry-meta .sep { display: none; }

.entry-summary,
.entry-content { padding: 16px 32px 30px; }
.entry-summary p { color: #4a5047; }
.entry-footer:empty { display: none; }
.entry-footer { padding: 0 32px 26px; color: var(--tenue); font-size: 14px; }

.read-more { margin: 6px 0 0; }
.btn,
.btn-default {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--bosco);
  border: 0;
  border-radius: 999px;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background-color .2s, transform .2s;
}
.btn-default::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.btn-default:hover,
.btn-default:focus { background: var(--sole); }
.btn-default:hover::after { transform: translateX(3px); }

/* testo dell'articolo intero (pagine singole) */
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li::marker { color: var(--sole); }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 14px 22px;
  background: var(--sole-chiaro);
  border-left: 4px solid var(--sole);
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

/* ---------- Navigazione tra le pagine ---------- */

.posts-navigation,
.post-navigation { margin-top: 6px; }
.posts-navigation .row,
.post-navigation .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.posts-navigation .col-md-6:empty,
.posts-navigation .col-md-6 > p:empty { display: none; }
.posts-navigation .prev-post { margin-left: auto; }
.posts-navigation a,
.post-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 999px;
  color: var(--bosco);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}
.posts-navigation a:hover,
.post-navigation a:hover { background: var(--bosco); border-color: var(--bosco); color: #fff; }
.posts-navigation .fa { color: var(--sole); }
.posts-navigation a:hover .fa { color: #fff; }

/* ---------- Barra laterale ---------- */

.sidebar { display: grid; gap: 22px; }
.sidebar .widget {
  margin: 0;
  padding: 24px;
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: var(--raggio);
  box-shadow: var(--ombra);
}
.sidebar .widget-title {
  position: relative;
  margin: 0 0 18px;
  padding-bottom: 12px;
  font-size: 19px;
}
.sidebar .widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--sole);
}
.sidebar ul { margin: 0; padding: 0; list-style: none; }

/* ricerca */
.widget_search { padding: 16px !important; }
.search-form,
.search-form label { display: flex; flex: 1; margin: 0; }
.search-form { gap: 8px; }
.search-field {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  background: var(--pietra);
  border: 1px solid var(--linea);
  border-radius: 999px;
  outline: none;
  -webkit-appearance: none;
          appearance: none;
}
.search-field:focus { background: #fff; border-color: var(--muschio); }
.search-submit {
  flex: 0 0 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--bosco)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E")
    center / 20px no-repeat;
  cursor: pointer;
  transition: background-color .2s;
}
.search-submit:hover { background-color: var(--sole); }

/* logo con didascalia */
.widget_media_image { text-align: center; }
.widget_media_image .wp-caption { width: auto !important; max-width: 100%; }
.widget_media_image img {
  width: 170px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--sole-chiaro);
}
.wp-caption-text {
  margin-top: 14px;
  color: var(--tenue);
  font-size: 14.5px;
  font-style: italic;
}

/* articoli recenti */
.widget_recent_entries li {
  padding: 11px 0;
  border-bottom: 1px solid var(--linea);
  line-height: 1.4;
}
.widget_recent_entries li:first-child { padding-top: 0; }
.widget_recent_entries li:last-child { padding-bottom: 0; border-bottom: 0; }
.widget_recent_entries a {
  display: block;
  color: var(--bosco);
  font-size: 15px;
  font-weight: 600;
}
.widget_recent_entries a:hover { color: var(--sole-scuro); }
.widget_recent_entries .post-date {
  display: block;
  margin-top: 4px;
  color: var(--tenue);
  font-size: 13px;
}

/* galleria */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gallery-item { margin: 0; }
.gallery-icon a { display: block; overflow: hidden; border-radius: 10px; }
.gallery-icon img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .4s;
}
.gallery-icon a:hover img { transform: scale(1.08); }
.gallery-caption {
  margin-top: 6px !important;
  font-size: 12px !important;
  line-height: 1.3;
  text-align: center;
}

/* calendario */
#wp-calendar {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
}
#wp-calendar caption {
  padding-bottom: 12px;
  color: var(--bosco);
  font-family: var(--titoli);
  font-size: 17px;
  font-weight: 600;
  text-transform: capitalize;
}
#wp-calendar th {
  padding: 6px 0;
  color: var(--tenue);
  font-size: 12px;
  font-weight: 700;
}
#wp-calendar td { padding: 6px 0; border-radius: 8px; }
#wp-calendar tbody td a {
  display: block;
  border-radius: 8px;
  background: var(--muschio);
  color: #fff;
  font-weight: 700;
}
#wp-calendar #today {
  background: var(--sole);
  color: #fff;
  font-weight: 700;
}
#wp-calendar tfoot td { padding-top: 12px; text-align: left; }
#wp-calendar tfoot #next { text-align: right; }
#wp-calendar tfoot a { font-weight: 700; }

/* menu nella barra laterale */
.widget_nav_menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--bosco);
  font-weight: 600;
}
.widget_nav_menu li a::after { content: "\203A"; color: var(--sole); font-size: 20px; line-height: 1; }
.widget_nav_menu li a:hover { background: var(--pietra); }
.widget_nav_menu .current-menu-item > a { background: var(--sole-chiaro); color: var(--sole-scuro); }

/* nuvola di tag */
.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tagcloud a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--pietra);
  border: 1px solid var(--linea);
  border-radius: 999px;
  color: var(--bosco);
  font-size: 13px !important;
  line-height: 1.4;
  transition: background-color .2s, color .2s, border-color .2s;
}
.tagcloud a:hover { background: var(--bosco); border-color: var(--bosco); color: #fff; }

/* testo */
.widget_text .textwidget p {
  margin: 0;
  color: var(--tenue);
  font-size: 14.5px;
  font-style: italic;
}

/* ---------- Piè di pagina ---------- */

.site-footer {
  margin: 0;
  padding: 30px 24px;
  background: var(--bosco-scuro);
  color: rgba(255, 255, 255, .7);
  font-size: 14.5px;
  text-align: center;
}
.site-footer .row { margin: 0; }
.site-footer .sep { margin: 0 8px; color: var(--sole); }
.site-footer a { color: #fff; }

/* ---------- Commenti e moduli (pagine interne) ---------- */

.comments-area {
  margin-top: 30px;
  padding: 28px 32px;
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: var(--raggio);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--pietra);
  border: 1px solid var(--linea);
  border-radius: 10px;
}
.comment-form input[type="submit"],
.wpcf7 input[type="submit"] {
  padding: 12px 26px;
  background: var(--bosco);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.comment-form input[type="submit"]:hover,
.wpcf7 input[type="submit"]:hover { background: var(--sole); }

/* ---------- Tablet ---------- */

@media (max-width: 991px) {
  .site-content > .container > .row { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .widget_search,
  .widget_tag_cloud { grid-column: 1 / -1; }
}

/* ---------- Telefono ---------- */

@media (max-width: 767px) {
  body { font-size: 16.5px; }
  .container { padding: 0 16px; }

  .main-navigation > .container { flex-wrap: wrap; min-height: 60px; }
  .navbar-header { width: 100%; min-height: 60px; justify-content: space-between; flex-direction: row-reverse; }
  .navbar-brand { font-size: 20px; }
  .menu-toggle { display: inline-flex; }
  .navbar-collapse { display: none; width: 100%; padding: 4px 0 14px; }
  .navbar-collapse.in,
  .main-navigation:focus-within .navbar-collapse { display: block; }
  .primary-menu { flex-direction: column; gap: 2px; }
  .primary-menu > li > a { padding: 11px 14px; border-radius: 10px; }

  .site-header { min-height: 230px; }
  .site-branding { padding: 0 16px 26px; }
  .site-title::after { margin: 12px 0 10px; }

  .entry-header { padding: 20px 20px 0; }
  .entry-summary,
  .entry-content { padding: 12px 20px 22px; }
  .entry-footer { padding: 0 20px 20px; }
  .site-main { gap: 22px; }

  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar .widget { padding: 20px; }
}

/* ---------- Stampa ---------- */

@media print {
  .main-navigation, .sidebar, .posts-navigation, .read-more { display: none !important; }
  .site-header { min-height: 0; background: none !important; }
  .site-title, .site-description { color: #000 !important; text-shadow: none; }
  .site-content > .container > .row { display: block; }
  article.post-content { box-shadow: none; break-inside: avoid; }
}