/* =============================================
   Somewhere Tours – Custom CSS Override
   ============================================= */


/* Section space dimezzato */
:root { --section-space: 60px; --section-space-bottom: 60px; }

/* Newsletter – larghezza form estesa per 3 campi */
.newsletter-form { max-width: 760px; }

/* Gallery Instagram – immagini quadrate */
.sidebar-gallery .gallery-thumb img,
.gallery-thumb2 img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}

/* Booking form – dropdown list più larga */
.input-wrap .form-group .nice-select .list {
  width: 300px;
}
.destination-list .th-btn {
	position: absolute;
	right: 25px;
	bottom: 18px;
	padding: 6px 18px;
	opacity: 0;
	visibility: hidden;
}
.img-box3 .img2 {
	position: absolute;
	top: 20%;
	right: 5%;
}
.about-item.style2 .about-item_img {
	background-color: var(--theme-color);
}

.border-primary {
	border: 2px solid #c10505 !important;
}

/* Disabilita cursor follower */
.cursor-follower { display: none !important; }

/* Menu principale */
.main-menu a {
  display: block;
  position: relative;
  font-weight: 500;
  font-size: 18px;
  font-family: var(--body-font);
  color: var(--black-color2);
  text-transform: capitalize;
}

:root {
  --theme-color: #c10505;        /* rosso Somewhere */
  --title-font: 'Montserrat', sans-serif;
  --body-font: 'Montserrat', sans-serif;
  --theme-color2: #1a1a2e;       /* blu notte profondo */
  --title-color: #1a1a2e;
  --body-color: #4a4a5a;
  --smoke-color: #f7f5f0;
  --black-color: #1a1a2e;
  --white-color: #ffffff;
  --border-color: #e8e0d5;
  --yellow-color: #b22c32;
  --th-border-radius: 8px;
  --ripple-ani-duration: 3s;
}

/* Logo header adattamento */
.header-logo img {
  max-height: 48px !important;
  width: auto;
}

/* Preloader lettera colore */
.txt-loading .characters {
  color: var(--theme-color);
}

/* Hero – slide con video: stessa struttura di .th-hero-bg */
.hero-1 .hero-inner {
  position: relative;
  overflow: hidden;
  /* altezza identica a quella data dal padding di .hero-style1 */
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Video a tutto schermo dentro la slide */
.hero-1 .hero-inner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Overlay scuro identico a .hero-1 .th-hero-bg:before */
.hero-1 .hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 12, 0.3);
  mix-blend-mode: normal;
  z-index: 1;
}

/* Contenuto sopra video e overlay */
.hero-1 .hero-inner .container {
  position: relative;
  z-index: 2;
}

/* Tour card hover */
.tour-card:hover .tour-card_img img {
  transform: scale(1.06);
}

/* Contatore sfondo leggero */
.counter-sec2 {
  background-color: var(--smoke-color);
}

/* Footer logo adattamento */
.th-widget-about .about-logo img {
  max-width: 150px;
}

/* Testo copyright footer */
.copyright-text {
  font-size: 14px;
}

/* Hero H1 dimensione */
.hero-style1 .hero-title {
  font-size: 65px;
}
@media (max-width: 767px) {
  .hero-style1 .hero-title {
    font-size: 35px;
    line-height: 1.2;
  }
}

/* Category card – immagini quadrate */
.category-card .box-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.category-card .box-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Logo-bg: allarga lo sfondo rosso per non tagliare il logo */
.header-layout1 .logo-bg { width: 22%; }
@media (max-width: 1299px) { .header-layout1 .logo-bg { width: 32%; } }
@media (max-width: 1199px) { .header-layout1 .logo-bg { width: 46%; } }
@media (max-width: 991px)  { .header-layout1 .logo-bg { width: 58%; } }
@media (max-width: 767px)  { .header-layout1 .logo-bg { width: 72%; } }
@media (max-width: 480px)  { .header-layout1 .logo-bg { width: 85%; } }

/* Icona voci sub-menu: sostituisce aereo con check */
.main-menu ul.sub-menu li a:before {
  content: "\f00c";
  font-size: 0.75em;
  top: 8px;
}

/* =============================================
   Mega Menu Tour
   ============================================= */
.main-menu .mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 860px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,0.13);
  border-radius: 8px;
  padding: 30px 10px 24px;
  flex-direction: row;
  gap: 0;
  z-index: 999;
  list-style: none;
  margin: 0;
}
.main-menu li:hover > .mega-menu {
  display: flex;
}
.mega-menu-col {
  flex: 1;
  padding: 0 20px;
  border-right: 1px solid #f0ece6;
}
.mega-menu-col:last-child {
  border-right: none;
}
.mega-menu-title {
  display: block;
  font-family: var(--title-font);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-color);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--theme-color);
}
.mega-menu-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-menu-col ul li {
  padding: 0;
  border: none;
}
.mega-menu-col ul li a {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  color: #4a4a5a;
  padding: 5px 0;
  line-height: 1.4;
  transition: color 0.2s, padding-left 0.2s;
  white-space: normal;
}
.mega-menu-col ul li a:hover {
  color: var(--theme-color);
  padding-left: 6px;
}
.mega-menu-all {
  font-weight: 600 !important;
  color: var(--theme-color) !important;
  margin-top: 6px;
  font-size: 13px !important;
}

/* Bottone rosso con hover nero */
.th-btn.btn-dark-hover {
  background-color: var(--theme-color);
  color: #fff;
  border-color: var(--theme-color);
}
.th-btn.btn-dark-hover:hover {
  background-color: var(--theme-color2);
  border-color: var(--theme-color2);
  color: #fff;
}

