/*
Template Name: Daniele Cannavacciuolo
Template URI: https://danielecannavacciuolo.it/
Description: Daniele Cannavacciuolo - Accordatore di Pianoforti e Tecnico Steinway & Sons e Spirio
Author: Daniele Cannavacciuolo
Version: 2.7
*/

/*======================================
 [ About ]
 ======================================*/

/* CSS Multiple Whatsapp Chat */
.whatsapp-name {
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 0;
  margin-bottom: 0;
  line-height: 0.5;
}

#whatsapp-chat {
  box-sizing: border-box !important;
  outline: none !important;
  position: fixed;
  width: 350px;
  border-radius: 10px;
  box-shadow: 0 1px 15px rgba(32, 33, 36, 0.28);
  bottom: 85px;
  right: 30px;
  overflow: hidden;
  z-index: 9999;
  animation-name: showchat;
  animation-duration: 1s;
  transform: scale(1);
}
a.blantershow-chat {
  /*   background: #009688; */
  background: #fff;
  color: #404040;
  position: fixed;
  display: flex;
  font-weight: 400;
  justify-content: space-between;
  z-index: 98;
  bottom: 25px;
  right: 30px;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 1px 15px rgba(32, 33, 36, 0.28);
}
a.blantershow-chat svg {
  transform: scale(1.2);
  margin: 0 10px 0 0;
}
.header-chat {
  /*   background: linear-gradient(to right top, #6f96f3, #164ed2); */
  background: #009688;
  background: #095e54;
  color: #fff;
  padding: 20px;
}
.header-chat h3 {
  margin: 0 0 10px;
}
.header-chat p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.info-avatar {
  position: relative;
}
.info-avatar img {
  border-radius: 100%;
  width: 50px;
  float: left;
  margin: 0 10px 0 0;
}

a.informasi {
  padding: 20px;
  display: block;
  overflow: hidden;
  animation-name: showhide;
  animation-duration: 0.5s;
}
a.informasi:hover {
  background: #f1f1f1;
}
.info-chat span {
  display: block;
}
#get-label,
span.chat-label {
  font-size: 12px;
  color: #888;
}
#get-nama,
span.chat-nama {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #222;
}
#get-label,
#get-nama {
  color: #fff;
}
span.my-number {
  display: none;
}
/* .blanter-msg {
  color: #444;
  padding: 20px;
  font-size: 12.5px;
  text-align: center;
  border-top: 1px solid #ddd;
} */

/* Specifica per il textarea nel popup di WhatsApp */
#whatsapp-chat textarea#chat-input {
  margin-bottom: 0;
}

textarea#chat-input {
  border: none;
  font-family: "Arial", sans-serif;
  width: 100%;
  height: 45px;
  outline: none;
  resize: none;
  padding: 10px;
  font-size: 14px;
  color: #333;
}
@media screen and (max-width: 480px) {
  #whatsapp-chat {
    width: 350px; /* Imposta la larghezza fissa */
  }

  textarea#chat-input {
    max-height: 100px; /* Altezza massima per evitare ingrandimenti e consentire lo scroll */
  }

  .whatsapp-message-container {
    flex-direction: column-reverse; /* Mostra i messaggi più recenti in cima su dispositivi mobili */
  }

  .whatsapp-message {
    margin-left: 0; /* Rimuove il margine aggiunto per i messaggi su dispositivi mobili */
    max-width: calc(
      100% - 66px
    ); /* Larghezza massima dei messaggi per adattarsi allo schermo */
  }
}
/* Stili specifici per dispositivi mobili */
@media (max-width: 768px) {
  #whatsapp-chat textarea#chat-input {
    margin-bottom: 0; /* Conferma che il margin-bottom sia disattivato anche su mobile */
  }
}

.dark textarea#chat-input {
  background: #ffffff;
}

a#send-it {
  width: 40px;
  font-weight: 700;
  padding: 10px 10px 0;
  background: #4caf50;
  height: 45px;
  border-radius: 0px;
}

