/* =========================================================
   THEME.CSS — Elegant Light Theme inspired by Patara
   Compatible with Bootstrap 5
   Primary Color: #2596be
   Fonts: Poppins (body) + Playfair Display (titles)
   ========================================================= */

/* ------------------------------
   1. ROOT VARIABLES
------------------------------ */
:root {
  --primary-color: #2596be;
  --primary-color-dark: #1e7ca0;
  --secondary-color: #f5f7fa;
  --text-color: #333;
  --text-muted: #777;
  --heading-color: #111;
  --bg-color: #ffffff;
  --border-color: #e6e6e6;
  --font-body: 'Poppins', sans-serif;
  --font-title: 'Playfair Display', serif;
  --transition: all 0.3s ease;
}

/* ------------------------------
 2. BASE STYLES
------------------------------ */
body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.7;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--heading-color);
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color-dark);
  text-decoration: none;
}

.text-primary {
  color: var(--primary-color) !important;
}

/* ---------------------------
   SEZIONE DESCRIZIONE
--------------------------- */

#descrizione {
  background: #f9f9f9; /* sfondo chiaro, elegante */
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

#descrizione .intro .title small {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 1px;
}

#descrizione .intro .title h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin: 15px 0 25px;
  line-height: 1.2;
  color: #333;
}

#descrizione .intro p.lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 20px;
}

#descrizione .intro p em {
  font-style: italic;
  color: #777;
}

#descrizione .parallax_wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#descrizione .parallax_wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
  border-radius: 12px;
}

#descrizione .parallax_wrapper:hover img {
  transform: scale(1.05);
}

#descrizione .img_over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#descrizione .box_facilities {
  text-align: center;
  padding: 25px 15px;
  transition: all 0.3s ease;
  border-radius: 10px;
}

#descrizione .box_facilities i {
  font-size: 2.2rem;
  color: #00aaff;
  margin-bottom: 12px;
  display: inline-block;
}

#descrizione .box_facilities h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

#descrizione .box_facilities p {
  font-size: 0.95rem;
  color: #555;
}

/* Hover effetto leggero sui box */
#descrizione .box_facilities:hover {
  background: #e6f7ff;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Separatore orizzontale */
#descrizione hr.more_margin {
  margin: 60px 0;
  border: 0;
  border-top: 2px solid #eee;
}

/* Responsive */
@media (max-width: 992px) {
  #descrizione .intro .title h2 {
      font-size: 2rem;
  }
  #descrizione .intro p.lead {
      font-size: 1rem;
  }
}

@media (max-width: 576px) {
  #descrizione {
      padding: 60px 15px;
  }
}

/* ------------------------------
 3. NAVBAR
------------------------------ */
.navbar {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  z-index: 999;
}
.navbar-logo {
  height: 40px;
  width: auto;
}

/* Link desktop */
.navbar .nav-link {
  color: var(--heading-color);
  font-weight: 500;
  margin-left: 1.5rem;
  transition: color 0.3s;
}
.navbar .nav-link:hover {
  color: #2596be;
}

/* Hamburger */
.hamburger {
  width: 28px;
  height: 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background-color: #2596be;
  transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Menu mobile */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(255,255,255,0.98);
  z-index: 998;
  transition: right 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu.active { right: 0; }

.mobile-menu .nav-link {
  font-size: 1.4rem;
  padding: 0.8rem 0;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color 0.3s;
}
.mobile-menu .nav-link:hover { color: var(--heading-color); }

/* Nascondi hamburger su desktop */
@media(min-width: 992px) {
  .hamburger { display: none; }
}
/* ------------------------------
 4. HERO SECTION
------------------------------ */
.hero {
  min-height: 460px;
  height: 58svh;
  overflow: visible;
  position: relative;
  margin-bottom: 210px;
  isolation: isolate;
  z-index: 2;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
  clip-path: inset(0);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
}

.hero .container {
  z-index: 3;
  top: 38% !important;
  width: calc(100% - 24px);
}

.kross-booking-overlay {
  position: absolute;
  left: 50%;
  bottom: -138px;
  z-index: 4;
  width: calc(100% - 28px);
  transform: translateX(-50%);
  background: #fff;
  border: 8px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14);
  box-sizing: border-box;
  color: var(--text-color);
  max-width: calc(100vw - 28px);
  overflow-x: clip;
}

.kross-booking-overlay .kross-container {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 188px;
  background: #fff;
  overflow-x: auto;
  box-sizing: border-box;
}

.kross-booking-overlay .kross-container iframe,
.kross-booking-overlay .kross-container table,
.kross-booking-overlay .kross-container form {
  max-width: 100% !important;
  box-sizing: border-box;
}

.hero h1 {
  font-size: 2.4rem;
}