/* Tour hero – bottone guarda il video */
.play-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}
.play-video-btn:hover { opacity: 0.85; color: #fff; }
.play-video-btn .play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.7);
  font-size: 14px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.play-video-btn:hover .play-icon {
  background: var(--theme-color);
  border-color: var(--theme-color);
}
.play-video-btn .play-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Tour detail – info box rapide */
.tour-info-box { transition: box-shadow 0.2s; }
.tour-info-box:hover { box-shadow: 0 4px 16px rgba(106,6,6,0.10); }

/* Tour detail – recensioni card */
.testi-card { transition: box-shadow 0.2s; }
.testi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* Tour detail – form prenotazione */
.tour-booking-form .form-control,
.tour-booking-form .nice-select { height: 48px; border-radius: 8px; font-size: 14px; }
.tour-booking-form .form-control,
.tour-booking-form .nice-select,
.tour-booking-form .nice-select .current,
.tour-booking-form .nice-select .list .option { color: var(--body-color) !important; background-color: #fff !important; }
.tour-booking-form .form-control:focus { color: var(--body-color) !important; }
.tour-booking-form textarea.form-control { height: auto; }
.tour-booking-form textarea.form-control::placeholder { color: #aaa !important; }

/* Magnific Popup sopra sidemenu overlay */
.mfp-bg { z-index: 100010 !important; }
.mfp-wrap { z-index: 100011 !important; }

/* Simbolo ® ridotto */
.hero-style1 .hero-title sup,
.hero-style1 .hero-title .registered,
h1 sup, h2 sup, h3 sup, .hero-title sup {
  font-size: 0.35em;
  vertical-align: super;
}

/* =============================================
   Modifiche richieste dal cliente (revisione home)
   ============================================= */

/* --- Selettore lingua nella top bar --- */
.header-lang { position: relative; }
.header-lang .lang-toggle { display: inline-flex; align-items: center; gap: 4px; }
.header-lang .lang-flag { font-size: 15px; line-height: 1; }
.header-lang .lang-dropdown {
  position: absolute; top: 100%; right: 0; min-width: 90px;
  background: #fff; border: 1px solid var(--border-color);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px 0; margin: 8px 0 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .2s ease; z-index: 1000;
}
.header-lang:hover .lang-dropdown,
.header-lang.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.header-lang .lang-dropdown li { display: block; }
.header-lang .lang-dropdown a {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; color: var(--title-color); font-size: 14px;
}
.header-lang .lang-dropdown a:hover { background: #f6f6f6; color: var(--theme-color); }

/* La lingua resta visibile anche su mobile nella top bar */
@media (max-width: 767px) {
  .header-top .header-right .header-links ul { justify-content: center; }
  .header-lang .lang-code { display: none; } /* su mobile solo bandiera per risparmiare spazio */
}

/* --- Hint di scorrimento carousel tour (solo mobile) --- */
.swipe-hint {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 0 24px; color: var(--theme-color);
  font-size: 14px; font-weight: 600;
}
.swipe-hint .swipe-hint-arrow { animation: swipeHint 1.4s ease-in-out infinite; }
@keyframes swipeHint {
  0%, 100% { transform: translateX(0); opacity: .6; }
  50%      { transform: translateX(8px); opacity: 1; }
}

/* --- Fix sezione "Da 25 anni a Torino" su mobile --- */
/* Su desktop le 3 immagini sono sovrapposte (img2/img3 absolute):
   sotto i 992px le rendiamo statiche e affiancate, niente più overlap. */
@media (max-width: 991px) {
  .img-box3 { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
  .img-box3 .img1,
  .img-box3 .img2,
  .img-box3 .img3 {
    position: static !important;
    top: auto !important; right: auto !important;
    left: auto !important; bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
  }
  .img-box3 .img1 { flex: 1 1 100%; }
  .img-box3 .img2,
  .img-box3 .img3 { flex: 1 1 calc(50% - 6px); }
  .img-box3 img {
    width: 100%; height: auto;
    border-radius: var(--th-border-radius, 8px);
    object-fit: cover;
  }
  /* disattiva l'animazione movingX che muoverebbe le immagini affiancate */
  .img-box3 .movingX { animation: none !important; }
}

/* --- Card "Esplora le esperienze" (destination-list) su mobile --- */
/* Su mobile il testo si sovrapponeva all'immagine ed era poco leggibile:
   aggiungiamo un overlay scuro in basso e conteniamo l'altezza. */
@media (max-width: 991px) {
  .destination-list {
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: var(--th-border-radius, 8px);
    overflow: hidden;
  }
  .destination-list::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,0) 100%);
    z-index: 1;
  }
  .destination-list .destination-content {
    position: relative;
    z-index: 2;
    padding: 18px 20px 20px;
  }
  .destination-list .destination-content .box-title {
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 4px;
    text-shadow: 0 1px 6px rgba(0,0,0,.4);
  }
  .destination-list .destination-content .destination-subtitle {
    color: rgba(255,255,255,.85);
    font-size: 14px;
  }
  /* il bottone "Scopri" reso sempre visibile su mobile */
  .destination-list .th-btn {
    position: relative !important;
    right: auto; bottom: auto;
    opacity: 1 !important;
    visibility: visible !important;
    align-self: flex-start;
    z-index: 2;
    margin: 12px 0 18px 20px;
  }
}

/* --- Icona carrello nell'header (accanto a Calendario Tour) --- */
.header-cart-icon { transition: .25s ease; }
.header-cart-icon:hover { background: var(--theme-color); color: #fff !important; border-color: var(--theme-color); }