a#send-it svg {
  fill: #fff;
  height: 24px;
  width: 24px;
}

.first-msg {
  background: transparent;
  padding: 30px;
  text-align: center;
}

.first-msg span {
  background: #e2e2e2;
  color: #333;
  font-size: 14.2px;
  line-height: 1.7;
  border-radius: 10px;
  padding: 15px 20px;
  display: inline-block;
}

.start-chat .blanter-msg {
  display: flex;
}
#get-number {
  display: none;
}
a.close-chat {
  position: absolute;
  top: 5px;
  right: 15px;
  color: #fff;
  font-size: 30px;
}

@keyframes ZpjSY {
  0% {
    background-color: rgb(182, 181, 186);
  }
  15% {
    background-color: rgb(17, 17, 17);
  }
  25% {
    background-color: rgb(182, 181, 186);
  }
}

@keyframes hPhMsj {
  15% {
    background-color: rgb(182, 181, 186);
  }
  25% {
    background-color: rgb(17, 17, 17);
  }
  35% {
    background-color: rgb(182, 181, 186);
  }
}

@keyframes iUMejp {
  25% {
    background-color: rgb(182, 181, 186);
  }
  35% {
    background-color: rgb(17, 17, 17);
  }
  45% {
    background-color: rgb(182, 181, 186);
  }
}

@keyframes showhide {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
}
@keyframes showchat {
  from {
    transform: scale(0);
    opacity: 0;
  }
}
@media screen and (max-width: 480px) {
  #whatsapp-chat {
    width: auto;
    left: 5%;
    right: 5%;
    font-size: 80%;
  }
}
.hide {
  display: none;
  animation-name: showhide;
  animation-duration: 0.5s;
  transform: scale(1);
  opacity: 1;
}
.show {
  display: block;
  animation-name: showhide;
  animation-duration: 0.5s;
  transform: scale(1);
  opacity: 1;
}

.whatsapp-message-container {
  display: flex;
  z-index: 1;
}

.whatsapp-message {
  padding: 7px 14px 6px;
  background-color: rgb(255, 255, 255);
  border-radius: 0px 8px 8px;
  position: relative;
  transition: all 0.3s ease 0s;
  opacity: 0;
  transform-origin: center top 0px;
  z-index: 2;
  box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
  margin-top: 4px;
  margin-left: -54px;
  max-width: calc(100% - 66px);
}

.whatsapp-chat-body {
  padding: 20px 20px 20px 10px;
  background-color: rgb(230, 221, 212);
  position: relative;
}

.whatsapp-chat-body::before {
  display: block;
  position: absolute;
  content: "";
  left: 0px;
  top: 0px;
  height: 100%;
  width: 100%;
  z-index: 0;
  opacity: 0.08;
  background-image: url("https://elfsight.com/assets/chats/patterns/whatsapp.png");
}

.dAbFpq {
  display: flex;
  z-index: 1;
}

.eJJEeC {
  background-color: rgb(255, 255, 255);
  width: 52.5px;
  height: 32px;
  border-radius: 16px;
  display: flex;
  -moz-box-pack: center;
  justify-content: center;
  -moz-box-align: center;
  align-items: center;
  margin-left: 10px;
  opacity: 0;
  transition: all 0.1s ease 0s;
  z-index: 1;
  box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
}

.hFENyl {
  position: relative;
  display: flex;
}

.ixsrax {
  height: 5px;
  width: 5px;
  margin: 0px 2px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  animation-duration: 1.2s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  top: 0px;
  background-color: rgb(158, 157, 162);
  animation-name: ZpjSY;
}

.dRvxoz {
  height: 5px;
  width: 5px;
  margin: 0px 2px;
  background-color: rgb(182, 181, 186);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  animation-duration: 1.2s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  top: 0px;
  animation-name: hPhMsj;
}

