/* Dog Week: righe periodo sulla card, modal villaggio + offerta, calendario.
   Riga periodo e tab del modal usano gli stessi token, nell'azzurro delle offerte.
   Il giallo pieno e' per le CTA e per le date scelte nel calendario. */
:root {
  --dw-action: var(--blu-1);
  --dw-action-tint: rgba(30, 75, 156, 0.08);
  --dw-azure: #0091F0;
  --dw-azure-text: #0073C6;                /* l'azzurro sui testi piccoli: contrasto AA */
  --dw-azure-tint: #f0f8ff;
  --dw-range: rgba(255, 221, 1, 0.3);
  --dw-ink: #1f2933;
  --dw-cta: var(--swiper-theme-color);
  --dw-line: var(--border-grey);
  --dw-text: var(--text);
  --dw-muted: #5f6368;
  --dw-radius: 14px;
  --dw-focus: 0 0 0 3px rgba(30, 75, 156, 0.35);
}

.card {
  cursor: pointer;
}

/* ---- card ---- */

.dw-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.dw-period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 14px;
  border: 1.5px solid var(--dw-line);
  border-radius: var(--dw-radius);
  background: #fff;
  color: var(--dw-text);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dw-period-row:hover {
  border-color: var(--dw-azure);
  background: var(--dw-azure-tint);
}

.dw-period-row:focus-visible,
.dw-card-cta:focus-visible {
  outline: none;
  box-shadow: var(--dw-focus);
}

.dw-period-row__label {
  font-weight: 800;
  color: var(--dw-azure-text);
}

.dw-period-row__price {
  white-space: nowrap;
  font-size: 13px;
}

.dw-period-row__price strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--dw-azure);
}

.dw-card-cta {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 45px;
  background: var(--dw-cta);
  color: #000;
  font-family: "Nunito", sans-serif;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

/* ---- struttura del modal ---- */

html.dw-modal-open,
html.dw-modal-open body {
  overflow: hidden !important;
}

.dw-modal[hidden] {
  display: none;
}

.dw-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: grid;
  place-items: end center;
  font-family: "Nunito", sans-serif;
  color: var(--dw-text);
}

.dw-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 26, 51, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dw-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1);
}

.dw-modal.is-open .dw-modal__backdrop {
  opacity: 1;
}

.dw-modal.is-open .dw-modal__panel {
  transform: translateY(0);
}

.dw-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--dw-line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.dw-modal__close img {
  width: 16px;
  height: 16px;
}

.dw-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dw-modal__content {
  padding: 22px 18px 28px;
}

.dw-modal :focus-visible {
  outline: none;
  box-shadow: var(--dw-focus);
}

.dw-modal h2:focus,
.dw-modal h3:focus {
  outline: none;
  box-shadow: none;
}

/* ---- gallery ---- */

.dw-gallery {
  position: relative;
  width: 100%;
  height: 40vh;
  background: var(--dw-action-tint);
}

.dw-gallery .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dw-gallery .swiper-button-prev,
.dw-gallery .swiper-button-next {
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  background-size: 48px 48px;
  cursor: pointer;
}

.dw-gallery .swiper-button-disabled {
  opacity: 0.4;
}

/* ---- contenuto ---- */

.dw-head {
  margin-bottom: 8px;
  padding-right: 8px;
}

.dw-head__stars {
  display: block;
  height: 14px;
  margin-bottom: 8px;
}

.dw-head h2 {
  margin: 0 0 6px;
  padding: 0;
  font-family: "Nunito", sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  color: var(--dw-action);
}

.dw-head__location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  color: var(--dw-muted);
}

.dw-head__location img {
  width: 14px;
  height: auto;
}

.dw-section {
  padding: 20px 0;
  border-top: 1px solid var(--dw-line);
}

.dw-head + .dw-section {
  border-top: 0;
  padding-top: 12px;
}