.hero p {
  font-size: 1rem;
}

.hero-btn {
  position: relative;
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: #0b3d66;
  border: none;
  border-radius: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

@media (min-width: 576px) {
  .hero {
    min-height: 440px;
    height: min(54vh, 520px);
    margin-bottom: 160px;
  }

  .hero .container {
    top: 43% !important;
    width: auto;
  }

  .kross-booking-overlay {
    bottom: -88px;
    width: min(680px, calc(100% - 32px));
    border-width: 8px;
  }

  .kross-booking-overlay .kross-container {
    min-height: 118px;
  }
}

@media (min-width: 992px) {
  .hero {
    min-height: 460px;
    height: min(56vh, 540px);
    margin-bottom: 130px;
  }

  .hero .container {
    top: 50% !important;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .kross-booking-overlay {
    bottom: -58px;
    width: min(1080px, calc(100% - 64px));
    border-width: 10px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
  }

  .kross-booking-overlay .kross-container {
    min-height: 92px;
  }
}

/* ------------------------------
 5. BUTTONS
------------------------------ */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--primary-color-dark);
  border-color: var(--primary-color-dark);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 50px;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* ------------------------------
 6. SECTIONS
------------------------------ */
.section {
  padding: 5rem 0;
  background-color: var(--bg-color);
}

.section.alt {
  background-color: var(--secondary-color);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0.5rem auto 0;
}

/* ------------------------------
 7. CARDS & BOXES
------------------------------ */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

.card img {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.card-body {
  padding: 2rem;
}

/* Gallery hover zoom */
.hover-zoom img {
  transition: transform 0.5s ease;
}

.hover-zoom:hover img {
  transform: scale(1.05);
}

/* ------------------------------
 8. FORMS
------------------------------ */
.form-control {
  border-radius: 50px;
  padding: 0.75rem 1.25rem;
  border-color: var(--border-color);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 150, 190, 0.25);
}

button:disabled,
button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.form-check-input:checked {
  background-color: var(--primary-color) !important;
}

/* ------------------------------
 9. FOOTER
------------------------------ */
.footer {
  background-color: var(--secondary-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
}

.footer a {
  color: var(--primary-color);
}

.footer a:hover {
  color: var(--primary-color-dark);
}

/* ------------------------------
 10. ANIMATIONS & EFFECTS
------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------
 11. UTILITIES
------------------------------ */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
  color: #fff;
}

.shadow-soft {
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.rounded-xl {
  border-radius: 1rem !important;
}

/* ------------------------------
 CAROSELLO IMG
------------------------------ */
.swiper {
  padding: 20px 0;
}

.swiper-slide {
  display: flex;
  justify-content: center; /* centra orizzontalmente */
  align-items: center;     /* centra verticalmente */
}

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

.swiper-button-next, .swiper-button-prev {
  color: #007bff;
}

.swiper-pagination-bullet-active {
  background: #007bff;
}

/* ------------------------------
 PATTERN IMG
------------------------------ */

/* Contenitore jarallax */
.jarallax {
  position: relative;
  overflow: hidden;
}

/* Overlay immagini */
.overlay-img {
  position: absolute;
  top: 10%;      /* regola la posizione verticale */
  left: 10%;     /* regola la posizione orizzontale */
  width: 80%;    /* larghezza overlay */
  z-index: 2;
  pointer-events: none; /* non interferisce con click o hover */
  transition: transform 0.2s ease-out;
}

.overlay-img img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* Overlay livello 2 e 3 con posizioni leggermente diverse */
.overlay-level-2 {
  top: 25%;
  left: 5%;
  width: 70%;
  z-index: 3;
}

.overlay-level-3 {
  top: 5%;
  left: 15%;
  width: 60%;
  z-index: 4;
}

/* ------------------------------
 COOKIE BAR
------------------------------ */

.cc--box {
  width: calc(100% - 24px);
  max-width: 420px;
  margin: 12px;
  border-radius: 10px;
  background: #ffffff;
  color: #333;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
  box-sizing: border-box;
}

#cc-main .cm {
  box-sizing: border-box;
}

#cc-main .cm.cm--box {
  width: calc(100vw - 24px);
  max-width: 420px;
}

.cc--box .cc__body {
  padding: 1rem;
}

.cc--box .cc__title {
  color: #004aad;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.cc--box .cc__desc {
  font-size: 0.88rem;
  line-height: 1.45;
}

.cc--box .cc__accept-all {
  width: 100%;
  background: #007bff;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  transition: 0.2s;
}

.cc--box .cc__accept-all:hover {
  background: #0056b3;
}