.kAZgZq {
  padding: 7px 14px 6px;
  background-color: rgb(255, 255, 255);
  border-radius: 0px 8px 8px;
  position: relative;
  transition: all 0.3s ease 0s;
  opacity: 0;
  transform-origin: center top 0px;
  z-index: 2;
  box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
  margin-top: 4px;
  margin-left: -54px;
  max-width: calc(100% - 66px);
  &::before {
    position: absolute;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAmCAMAAADp2asXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAACQUExURUxpccPDw9ra2m9vbwAAAAAAADExMf///wAAABoaGk9PT7q6uqurqwsLCycnJz4+PtDQ0JycnIyMjPf3915eXvz8/E9PT/39/RMTE4CAgAAAAJqamv////////r6+u/v7yUlJeXl5f///5ycnOXl5XNzc/Hx8f///xUVFf///+zs7P///+bm5gAAAM7Ozv///2fVensAAAAvdFJOUwCow1cBCCnqAhNAnY0WIDW2f2/hSeo99g1lBYT87vDXG8/6d8oL4sgM5szrkgl660OiZwAAAHRJREFUKM/ty7cSggAABNFVUQFzwizmjPz/39k4YuFWtm55bw7eHR6ny63+alnswT3/rIDzUSC7CrAziPYCJCsB+gbVkgDtVIDh+DsE9OTBpCtAbSBAZSEQNgWIygJ0RgJMDWYNAdYbAeKtAHODlkHIv997AkLqIVOXVU84AAAAAElFTkSuQmCC");
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
    top: 0px;
    left: -12px;
    width: 12px;
    height: 19px;
  }
}

.bMIBDo {
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: rgba(0, 0, 0, 0.4);
}

.iSpIQi {
  font-size: 14px;
  line-height: 19px;
  margin-top: 4px;
  color: rgb(17, 17, 17);
}

.iSpIQi {
  font-size: 14px;
  line-height: 19px;
  margin-top: 4px;
  color: rgb(17, 17, 17);
}

.cqCDVm {
  text-align: right;
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
  color: rgba(17, 17, 17, 0.5);
  margin-right: -8px;
  margin-bottom: -4px;
}
#char-limit-alert {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px;
  background-color: rgba(255, 0, 0, 0.8); /* Sfondo rosso trasparente */
  color: #fff; /* Testo bianco */
  border-radius: 5px;
  z-index: 9999;
  max-width: 250px; /* Larghezza massima del popup */
  text-align: center; /* Allinea il testo al centro */
  font-size: 12px; /* Dimensione del carattere */
}

#char-limit-alert.show {
  display: block;
  white-space: normal; /* Per consentire al testo di andare a capo */
  line-height: 1.5; /* Altezza della riga per la lettura migliore */
}

/* Stile del pulsante "Click to Start Chat" per desktop */
#start-chat-button {
  display: none; /* Nascondi il pulsante di default */
}

/* Stile del pulsante "Click to Start Chat" */
@media (max-width: 768px) {
  #start-chat-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4caf50; /* sfondo bianco */
    color: #ffffff; /* testo verde */
    border: 2px solid #4caf50; /* bordo verde */
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition:
      background-color 0.3s,
      color 0.3s;
    width: auto; /* Larghezza automatica per adattarsi al contenuto */
  }
}
/* Media query per il mobile */
@media (max-width: 768px) {
  #start-chat-button {
    display: block; /* renderlo un blocco per occupare l'intera larghezza */
    width: 100%; /* larghezza al 100% */
  }
}

/*======================================
 [ Appointments ]
 ======================================*/

/* ===== BOOKING WIDGET ===== */
.cal-booking-widget {
  display: flex;
  /*  background: #1a1a1a; */
  /*  border-radius: 16px; */
  overflow: hidden;
  max-width: 100%;
  margin: 15px auto 24px;
  min-height: 480px;
  border: 1px solid #2a2a2a;
}