.dw-section h3 {
  margin: 0 0 14px;
  padding: 0;
  font-family: "Comfortaa", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-transform: none;
  color: var(--dw-action);
}

.dw-section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  color: var(--dw-text);
}

.dw-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dw-section li {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  color: var(--dw-text);
}

.dw-check li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.dw-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background: url("../img/icons/check.svg") center / contain no-repeat;
}

.dw-tags li {
  padding: 10px 0;
  border-bottom: 1px solid var(--dw-line);
}

.dw-tags li:last-child {
  border-bottom: 0;
}

.dw-tags strong {
  display: block;
  font-weight: 800;
  color: var(--dw-action);
}

.dw-tags span {
  display: block;
  font-size: 15px;
  color: var(--dw-muted);
}

.dw-desc.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.dw-more[hidden] {
  display: none;
}

.dw-more h4 {
  margin: 18px 0 8px;
  padding: 0;
  font-family: "Comfortaa", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  color: #000;
}

.dw-more__group h4 {
  margin-top: 12px;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  color: var(--dw-action);
}

.dw-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  font-size: 15px;
}

.dw-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dw-action);
}

.dw-more__toggle {
  min-height: 48px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--dw-action);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---- programma attivita' ---- */

#dwProgram[hidden] {
  display: none;
}

.dw-section p.dw-program__dates {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--dw-action);
}

.dw-section ul.dw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dw-section .dw-chips li {
  padding: 7px 12px;
  border-radius: var(--dw-radius);
  background: var(--dw-action-tint);
  color: var(--dw-action);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.dw-section .dw-chips li[hidden] {
  display: none;
}

.dw-section p.dw-program__note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--dw-muted);
}

/* ---- switch periodo ---- */

.dw-switch {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.dw-switch__tab {
  min-height: 52px;
  padding: 8px 10px;
  border: 1.5px solid var(--dw-line);
  border-radius: var(--dw-radius);
  background: #fff;
  color: var(--dw-azure-text);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dw-switch__tab:hover,
.dw-switch__tab[aria-checked="true"] {
  border-color: var(--dw-azure);
  background: var(--dw-azure-tint);
}

.dw-switch__tab[aria-checked="true"] {
  box-shadow: inset 0 0 0 1px var(--dw-azure);
}

/* ---- calendario ---- */

.dw-cal {
  padding: 12px 10px 10px;
  border: 1.5px solid var(--dw-line);
  border-radius: 18px;
}

.dw-cal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dw-cal__month {
  flex: 1;
  font-family: "Comfortaa", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--dw-action);
}

.dw-cal__nav {
  width: 44px;
  height: 44px;
  border: 1px solid var(--dw-line);
  border-radius: 50%;
  background: #fff;
  color: var(--dw-action);
  font-size: 18px;
  cursor: pointer;
}

.dw-cal__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.dw-cal__row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px 0;
  margin-bottom: 2px;
}

.dw-cal__dow span {
  padding: 4px 0;
  font-family: "Comfortaa", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: var(--dw-muted);
}

.dw-cal__day {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dw-ink);
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.dw-cal__day:not(.is-off):hover {
  background: var(--dw-range);
}

.dw-cal__day.is-inside {
  background: var(--dw-range);
  border-radius: 0;
}

.dw-cal__day.is-start,
.dw-cal__day.is-end,
.dw-cal__day.is-start:hover,
.dw-cal__day.is-end:hover {
  background: var(--dw-cta);
  color: var(--dw-ink);
  font-weight: 900;
}

.dw-cal__day.is-start {
  border-radius: 10px 0 0 10px;
}

.dw-cal__day.is-end {
  border-radius: 0 10px 10px 0;
}

.dw-cal__day.is-solo {
  border-radius: 10px;
}

/* giorni oltre il minimo, dentro il soggiorno scelto: restano spenti ma leggibili */
.dw-cal__day.is-off {
  color: rgba(0, 0, 0, 0.3);
  cursor: not-allowed;
}