@media (max-width: 575.98px) {
  .cc--box,
  #cc-main .cm,
  #cc-main .cm.cm--box {
    position: fixed !important;
    inset: auto auto 12px 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: none !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
  }

  #cc-main .cm__body,
  #cc-main .cm__texts,
  #cc-main .cm__btns {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #cc-main .cm__btns {
    display: block !important;
  }

  #cc-main .cm__btn,
  #cc-main button {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
  }
}

@media (min-width: 576px) {
  .cc--box {
    width: auto;
    min-width: 340px;
    max-width: 440px;
    margin: 16px;
    border-radius: 12px;
  }

  .cc--box .cc__body {
    padding: 1.25rem;
  }
}

/* ===============================
   IMMAGINI SOVRAPPOSTE (stack)
=============================== */
#aboutus {
  padding-bottom: 6rem;
}

.image-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 15px;
  overflow: visible;
}

.image-stack__main,
.image-stack__overlay {
  background: #fff;
  border: 1px solid #efefef;
  border-radius: 6px;
  padding: 6px 6px 28px 6px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.14);
}

.image-stack__main {
  width: 86%;
  margin: 0 auto;
  display: block;
  transform: rotate(-3deg);
  transition: transform 0.6s ease, box-shadow 0.4s ease;
}

/* Immagine superiore */
.image-stack__overlay {
  position: absolute;
  top: 15%;
  left: 50%;
  width: 52%;
  transform: rotate(6deg);
  transition: transform 0.6s ease, box-shadow 0.4s ease;
  z-index: 2;
}

/* Hover (solo su desktop) */
@media (hover: hover) and (pointer: fine) {
  .image-stack:hover .image-stack__main {
    transform: rotate(-1deg) scale(1.03);
    box-shadow: 0 24px 44px rgba(0,0,0,0.2);
  }

  .image-stack:hover .image-stack__overlay {
    transform: rotate(3deg) scale(1.05) translateX(8px);
    box-shadow: 0 28px 52px rgba(0,0,0,0.25);
  }
}

/* ===============================
   RESPONSIVITÀ
=============================== */

/* Tablet orizzontale */
@media (max-width: 992px) {
  .hero {
    min-height: 440px;
    height: min(54vh, 520px);
  }

  .image-stack__overlay {
    top: 8%;
    left: 45%;
    width: 54%;
    transform: rotate(3deg);
  }
}

/* Tablet verticale */
@media (max-width: 768px) {
  .hero {
    min-height: 460px;
    height: 58svh;
  }

  .image-stack__overlay {
    top: 7%;
    left: 36%;
    width: 58%;
    transform: rotate(2deg);
  }

  .image-stack__main {
    width: 86%;
    margin: 0 auto;
    display: block;
  }
}

/* Smartphone */
@media (max-width: 576px) {
  #aboutus {
    padding-bottom: 4rem;
  }

  .image-stack {
    transform: scale(0.9);
    transform-origin: center top;
  }

  .image-stack__main {
    width: 92%;
    margin: 0 auto;
    display: block;
  }

  .image-stack__overlay {
    top: 10%;
    left: 30%;
    width: 64%;
    padding: 4px;
    transform: rotate(2deg);
  }
}

/* TITOLO FONT */
.hero h1 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  letter-spacing: 0.5px;
}

.navbar-brand {
  font-family: var(--font-title);
  font-size: 1.85rem;
  letter-spacing: 0.3px;
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }

  .navbar-brand {
    font-size: 1.45rem;
  }
}

/* ===============================
  COSA VISITARE
=============================== */
#cosavisitare {
  background: linear-gradient(to bottom right, #f8fbfd, #ffffff);
  position: relative;
}

#cosavisitare .section-title .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

#cosavisitare .intro-text p {
  color: #555;
  font-size: 1rem;
  line-height: 1.75;
}

.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.visit-card {
  background: #fff;
  border-radius: 15px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

.visit-card > i {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  display: block;
}

.visit-card h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: #222;
  margin-bottom: 0.5rem;
}

.visit-card p {
  font-size: 0.95rem;
  color: #555;
}

.visit-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.visit-map-link i {
  font-size: 0.95rem;
  margin: 0;
  display: inline;
}

.visit-card em {
  color: var(--primary-color-dark);
  font-weight: 500;
}

.visit-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.visit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.visit-card:hover::before {
  width: 60%;
}

/* Responsive spacing */
@media (max-width: 768px) {
  .visit-grid {
    gap: 1.2rem;
  }
}

/* ===============================
   CONTACT MAP
=============================== */
.contact-map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.contact-map iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

.review-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.review-card i {
  font-size: 1.2rem;
}

.language-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-flag {
  display: block;
  width: 28px;
  height: 18px;
}

.lang-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-flag.active {
  opacity: 1;
  pointer-events: none;
}

.lang-flag.active { opacity: 0.4; }

section {
  scroll-margin-top: 100px;
}