/* Info panel (sinistra) */
.cal-info-panel {
  width: 260px;
  min-width: 260px;
  padding: 32px 24px;
  border-right: 1px solid #2a2a2a;
}
.cal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  display: block;
}
.cal-owner-name {
  font-size: 13px;
  color: #999;
  margin-bottom: 6px;
}
.cal-event-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}
.cal-event-desc {
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
  line-height: 1.5;
}
.cal-meta-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cal-meta-item {
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-meta-item i {
  color: #c3a572;
  width: 14px;
  text-align: center;
}

/* Calendario (centro) */
.cal-calendar-panel {
  flex: 1;
  padding: 32px 24px;
  border-right: 1px solid #2b2b2b;
  min-width: 0;
}
.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.cal-month-label {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.cal-nav-btn {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
  line-height: 1;
}
.cal-nav-btn:hover {
  background: #2a2a2a;
  color: #fff;
}
.cal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Loading state */
.cal-calendar-panel.is-loading .cal-grid,
.cal-calendar-panel.is-loading .cal-month-label {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cal-loading-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border: 3px solid #333;
  border-top-color: #c3a572;
  border-radius: 50%;
  animation: cal-spin 0.7s linear infinite;
}
.cal-calendar-panel {
  position: relative;
}
.cal-calendar-panel.is-loading .cal-loading-spinner {
  display: block;
}
@keyframes cal-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.cal-weekdays span {
  text-align: center;
  font-size: 11px;
  color: #555;
  font-weight: 600;
  padding: 4px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  text-align: center;
  padding: 8px 2px;
  border-radius: 8px;
  font-size: 14px;
  cursor: default;
  color: #555;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}
.cal-day.available {
  color: #fff;
  background: #2a2a2a;
  cursor: pointer;
  transition: background 0.2s;
}
.cal-day.available:hover {
  background: #3a3a3a;
}
.cal-day.selected {
  background: #c3a572 !important;
  color: #1a1a1a !important;
  font-weight: 700;
}
.cal-day.today::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #c3a572;
  border-radius: 50%;
}
.cal-day.today.selected::after {
  background: #1a1a1a;
}

/* Slot orari (destra) */
.cal-slots-panel {
  width: 190px;
  min-width: 190px;
  padding: 32px 16px;
  display: none;
}
.cal-selected-day-label {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  text-transform: capitalize;
}
.cal-time-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}
.cal-time-btn {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #333;
  background: none;
  color: #888;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-time-btn.active {
  background: #2a2a2a;
  color: #fff;
  border-color: #444;
}
.cal-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-slot-btn {
  width: 100%;
  padding: 11px 8px;
  border-radius: 8px;
  border: 1px solid #333;
  background: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-slot-btn:hover {
  background: #3a3a3a;
  color: #fff;
  border-color: #444;
}
.cal-slot-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
  transition: background 0.2s, box-shadow 0.2s;
}
.cal-slot-btn:hover .cal-slot-dot {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

/* Form prenotazione — layout orizzontale */
.cal-form-overlay {
  max-width: 100%;
  margin: 0 auto;
}
.cal-form-widget {
  display: flex;
  background: #222222;
  /* border-radius: 16px;*/
  overflow: hidden;
  border: 1px solid #2a2a2a;
  min-height: 480px;
}
.cal-form-info-panel {
  width: 260px;
  min-width: 260px;
  padding: 32px 24px;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
}
.cal-form-datetime-side {
  font-size: 13px;
  color: #c3a572;
  margin-top: 10px;
  line-height: 1.5;
}
.cal-form-back-side {
  margin-top: auto;
  padding-top: 24px;
  background: none;
  border: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  padding-left: 0;
  transition: color 0.2s;
}
.cal-form-back-side:hover {
  color: #c3a572;
}
.cal-form-panel {
  flex: 1;
  padding: 32px 28px;
  overflow-y: auto;
}
.cal-form-row {
  display: flex;
  gap: 12px;
}
.cal-form-row .cal-form-field {
  flex: 1;
}
.cal-form-field {
  margin-bottom: 16px;
}
.cal-form-field label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}
.cal-form-field input,
.cal-form-field textarea {
  width: 100%;
  padding: 10px 14px;
  background: #222222;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
.cal-form-field input:focus,
.cal-form-field textarea:focus {
  outline: none;
  border-color: #c3a572;
}
.cal-form-field textarea {
  height: 90px;
  resize: vertical;
}
.cal-submit-btn {
  width: 100%;
  padding: 12px;
  background: #c3a572;
  border: none;
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.cal-submit-btn:hover {
  opacity: 0.85;
}

/* Google Places dropdown — dark theme per coerenza col form */
.pac-container {
  z-index: 99999 !important;
  background: #2a2a2a !important;
  border: 1px solid #444 !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  font-family: inherit !important;
}
.pac-item {
  background: #2a2a2a !important;
  color: #ccc !important;
  border-top: 1px solid #333 !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  cursor: pointer !important;
}
.pac-item:hover,
.pac-item-selected {
  background: #3a3a3a !important;
}
.pac-item-query {
  color: #fff !important;
  font-size: 13px !important;
}
.pac-matched {
  color: #c3a572 !important;
  font-weight: 700 !important;
}
.pac-icon {
  display: none !important;
}

/* Autocomplete marca — appended to body, positioned via JS */
.cal-address-suggestions {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 4px 0;
  list-style: none;
  z-index: 99999;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}
.cal-address-suggestions li {
  padding: 9px 14px;
  font-size: 13px;
  color: #ccc;
  cursor: pointer;
  line-height: 1.4;
}
.cal-address-suggestions li:hover {
  background: #3a3a3a;
  color: #fff;
}

/* ===== CAPTCHA ===== */
.cal-captcha-submit-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 10px;
}
.cal-captcha-input-wrap {
  position: relative;
  width: 190px;
  flex-shrink: 0;
}
.cal-captcha-input-wrap input[type="text"] {
  width: 100%;
  height: 100%;
  padding: 10px 14px;
  padding-right: 88px;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
.cal-captcha-input-wrap input[type="text"]:focus {
  outline: none;
  border-color: #c3a572;
}
.cal-captcha-inner {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  background: #333;
  border-left: 1px solid #444;
  border-radius: 0 8px 8px 0;
  pointer-events: auto;
}
#cal-captcha-display {
  color: #c3a572;
  font-weight: 700;
  letter-spacing: 4px;
  font-family: monospace;
  font-size: 15px;
  user-select: none;
}
#cal-captcha-refresh {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
  line-height: 1;
  transition:
    color 0.2s,
    transform 0.3s;
}
#cal-captcha-refresh:hover {
  color: #c3a572;
  transform: rotate(180deg);
}
.cal-captcha-submit-row .cal-submit-btn {
  flex: 1;
  white-space: nowrap;
  margin-top: 0;
  padding: 10px 18px;
}

