/*
Theme Name: Visit Terricciola
Theme URI: https://visitterricciola.it
Author: Comune di Terricciola
Author URI: https://www.comune.terricciola.pi.it
Description: Tema WordPress per Visit Terricciola — portale turistico del borgo etrusco della Valdera.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: visit-terricciola
Tags: tourism, italy, tuscany, bilingual
*/

/* =========================================
   NAV-LINKS WORDPRESS ADAPTATION
   ========================================= */
.nav-links a.nav-link {
  display: inline-block;
  background: none;
  border: none;
  padding: 9px 15px;
  border-radius: 99px;
  font-family: var(--sans);
  font-size: .96rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.nav-links a.nav-link:hover {
  background: rgba(106, 42, 57, .08);
}
.nav-links a.nav-link[aria-current="page"] {
  color: var(--wine);
  background: rgba(106, 42, 57, .1);
}

/* WP: disable SPA page switching; each page shows own content */
.page { display: block !important; }

/* Leaflet map controls devono stare sotto l'header (z-index 1200) */
.leaflet-top,
.leaflet-bottom { z-index: 900 !important; }

/* Nav dropdown mobile: si trova nel contesto stacking dell'header (z-index 1200),
   quindi è sempre sopra i controlli Leaflet */
@media (max-width: 900px) {
  .nav-links.open { z-index: 1; }
}


    :root {
      --tufo: #E7E0D0;
      --tufo-deep: #DAD1BD;
      --ivory: #FBF9F3;
      --wine: #6A2A39;
      --wine-deep: #4C1E29;
      --olive: #5F6A38;
      --terracotta: #BC5A36;
      --ink: #231C19;
      --muted: #6E655B;
      --line: rgba(35, 28, 25, .13);
      --radius: 14px;
      --radius-sm: 9px;
      --maxw: 1180px;
      --shadow: 0 18px 40px -22px rgba(35, 28, 25, .45);
      --serif: "Fraunces", Georgia, serif;
      --sans: "Hanken Grotesk", system-ui, sans-serif;
    }

    * {
      box-sizing: border-box
    }

    html {
      scroll-behavior: smooth
    }

    body {
      margin: 0;
      background: var(--tufo);
      color: var(--ink);
      font-family: var(--sans);
      font-size: 17px;
      line-height: 1.7;
      -webkit-font-smoothing: antialiased
    }

    img {
      max-width: 100%;
      display: block
    }

    a {
      color: inherit;
      text-decoration: none
    }

    button {
      font-family: inherit;
      cursor: pointer
    }

    .wrap {
      max-width: var(--maxw);
      margin: 0 auto;
      padding: 0 22px
    }

    h1,
    h2,
    h3 {
      font-family: var(--serif);
      font-weight: 500;
      line-height: 1.06;
      margin: 0;
      letter-spacing: -.01em
    }

    .eyebrow {
      font-size: .74rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .22em;
      color: var(--olive);
      margin: 0 0 14px;
      display: block
    }

    .lead {
      font-size: 1.12rem;
      color: var(--muted);
      max-width: 60ch
    }

    /* HEADER */
    header {
      position: sticky;
      top: 0;
      z-index: 1200;
      background: rgba(231, 224, 208, .88);
      backdrop-filter: saturate(140%) blur(12px);
      border-bottom: 1px solid var(--line)
    }

    .nav {
      display: flex;
      align-items: center;
      gap: 22px;
      height: 70px
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      font-family: var(--serif);
      font-size: 1.32rem;
      font-weight: 600;
      color: var(--wine);
      white-space: nowrap;
      cursor: pointer
    }

    .brand-logo {
      height: 42px;
      width: auto;
      display: block
    }

    .brand-text {
      font-family: var(--serif);
      font-size: 1.5rem;
      font-weight: 600;
      color: var(--wine);
      line-height: 1
    }

    .nav-links {
      display: flex;
      gap: 4px;
      margin-left: auto
    }

    .nav-links button {
      background: none;
      border: 0;
      padding: 9px 15px;
      border-radius: 99px;
      font-size: .96rem;
      font-weight: 500;
      color: var(--ink);
      transition: background .2s, color .2s
    }

    .nav-links button:hover {
      background: rgba(106, 42, 57, .08)
    }

    .nav-links button[aria-current="page"] {
      color: var(--wine);
      background: rgba(106, 42, 57, .1)
    }

    .lang {
      margin-left: 6px;
      border: 1px solid var(--line);
      border-radius: 99px;
      padding: 7px 13px;
      font-size: .82rem;
      font-weight: 600;
      letter-spacing: .04em;
      color: var(--muted);
      background: none;
      cursor: pointer
    }

    .lang b {
      color: var(--wine)
    }

    .burger {
      display: none;
      margin-left: auto;
      background: none;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 9px;
      color: var(--ink);
      cursor: pointer
    }

    /* PAGINE */
    .page {
      display: none
    }

    .page.active {
      display: block;
      animation: fade .45s ease
    }

    @keyframes fade {
      from {
        opacity: 0;
        transform: translateY(7px)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    /* HERO */
    .hero {
      position: relative;
      overflow: hidden;
      border-bottom: 1px solid var(--line)
    }

    .hero-art {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      background: url("https://visitterricciola.it/wp-content/uploads/2026/02/56c05725-9407-43f6-8194-948866f26088.jpg") center center/cover no-repeat;
      transform: none !important;
      animation: none !important;
    }

    @keyframes heroZoom {
      to {
        transform: scale(1)
      }
    }

    .hero-scrim {
      position: absolute;
      inset: 0;

      background:
        linear-gradient(98deg,
          rgba(28, 13, 18, 0.86) 0%,
          rgba(28, 13, 18, 0.32) 40%,
          rgba(28, 13, 18, 0.12) 72%,
          rgba(28, 13, 18, 0.02) 100%),
        linear-gradient(to top,
          rgba(28, 13, 18, 0.22) 0%,
          rgba(28, 13, 18, 0.08) 46%,
          transparent 70%);
    }

    .hero-inner {
      position: relative;
      max-width: var(--maxw);
      margin: 0 auto;
      padding: 128px 22px 132px
    }

    .hero h1 {
      font-size: clamp(3.4rem, 9vw, 6.6rem);
      color: var(--ivory);
      font-weight: 600
    }

    .hero .eyebrow {
      color: #E9C9A0
    }

    .hero-sub {
      font-family: var(--serif);
      font-style: italic;
      font-size: clamp(1.2rem, 3vw, 1.7rem);
      color: var(--ivory);
      max-width: 18ch;
      margin: 18px 0 0;
      opacity: .95;
      font-weight: 400
    }

    .hero-cta {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      margin-top: 36px
    }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      padding: 14px 24px;
      border-radius: 99px;
      font-weight: 600;
      font-size: 1rem;
      border: 1px solid transparent;
      transition: transform .2s, background .2s, color .2s;
      cursor: pointer
    }

    .btn:hover {
      transform: translateY(-2px)
    }

    .btn-primary {
      background: var(--ivory);
      color: var(--wine)
    }

    .btn-primary:hover {
      background: #fff
    }

    .btn-ghost {
      background: rgba(251, 249, 243, .1);
      color: var(--ivory);
      border-color: rgba(251, 249, 243, .45)
    }

    .btn-ghost:hover {
      background: rgba(251, 249, 243, .2)
    }

    /* SEZIONI */
    .section {
      padding: 84px 0
    }

    .section.alt {
      background: var(--tufo-deep)
    }

    .s-head {
      max-width: 62ch;
      margin-bottom: 46px
    }

    .s-head h2 {
      font-size: clamp(2.1rem, 5vw, 3.1rem)
    }

    .s-head .lead {
      margin-top: 14px
    }

    /* FACTS */
    .facts {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 22px
    }

    .fact {
      background: var(--ivory);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 26px
    }

    .fact .k {
      font-family: var(--serif);
      font-size: 1.45rem;
      color: var(--wine);
      margin-bottom: 6px
    }

    .fact p {
      margin: 0;
      color: var(--muted);
      font-size: .98rem
    }

    /* TILES */
    .explore {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 18px
    }

    .tile {
      position: relative;
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid var(--line);
      background: var(--ivory);
      min-height: 188px;
      padding: 26px;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      transition: transform .3s, box-shadow .3s;
      text-align: left;
      cursor: pointer
    }

    .tile:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow)
    }

    .tile .ico {
      position: absolute;
      top: 22px;
      left: 24px;
      color: var(--wine)
    }

    .tile h3 {
      font-size: 1.55rem;
      margin-bottom: 4px
    }

    .tile span {
      color: var(--muted);
      font-size: .95rem
    }

    .tile .soon {
      position: absolute;
      top: 22px;
      right: 22px;
      font-size: .66rem;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: var(--olive);
      background: rgba(95, 106, 56, .12);
      padding: 4px 9px;
      border-radius: 99px
    }

    .tile.disabled {
      cursor: default;
      opacity: .78
    }

    .tile.disabled:hover {
      transform: none;
      box-shadow: none
    }

    /* TEASER MAPPA */
    .teaser {
      display: grid;
      grid-template-columns: 1.05fr .95fr;
      gap: 0;
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid var(--line);
      background: var(--ivory)
    }

    .teaser-txt {
      padding: 48px
    }

    .teaser-txt h2 {
      font-size: clamp(1.9rem, 4vw, 2.6rem);
      margin-bottom: 14px
    }

    .teaser-art {
      position: relative;
      min-height: 300px;
      background: var(--wine)
    }

    /* GRIGLIA */
    .grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 22px
    }

    /* CARD DORMIRE */
    .card {
      background: var(--ivory);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform .3s, box-shadow .3s
    }

    .card:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow)
    }

    .card-media {
      position: relative;
      aspect-ratio: 4/3;
      overflow: hidden;
      background: var(--wine-deep)
    }

    .card-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform .7s ease
    }

    .card:hover .card-media img {
      transform: scale(1.06)
    }

    .card-fallback {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.5rem;
      color: rgba(251, 249, 243, .3)
    }

    .tag {
      position: absolute;
      top: 14px;
      left: 14px;
      background: rgba(76, 30, 41, .9);
      color: var(--ivory);
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      padding: 6px 12px;
      border-radius: 99px;
      backdrop-filter: blur(4px)
    }

    .card-body {
      padding: 22px;
      display: flex;
      flex-direction: column;
      flex: 1
    }

    .card-body h3 {
      font-size: 1.42rem;
      margin-bottom: auto
    }

    .card-loc {
      display: flex;
      align-items: center;
      gap: 7px;
      color: var(--muted);
      font-size: .92rem;
      margin-top: 16px;
      padding-top: 15px;
      border-top: 1px solid var(--line)
    }

    .card-loc svg {
      color: var(--terracotta);
      flex: none
    }

    .card-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--wine);
      font-weight: 600;
      font-size: .92rem;
      margin-top: 14px
    }

    .card-link svg {
      transition: transform .2s
    }

    .card:hover .card-link svg {
      transform: translateX(3px)
    }

    /* CARD RISTORANTE con foto */
    .rcard {
      background: var(--ivory);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform .3s, box-shadow .3s
    }

    .rcard:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow)
    }

    .rcard-media {
      position: relative;
      aspect-ratio: 4/3;
      overflow: hidden;
      background: var(--wine-deep)
    }

    .rcard-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform .7s ease
    }

    .rcard:hover .rcard-media img {
      transform: scale(1.06)
    }

    .rcard-media-fallback {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.5rem;
      color: rgba(251, 249, 243, .3)
    }

    .rcard-badge {
      position: absolute;
      top: 14px;
      left: 14px;
      padding: 6px 12px;
      border-radius: 99px;
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--ivory)
    }

    .rcard-body {
      padding: 22px;
      display: flex;
      flex-direction: column;
      flex: 1
    }

    .rcard-body h3 {
      font-size: 1.38rem;
      margin-bottom: 8px
    }

    .rcard-body p {
      margin: 0 0 auto;
      color: var(--muted);
      font-size: .94rem;
      line-height: 1.6
    }

    .rcard-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid var(--line)
    }

    .rcard-type {
      font-size: .7rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--olive)
    }

    .rcard-link {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: var(--wine);
      font-weight: 600;
      font-size: .88rem
    }

    /* CARD CANTINA */
    .wcard {
      background: var(--ivory);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform .3s, box-shadow .3s
    }

    .wcard:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow)
    }

    .wcard-media {
      position: relative;
      aspect-ratio: 4/3;
      overflow: hidden;
      background: var(--wine-deep)
    }

    .wcard-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform .7s ease
    }

    .wcard:hover .wcard-media img {
      transform: scale(1.06)
    }

    .wcard-media-fallback {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      color: rgba(251, 249, 243, .3)
    }

    .wcard-body {
      padding: 22px;
      display: flex;
      flex-direction: column;
      flex: 1
    }

    .wcard-body h3 {
      font-size: 1.38rem;
      margin-bottom: 8px
    }

    .wcard-body p {
      margin: 0 0 auto;
      color: var(--muted);
      font-size: .94rem;
      line-height: 1.6
    }

    .wcard-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid var(--line)
    }

    .wcard-loc {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: .88rem
    }

    .wcard-link {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: var(--wine);
      font-weight: 600;
      font-size: .88rem
    }

    /* FILTRI */
    .filters {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 36px
    }

    .filter {
      border: 1px solid var(--line);
      background: var(--ivory);
      color: var(--muted);
      padding: 9px 18px;
      border-radius: 99px;
      font-weight: 600;
      font-size: .92rem;
      transition: all .2s;
      cursor: pointer
    }

    .filter:hover {
      border-color: var(--wine);
      color: var(--wine)
    }

    .filter.active {
      background: var(--wine);
      border-color: var(--wine);
      color: var(--ivory)
    }

    .more-wrap {
      text-align: center;
      margin-top: 44px
    }

    .btn-outline {
      background: none;
      border: 1.5px solid var(--ink);
      color: var(--ink);
      padding: 13px 26px;
      border-radius: 99px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: background .2s, color .2s;
      cursor: pointer
    }

    .btn-outline:hover {
      background: var(--ink);
      color: var(--tufo)
    }

    /* EVENTI */
    .ev-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 22px
    }

    .ev-card {
      background: var(--ivory);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 26px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      transition: transform .3s, box-shadow .3s
    }

    .ev-card:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow)
    }

    .ev-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 20px
    }

    .ev-date {
      background: var(--wine);
      color: var(--ivory);
      border-radius: var(--radius-sm);
      padding: 9px 4px;
      width: 62px;
      text-align: center;
      flex: none
    }

    .ev-date .m {
      font-size: .66rem;
      font-weight: 700;
      letter-spacing: .16em;
      text-transform: uppercase;
      opacity: .85;
      display: block
    }

    .ev-date .d {
      font-family: var(--serif);
      font-size: 1.35rem;
      font-weight: 600;
      line-height: 1.1;
      display: block
    }

    .ev-card.is-past .ev-date {
      background: var(--muted)
    }

    .ev-cat {
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--wine);
      background: rgba(106, 42, 57, .07);
      border: 1px solid rgba(106, 42, 57, .14);
      padding: 5px 11px;
      border-radius: 99px
    }

    .ev-card h3 {
      font-size: 1.5rem;
      margin-bottom: 18px;
      flex: 1
    }

    .ev-meta {
      padding-top: 16px;
      border-top: 1px solid var(--line);
      display: grid;
      gap: 8px
    }

    .ev-meta div {
      display: flex;
      align-items: center;
      gap: 9px;
      color: var(--muted);
      font-size: .9rem
    }

    .empty {
      background: var(--ivory);
      border: 1px dashed var(--line);
      border-radius: var(--radius);
      padding: 48px;
      text-align: center;
      color: var(--muted)
    }

    .toggle-past {
      display: block;
      margin: 28px auto 0;
      background: none;
      border: 1px solid var(--line);
      border-radius: 99px;
      padding: 11px 22px;
      color: var(--muted);
      font-weight: 600;
      cursor: pointer
    }

    .toggle-past:hover {
      border-color: var(--wine);
      color: var(--wine)
    }

    .fixed-card {
      background: var(--wine);
      color: var(--ivory);
      border-radius: var(--radius);
      padding: 30px;
      display: flex;
      flex-direction: column
    }

    .fixed-card .when {
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .14em;
      text-transform: uppercase;
      color: #E9C9A0;
      margin-bottom: 14px
    }

    .fixed-card h3 {
      font-size: 1.7rem;
      color: var(--ivory);
      margin-bottom: 12px
    }

    .fixed-card p {
      margin: 0;
      color: rgba(251, 249, 243, .82);
      font-size: .98rem
    }

    /* GALLERIA */
    .gallery-note {
      background: var(--ivory);
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 16px 20px;
      font-size: .9rem;
      color: var(--muted);
      margin-bottom: 28px;
      display: flex;
      align-items: flex-start;
      gap: 12px
    }

    .gallery-note svg {
      color: var(--olive);
      flex: none;
      margin-top: 2px
    }

    .gallery-note code {
      background: var(--tufo);
      border-radius: 4px;
      padding: 2px 6px;
      font-size: .85rem;
      color: var(--ink)
    }

    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px
    }

    .gallery-item {
      border-radius: var(--radius-sm);
      overflow: hidden;
      aspect-ratio: 4/3;
      background: var(--wine-deep);
      position: relative;
      cursor: pointer;
      border: 1px solid var(--line)
    }

    .gallery-item img,
    .gallery-item video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform .5s ease
    }

    .gallery-item:hover img {
      transform: scale(1.05)
    }

    .gallery-item-label {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 10px 13px;
      background: linear-gradient(transparent, rgba(35, 28, 25, .72));
      color: var(--ivory);
      font-size: .82rem;
      font-weight: 500
    }

    .gallery-item .play-ico {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 46px;
      height: 46px;
      background: rgba(251, 249, 243, .92);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--wine)
    }

    .gallery-placeholder {
      border-radius: var(--radius-sm);
      border: 2px dashed var(--line);
      aspect-ratio: 4/3;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: var(--muted);
      font-size: .88rem;
      background: var(--ivory);
      padding: 16px;
      text-align: center
    }

    .gallery-placeholder svg {
      color: var(--olive);
      opacity: .55
    }

    .gallery-placeholder b {
      color: var(--ink);
      font-size: .92rem;
      margin-top: 2px
    }

    /* LIGHTBOX */
    .lightbox {
      position: fixed;
      inset: 0;
      z-index: 3000;
      background: rgba(35, 28, 25, .93);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px
    }

    .lightbox.open {
      display: flex;
      animation: fade .2s ease
    }

    .lightbox-close {
      position: absolute;
      top: 18px;
      right: 18px;
      background: none;
      border: 0;
      color: var(--ivory);
      opacity: .75;
      cursor: pointer;
      padding: 6px
    }

    .lightbox-close:hover {
      opacity: 1
    }

    .lightbox img,
    .lightbox iframe {
      max-width: 92vw;
      max-height: 88vh;
      border-radius: var(--radius-sm);
      object-fit: contain;
      border: 0
    }

    /* MODALE EVENTO */
    .modal {
      position: fixed;
      inset: 0;
      z-index: 2000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(35, 28, 25, .6);
      backdrop-filter: blur(4px)
    }

    .modal.open {
      display: flex;
      animation: fade .25s ease
    }

    .modal-box {
      background: var(--ivory);
      border-radius: var(--radius);
      max-width: 620px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      position: relative
    }

    .modal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      background: none;
      border: 0;
      color: var(--muted);
      padding: 8px;
      border-radius: 8px;
      cursor: pointer
    }

    .modal-close:hover {
      color: var(--wine);
      background: rgba(106, 42, 57, .08)
    }

    .modal-inner {
      padding: 38px
    }

    .modal-cat {
      display: inline-block;
      background: var(--wine);
      color: var(--ivory);
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      padding: 6px 13px;
      border-radius: 99px;
      margin-bottom: 16px
    }

    .modal-inner h2 {
      font-size: 2rem;
      margin-bottom: 18px
    }

    .modal-desc {
      color: var(--muted);
      white-space: pre-line;
      margin-bottom: 26px
    }

    .modal-info {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-bottom: 26px
    }

    .modal-info .box {
      background: var(--tufo);
      border-radius: var(--radius-sm);
      padding: 18px;
      display: flex;
      gap: 13px
    }

    .modal-info .box svg {
      color: var(--wine);
      flex: none;
      margin-top: 2px
    }

    .modal-info .lab {
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--muted);
      display: block;
      margin-bottom: 3px
    }

    .modal-info .val {
      font-weight: 500;
      color: var(--ink);
      font-size: .95rem
    }

    /* MAPPA */
    .map-shell {
      position: relative;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden
    }

    #map {
      height: 560px;
      width: 100%;
      background: var(--tufo-deep)
    }

    .map-note {
      position: absolute;
      left: 14px;
      bottom: 14px;
      z-index: 500;
      background: rgba(251, 249, 243, .94);
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 11px 15px;
      font-size: .82rem;
      color: var(--muted);
      max-width: 300px;
      box-shadow: var(--shadow)
    }

    .map-note b {
      color: var(--ink)
    }

    .map-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 18px;
      margin-top: 18px
    }

    .map-legend span {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: .9rem;
      color: var(--muted)
    }

    .dot {
      width: 13px;
      height: 13px;
      border-radius: 50%;
      border: 2px solid var(--ivory);
      box-shadow: 0 0 0 1px var(--line)
    }

    .leaflet-popup-content {
      font-family: var(--sans);
      margin: 14px 16px
    }

    .leaflet-popup-content b {
      font-family: var(--serif);
      font-size: 1.05rem;
      color: var(--wine);
      display: block;
      margin-bottom: 3px
    }

    .leaflet-popup-content a {
      color: var(--wine);
      font-weight: 600
    }

    /* FOOTER */
    footer {
      background: var(--ink);
      color: var(--tufo);
      padding: 64px 0 30px;
      margin-top: 20px
    }

    .foot-grid {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr;
      gap: 40px;
      margin-bottom: 44px
    }

    footer h4 {
      font-family: var(--serif);
      font-size: 1.5rem;
      color: var(--ivory);
      margin-bottom: 14px;
      font-weight: 500
    }

    footer p {
      color: rgba(231, 224, 208, .66);
      font-size: .95rem;
      max-width: 38ch
    }

    .foot-col h5 {
      font-size: .74rem;
      font-weight: 700;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: #E9C9A0;
      margin: 0 0 16px
    }

    .foot-col a,
    .foot-col span {
      display: block;
      color: rgba(231, 224, 208, .78);
      padding: 5px 0;
      font-size: .96rem;
      cursor: pointer
    }

    .foot-col a:hover {
      color: var(--ivory)
    }

    .foot-bottom {
      border-top: 1px solid rgba(231, 224, 208, .14);
      padding-top: 24px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      font-size: .86rem;
      color: rgba(231, 224, 208, .55)
    }

    /* REVEAL */
    .reveal {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1)
    }

    .reveal.in {
      opacity: 1;
      transform: none
    }

    /* RESPONSIVE */
    @media(max-width:900px) {

      .nav-links {
        display: none
      }

      /* nascondi solo i link */
      .lang {
        display: inline-block;
        margin-left: auto;
        margin-right: 8px
      }

      /* lingua visibile, spinta a destra */
      .burger {
        display: block;
        margin-left: 0
      }

      .nav-links.open {
        display: flex;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--tufo);
        border-bottom: 1px solid var(--line);
        padding: 14px;
        gap: 4px;
        box-shadow: var(--shadow)
      }

      .nav-links.open button {
        text-align: left;
        padding: 13px 16px
      }

      .facts,
      .explore,
      .grid,
      .ev-grid,
      .gallery-grid {
        grid-template-columns: 1fr 1fr
      }

      .teaser {
        grid-template-columns: 1fr
      }

      .foot-grid {
        grid-template-columns: 1fr
      }
    }

    @media(max-width:600px) {
      body {
        font-size: 16px
      }

      .facts,
      .grid,
      .ev-grid,
      .gallery-grid,
      .modal-info {
        grid-template-columns: 1fr
      }

      .explore {
        grid-template-columns: 1fr 1fr;
        gap: 12px
      }

      .tile {
        min-height: 128px;
        padding: 16px;
        justify-content: flex-start
      }

      .tile h3 {
        font-size: 1.02rem;
        margin-top: 6px
      }

      .tile span {
        font-size: .8rem
      }

      .tile .ico {
        position: static;
        margin-bottom: 4px
      }

      .tile .ico svg {
        width: 22px;
        height: 22px
      }

      .hero-inner {
        padding: 84px 22px 90px
      }

      .section {
        padding: 60px 0
      }

      .teaser-txt {
        padding: 32px
      }

      .modal-inner {
        padding: 26px
      }
    }

    @media(prefers-reduced-motion:reduce) {
      * {
        animation: none !important;
        transition: none !important
      }

      .reveal {
        opacity: 1;
        transform: none
      }
    }

    /* SELETTORE PALETTE */
    .theme-fab {
      position: fixed;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      z-index: 1500;
      background: var(--wine);
      color: var(--ivory);
      border: 0;
      border-radius: 13px 0 0 13px;
      padding: 16px 9px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 9px;
      box-shadow: 0 14px 30px -14px rgba(35, 28, 25, .6);
      cursor: pointer;
      transition: padding-right .2s
    }

    .theme-fab:hover {
      padding-right: 13px
    }

    .theme-fab .lab {
      writing-mode: vertical-rl;
      font-size: .7rem;
      font-weight: 700;
      letter-spacing: .18em;
      text-transform: uppercase
    }

    .theme-backdrop {
      position: fixed;
      inset: 0;
      z-index: 1550;
      background: rgba(35, 28, 25, .28);
      backdrop-filter: blur(2px);
      opacity: 0;
      pointer-events: none;
      transition: opacity .3s
    }

    .theme-backdrop.open {
      opacity: 1;
      pointer-events: auto
    }

    .theme-panel {
      position: fixed;
      right: 16px;
      top: 50%;
      transform: translateY(-50%) translateX(118%);
      z-index: 1600;
      background: var(--ivory);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: 0 30px 60px -28px rgba(35, 28, 25, .6);
      padding: 22px;
      width: 312px;
      max-width: calc(100vw - 32px);
      max-height: 88vh;
      overflow-y: auto;
      opacity: 0;
      transition: transform .4s cubic-bezier(.2, .85, .25, 1), opacity .3s
    }

    .theme-panel.open {
      transform: translateY(-50%) translateX(0);
      opacity: 1
    }

    .theme-panel .ph {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 4px
    }

    .theme-panel .ph h4 {
      font-family: var(--serif);
      font-size: 1.32rem;
      color: var(--wine);
      font-weight: 600
    }

    .theme-panel .pc {
      background: none;
      border: 0;
      color: var(--muted);
      cursor: pointer;
      padding: 4px;
      border-radius: 7px
    }

    .theme-panel .pc:hover {
      color: var(--wine);
      background: rgba(106, 42, 57, .08)
    }

    .theme-panel .psub {
      font-size: .86rem;
      color: var(--muted);
      margin: 0 0 18px;
      line-height: 1.55
    }

    .theme-opt {
      display: flex;
      align-items: center;
      gap: 13px;
      width: 100%;
      background: none;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 13px;
      margin-bottom: 10px;
      cursor: pointer;
      text-align: left;
      transition: border-color .2s, background .2s, transform .2s
    }

    .theme-opt:hover {
      border-color: var(--wine);
      transform: translateX(-2px)
    }

    .theme-opt.active {
      border-color: var(--wine);
      background: rgba(106, 42, 57, .07)
    }

    .theme-sws {
      display: flex;
      flex: none
    }

    .theme-sws span {
      width: 21px;
      height: 34px;
      border: 1px solid rgba(35, 28, 25, .12);
      margin-left: -6px;
      border-radius: 6px;
      box-shadow: 0 2px 5px -2px rgba(0, 0, 0, .3)
    }

    .theme-sws span:first-child {
      margin-left: 0
    }

    .theme-opt .t-meta {
      flex: 1;
      min-width: 0
    }

    .theme-opt .t-name {
      display: flex;
      align-items: center;
      gap: 7px;
      font-weight: 600;
      font-size: .98rem;
      font-family: var(--serif);
      color: var(--ink)
    }

    .theme-opt .t-desc {
      font-size: .78rem;
      color: var(--muted);
      margin-top: 2px
    }

    .theme-opt .t-check {
      flex: none;
      color: var(--wine);
      opacity: 0;
      transition: opacity .2s
    }

    .theme-opt.active .t-check {
      opacity: 1
    }

    @media(max-width:600px) {
      .theme-fab .lab {
        display: none
      }
    }

    /* PARALLASSE PAESAGGIO */
    .parallax {
      position: relative;
      height: 62vh;
      min-height: 440px;
      overflow: hidden;
      background: var(--wine-deep)
    }

    .parallax-img {
      position: absolute;
      top: -12%;
      left: 0;
      width: 100%;
      height: 124%;
      background: url('https://visitterricciola.it/wp-content/uploads/2026/06/terricciola-alto.webp') center 50%/cover no-repeat;
      will-change: transform
    }

    .parallax-img-borgo {
      background: url('https://visitterricciola.it/wp-content/uploads/2026/02/43fc5fa9-e400-4cbd-9d8c-f34f256563c4.jpg') center 5%/cover no-repeat;
      will-change: transform
    }


    .parallax-scrim {
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(28, 13, 18, .82) 0%, rgba(28, 13, 18, .28) 42%, rgba(28, 13, 18, .06) 100%)
    }

    .parallax-cap {
      position: absolute;
      right: 0;
      bottom: 0;
      max-width: 560px;
      padding: 0 clamp(22px, 6vw, 90px) clamp(34px, 6vw, 68px);
      text-align: right;
      color: #fff
    }

    .parallax-cap .eyebrow {
      color: rgba(255, 255, 255, .82);
      justify-content: flex-end
    }

    .parallax-cap .eyebrow::before {
      background: rgba(255, 255, 255, .6)
    }

    .parallax-cap h2 {
      font-family: var(--serif);
      font-weight: 600;
      font-size: clamp(2rem, 4.4vw, 3.4rem);
      line-height: 1.04;
      margin: .32em 0 .42em;
      text-shadow: 0 2px 24px rgba(0, 0, 0, .35)
    }

    .parallax-cap p {
      font-size: clamp(1.05rem, 1.7vw, 1.32rem);
      line-height: 1.5;
      color: rgba(255, 255, 255, .94);
      text-shadow: 0 1px 14px rgba(0, 0, 0, .4);
      text-wrap: pretty;
    }

    @media(max-width:600px) {
      .parallax-cap {
        text-align: left;
        max-width: 100%
      }

      .parallax-cap .eyebrow {
        justify-content: flex-start
      }

      .parallax-cap .eyebrow::before {
        display: none
      }
    }

    /* === SELETTORE COLORI: visibile === */
    .theme-fab,
    .theme-panel,
    .theme-backdrop {
      display: none !important
    }

    /* LINK NOTE LEGALI NEL FOOTER */
    .foot-legal {
      display: flex;
      align-items: center;
      gap: 8px
    }

    .foot-legal a {
      color: rgba(231, 224, 208, .78);
      text-decoration: underline;
      text-underline-offset: 3px;
      text-decoration-color: rgba(231, 224, 208, .35);
      transition: color .2s
    }

    .foot-legal a:hover {
      color: var(--ivory)
    }

    /* FINESTRA NOTE LEGALI */
    .legal-overlay {
      position: fixed;
      inset: 0;
      z-index: 3000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(35, 28, 25, .55);
      backdrop-filter: blur(4px);
      opacity: 0;
      visibility: hidden;
      transition: opacity .25s ease, visibility .25s
    }

    .legal-overlay.open {
      opacity: 1;
      visibility: visible
    }

    .legal-box {
      position: relative;
      background: var(--ivory);
      color: var(--ink);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      max-width: 560px;
      width: 100%;
      max-height: 85vh;
      overflow-y: auto;
      padding: 40px
    }

    .legal-overlay.open .legal-box {
      animation: legalIn .3s cubic-bezier(.2, .8, .2, 1)
    }

    @keyframes legalIn {
      from {
        opacity: 0;
        transform: translateY(14px)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    .legal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      background: none;
      border: 0;
      color: var(--muted);
      padding: 6px;
      border-radius: 8px;
      transition: color .2s, background .2s
    }

    .legal-close:hover {
      color: var(--wine);
      background: rgba(106, 42, 57, .08)
    }

    .legal-body h6 {
      font-family: var(--sans);
      font-size: .72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .14em;
      color: var(--olive);
      margin: 22px 0 6px
    }

    .legal-body h6:first-child {
      margin-top: 4px
    }

    .legal-body p {
      margin: 0;
      color: var(--muted);
      font-size: .96rem;
      line-height: 1.65
    }

    .legal-body a {
      color: var(--wine);
      font-weight: 600;
      text-decoration: underline;
      text-underline-offset: 2px
    }