.dw-cal__day.is-off.is-inside {
  color: rgba(31, 41, 51, 0.55);
}

.dw-nights {
  margin-top: 10px !important;
  font-size: 15px !important;
  font-weight: 700;
  color: var(--dw-action) !important;
}

.dw-nights.is-warning {
  color: #a3320b !important;
}

/* a selezione completa il dato e' nel footer: resta solo per gli screen reader */
.dw-nights.is-quiet {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- footer ---- */

.dw-footer {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--dw-line);
  background: #fff;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}

/* condizione della tariffa: riga piccola sopra info e CTA */
.dw-footer__note {
  flex: 0 0 100%;
  margin: 0 0 -4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--dw-muted);
}

.dw-footer__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dw-footer__dates {
  position: relative;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dw-action);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  cursor: pointer;
}

/* target di 48px senza alzare il footer */
.dw-footer__dates::after {
  content: '';
  position: absolute;
  inset: -10px -6px;
}

.dw-footer__price {
  font-size: 13px;
  color: var(--dw-muted);
}

.dw-footer__price strong {
  font-size: 19px;
  font-weight: 900;
  color: var(--dw-azure);
}

.dw-footer__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 45px;
  background: var(--dw-cta);
  color: #000;
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.dw-footer__cta[aria-disabled="true"] {
  background: #e8e8e8;
  color: #6b6b6b;
  cursor: not-allowed;
}

/* ---- check dell'intro: l'icona e' un cerchio, non va schiacciata ---- */

.benefits-list .check-icon {
  flex: none;
  width: 36px;
  height: 36px;
  margin-right: 14px;
  transform: none;
}

.benefits-list .check-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- rivelazione del testo (dogweek-reveal.js) ---- */

dw-word {
  transition: opacity 0.2s linear;
}

dw-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dw-rise {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.dw-rise.is-shown {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  /* il vuoto tra i check e il blocco delle card */
  section.intro > .container {
    padding-bottom: 16px;
  }

  section.offers > .special-container {
    margin-top: 32px !important;
  }

  .card-main__cta-section {
    box-sizing: border-box;
    justify-content: stretch;
    grid-template-columns: minmax(0, 1fr);
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
  }

  .dw-card-cta {
    min-height: 62px;
    font-size: 20px;
  }

  .benefits-list .check-icon {
    width: 30px;
    height: 30px;
    margin-right: 12px;
  }
}

@media (max-width: 420px) {
  .dw-switch__tab {
    padding: 8px 4px;
    font-size: 13px;
  }

  .dw-footer {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .dw-footer__cta {
    flex: 0 1 auto;
    padding: 10px 14px;
    font-size: 14px;
  }
}

/* ---- desktop ---- */

@media (min-width: 1024px) {
  .dw-modal {
    place-items: center;
    padding: 24px;
  }

  .dw-modal__panel {
    width: min(1100px, 100%);
    height: min(780px, calc(100vh - 48px));
    border-radius: 18px;
    box-shadow: 0 40px 100px rgba(0, 20, 40, 0.45);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.25s ease;
  }

  .dw-modal.is-open .dw-modal__panel {
    opacity: 1;
  }

  .dw-modal__body {
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 54%);
    overflow: hidden;
  }

  .dw-gallery {
    height: 100%;
  }

  .dw-modal__content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 32px 32px;
  }

  .dw-head {
    padding-right: 48px;
  }

  .dw-head h2 {
    font-size: 30px;
  }

  .dw-section h3 {
    font-size: 24px;
  }

  .dw-footer {
    padding: 14px 32px;
  }

  .dw-footer__note {
    text-align: right;
  }

  .dw-footer__info {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .dw-footer__cta {
    min-width: 260px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dw-modal__backdrop,
  .dw-modal__panel,
  .dw-period-row,
  .dw-switch__tab {
    transition: none !important;
  }
}