/* ===== PRIVACY CHECKBOX ===== */
.cal-privacy-row {
  margin-bottom: 4px;
}
.cal-privacy-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}
.cal-privacy-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cal-privacy-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: #2a2a2a;
  border: 2px solid #555;
  border-radius: 4px;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.cal-privacy-box::after {
  content: "";
  display: none;
  width: 5px;
  height: 9px;
  border: 2px solid #1a1a1a;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.cal-privacy-label input[type="checkbox"]:checked + .cal-privacy-box {
  background: #c3a572;
  border-color: #c3a572;
}
.cal-privacy-label input[type="checkbox"]:checked + .cal-privacy-box::after {
  display: block;
}
.cal-privacy-text {
  font-size: 13px;
  color: #888;
}
.cal-privacy-text a {
  color: #c3a572;
  text-decoration: none;
}
.cal-privacy-text a:hover {
  text-decoration: underline;
}

/* ===== MODAL PRIVACY ===== */
#cal-privacy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.cal-privacy-modal-box {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  animation: calVideoIn 0.3s ease;
}
#cal-privacy-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #2a2a2a;
  border: 1px solid #333;
  color: #aaa;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s;
}
#cal-privacy-modal-close:hover {
  background: #c3a572;
  color: #1a1a1a;
  border-color: #c3a572;
}
.cal-privacy-modal-scroll {
  overflow-y: auto;
  padding: 24px 28px 28px;
  font-size: 13px;
  color: #bbb;
  line-height: 1.7;
}
.cal-privacy-modal-scroll h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.cal-privacy-modal-scroll h3 {
  font-size: 11px;
  font-weight: 700;
  color: #c3a572;
  margin: 18px 0 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 4px;
}
.cal-privacy-modal-scroll p {
  margin: 0 0 10px;
}
.cal-privacy-modal-scroll a {
  color: #c3a572;
}
.cal-privacy-modal-scroll img {
  filter: brightness(0.85);
}

/* Responsive */
@media (max-width: 560px) {
  .cal-captcha-submit-row {
    flex-wrap: wrap;
  }
  .cal-captcha-input-wrap {
    flex: 1 1 100%;
  }
  .cal-captcha-submit-row .cal-submit-btn {
    flex: 1 1 100%;
  }
}

/* ===== VIDEO OVERLAY ===== */
#cal-video-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.cal-video-box {
  width: 100%;
  max-width: 820px;
  animation: calVideoIn 0.35s ease;
}
@keyframes calVideoIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.cal-video-header {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  text-align: center;
}
.cal-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.cal-video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.cal-video-footer {
  text-align: center;
  margin-top: 18px;
}
#cal-video-close {
  padding: 12px 32px;
  background: #c3a572;
  border: none;
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
#cal-video-close:hover {
  opacity: 0.85;
}

/* Messaggio successo */
.cal-success-msg {
  background: #0f2a0f;
  border: 1px solid #1a4a1a;
  color: #6fc96f;
  padding: 16px 20px;
  border-radius: 10px;
  margin: 0 auto 24px;
  max-width: 920px;
  font-size: 14px;
}
.cal-success-msg i {
  margin-right: 8px;
}

/* Barra mobile back+datetime: nascosta di default, visibile solo su mobile */
.cal-form-mobile-bar {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  /* Booking widget: colonna unica */
  .cal-booking-widget,
  .cal-form-widget {
    flex-direction: column;
  }

  /* Pannello info booking: nascosto su mobile (è rumore prima del calendario) */
  .cal-info-panel {
    display: none;
  }

  .cal-calendar-panel {
    border-right: none;
    border-bottom: 1px solid #2a2a2a;
    padding: 20px 16px;
  }
  .cal-slots-panel {
    width: 100%;
    min-width: unset;
    padding: 16px;
  }

  /* Pannello sinistro form: nascosto su mobile */
  .cal-form-info-panel {
    display: none;
  }

  /* Barra mobile: back + data/ora */
  .cal-form-mobile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 16px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 16px;
  }
  .cal-mobile-back {
    background: none;
    border: 1px solid #333;
    border-radius: 6px;
    color: #aaa;
    font-size: 13px;
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .cal-mobile-back:hover {
    color: #fff;
    border-color: #555;
  }
  .cal-mobile-datetime {
    font-size: 13px;
    color: #c3a572;
    line-height: 1.4;
  }

  /* Form: campi in colonna singola */
  .cal-form-panel {
    padding: 16px;
  }
  .cal-form-row {
    flex-direction: column;
    gap: 0;
  }

  /* Come funziona: nascosto su mobile */
  #cal-come-funziona {
    display: none;
  }
}

/*======================================
 [ Portfolio - Optimized ]
 ======================================*/

/* ===== VARIABILI CSS ===== */
:root {
  --portfolio-gutter-desktop: 2%;
  --portfolio-gutter-mobile: 6%;
  --portfolio-border-radius: 12px;
  --portfolio-shadow-default: 0 4px 12px rgba(0, 0, 0, 0.1);
  --portfolio-shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.15);
  --portfolio-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --portfolio-accent: #c3a572;
  --portfolio-accent-dark: #ab9062;
  --blur-intensity: 20px;
}

/* ===== MASONRY GRID ===== */
.grid__col-sizer,
.photo-item {
  width: 32%;
  margin-bottom: 10px;
}

.grid__gutter-sizer {
  width: var(--portfolio-gutter-desktop);
}

/* ===== PHOTO ITEM ===== */
.photo-item {
  float: left;
  position: relative;
  border-radius: var(--portfolio-border-radius);
  overflow: hidden;
  box-shadow: var(--portfolio-shadow-default);
  transition: var(--portfolio-transition);
  -webkit-transform: translateZ(0); /* Hardware acceleration */
  transform: translateZ(0);
  will-change: transform;
}

.photo-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--portfolio-shadow-hover);
}

/* ===== IMMAGINI ===== */
.photo-item__image {
  display: block;
  max-width: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.photo-item:hover .photo-item__image {
  transform: scale(1.05);
}

/* ===== OVERLAY GRADIENT ===== */
.photo-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(195, 165, 114, 0.1),
    rgba(171, 144, 98, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.photo-item:hover::before {
  opacity: 1;
}

/* ===== CAPTION ===== */
.photo-item__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 20px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  transform: translateZ(0);
}

.photo-item:hover .photo-item__caption {
  opacity: 1;
}

.photo-item__caption a {
  color: white;
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.photo-item__caption a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== LOADING STATUS ===== */
.page-load-status {
  display: none;
  padding-top: 20px;
  text-align: center;
  color: #777;
}

/* ===== LOADER ===== */
.loader-ellips {
  font-size: 20px;
  position: relative;
  width: 4em;
  height: 1em;
  margin: 10px auto;
}

.loader-ellips__dot {
  display: block;
  width: 1em;
  height: 1em;
  border-radius: 0.5em;
  background: var(--portfolio-accent);
  position: absolute;
  animation-duration: 0.5s;
  animation-timing-function: ease;
  animation-iteration-count: infinite;
}

.loader-ellips__dot:nth-child(1),
.loader-ellips__dot:nth-child(2) {
  left: 0;
}
.loader-ellips__dot:nth-child(3) {
  left: 1.5em;
}
.loader-ellips__dot:nth-child(4) {
  left: 3em;
}

@keyframes reveal {
  from {
    transform: scale(0.001);
  }
  to {
    transform: scale(1);
  }
}

@keyframes slide {
  to {
    transform: translateX(1.5em);
  }
}

.loader-ellips__dot:nth-child(1) {
  animation-name: reveal;
}

.loader-ellips__dot:nth-child(2),
.loader-ellips__dot:nth-child(3) {
  animation-name: slide;
}

.loader-ellips__dot:nth-child(4) {
  animation-name: reveal;
  animation-direction: reverse;
}

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--portfolio-accent);
  color: #fff;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
  outline: none;
}

.scroll-to-top:hover {
  background-color: var(--portfolio-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top:active {
  transform: translateY(0);
}

.scroll-to-top i {
  font-size: 20px;
  display: inline-block;
}

/* ===== LIGHTCASE OVERLAY (Blur Background) ===== */
#lightcase-overlay {
  background: #212529ad !important;
  backdrop-filter: blur(var(--blur-intensity)) !important;
  -webkit-backdrop-filter: blur(var(--blur-intensity)) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

#lightcase-case {
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  z-index: 999999 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: lightcaseZoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes lightcaseZoomIn {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

#lightcase-content {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#lightcase-content img {
  border-radius: 8px !important;
  min-width: 400px !important;
  min-height: 300px !important;
  object-fit: contain !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Nascondi navigazione e info */
#lightcase-nav-prev,
#lightcase-nav-next,
.lightcase-nav-prev,
.lightcase-nav-next,
#lightcase-info,
.lightcase-info {
  display: none !important;
  visibility: hidden !important;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media only screen and (max-width: 720px) {
  .grid__col-sizer,
  .photo-item {
    width: 47%;
  }

  .grid__gutter-sizer {
    width: var(--portfolio-gutter-mobile);
  }

  .masonry-grid {
    width: calc(100% - 30px);
    max-width: 610px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  .photo-item:hover {
    transform: translateY(-4px) scale(1.01);
  }

  /* Lightcase mobile */
  #lightcase-overlay {
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
  }

  #lightcase-case {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: auto !important;
    height: auto !important;
  }

  #lightcase-content img {
    border-radius: 0 !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    min-width: 85vw !important;
    min-height: 60vh !important;
    width: 85vw !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Close button mobile */
  #lightcase-close {
    display: flex !important;
    visibility: visible !important;
    position: absolute !important;
    top: -15px !important;
    right: -15px !important;
    z-index: 99999999 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  }

  /* Disabilita navigazione mobile */
  #lightcase-nav-prev,
  #lightcase-nav-next {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Nascondi close button desktop */
@media only screen and (min-width: 721px) {
  #lightcase-close {
    display: none !important;
    visibility: hidden !important;
  }
}

/* ===== IPHONE & SMALL DEVICES ===== */
@media only screen and (max-width: 430px) {
  #lightcase-case {
    max-width: 98vw !important;
    max-height: 90vh !important;
  }

  #lightcase-content img {
    min-width: 90vw !important;
    min-height: 70vh !important;
    width: 90vw !important;
    max-width: 90vw !important;
    max-height: 85vh !important;
  }
}

/* Notch devices */
@media only screen and (max-width: 430px) and (min-height: 800px) {
  #lightcase-case {
    max-height: 80vh !important;
  }
}

/* ===== LANDSCAPE MODE ===== */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  #lightcase-close {
    top: -12px !important;
    right: -12px !important;
    width: 35px !important;
    height: 35px !important;
    font-size: 18px !important;
  }

  #lightcase-case {
    max-height: 95vh !important;
    max-width: 95vw !important;
  }

  #lightcase-content img {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  }
}

/* Fallback per browser senza backdrop-filter */
@supports not (backdrop-filter: blur(15px)) {
  #lightcase-overlay {
    background: rgba(255, 255, 255, 0.95) !important;
  }
}

/* ===== PROTEZIONE IMMAGINI ===== */
.photo-item,
.photo-item img,
#lightcase-content,
#lightcase-content img,
.masonry-grid {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Disabilita menu contestuale */
.masonry-grid,
.photo-item,
.photo-item * {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* ===== MENU OVERLAY BLUR ===== */
body.menu-open .pt-wrapper,
body.menu-open .main-content,
body.menu-open .content-pages,
body.menu-open .sub-home-pages,
body.menu-open .site-main,
body.menu-open .masonry-grid,
body.menu-open #portfolio {
  filter: blur(5px) !important;
  pointer-events: none;
  transition: filter 0.3s ease !important;
}

body:not(.menu-open) .pt-wrapper,
body:not(.menu-open) .main-content,
body:not(.menu-open) .content-pages,
body:not(.menu-open) .sub-home-pages,
body:not(.menu-open) .site-main,
body:not(.menu-open) .masonry-grid {
  filter: none !important;
  pointer-events: auto;
  transition: filter 0.3s ease !important;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .photo-item,
  .photo-item__image,
  .photo-item::before,
  .photo-item__caption,
  .scroll-to-top,
  #lightcase-case {
    transition: none !important;
    animation: none !important;
  }

  .photo-item:hover {
    transform: none !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .scroll-to-top,
  .page-load-status {
    display: none !important;
  }

  .photo-item {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }
}
