

/* ==============================================
   Root variables & Toast Notifications
   ============================================== */
:root {
  --toast-bg: #323232;
  --toast-success: #4caf50;
  --toast-error: #f44336;
  --toast-text: #ffffff;
  --toast-radius: 8px;
  --toast-padding: 0.75rem 1.25rem;

  /* Card color variables (defaults) */
  --card-bg-default: #f8f9fa;
  --card-text-default: #333333;
  --card-title-default: #000000;
}

/* ==============================================
   Toast Notification
   ============================================== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: var(--toast-padding);
  border-radius: var(--toast-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  z-index: 10000;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#toast-icon { font-size: 1.2rem; }
#toast-close {
  background: transparent;
  border: none;
  color: var(--toast-text);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
}
@keyframes toastTimeout {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ==============================================
   Avviso Overlay & Box (popup avvisi)
   ============================================== */
.avviso-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.avviso-box {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  animation: scaleIn 0.3s ease;
  position: relative;
  font-family: 'Inter', sans-serif;
  color: #333;
}
.avviso-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(0,0,0,0.1);
  border: none;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.3s ease;
}
.avviso-close:hover {
  background: rgba(0,0,0,0.2);
}
.avviso-content .icon-success {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 1rem;
}
.avviso-content p {
  font-size: 1.2rem;
  color: #333;
}
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ==============================================
   Popup Overlay & Content (gallery images)
   ============================================== */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 9999;
}
.popup-content {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 0;
  border-radius: 1.5rem;
  width: 90%;
  max-width: 600px;
  max-height: 90%;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 10000;
}
.popup-image {
  width: 100%;
  height: 100%;
}
.popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.popup-text { display: none; }
.popup-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: rgba(0,0,0,0.6);
  border: none;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background 0.3s ease, transform 0.2s ease;
  z-index: 10001;
}
.popup-close:hover {
  background: rgba(0,0,0,0.8);
  transform: scale(1.1);
}

/* ==============================================
   Hover Animations for Interactive Elements
   ============================================== */
.btn:hover {
  transform: translateY(-3px) scale(1.05);
  transition: transform 0.3s ease;
}
.card-custom:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
/* Disposizione base per le card: diventa flex container */
.card-custom {
  display: flex;
  overflow: hidden;
}

/* LEFT: immagine a sinistra, testo a destra */
.card--left {
  flex-direction: row;
}
.card--left .card-img-top {
  width: 50%;
  height: auto;
}
.card--left .card-body {
  width: 50%;
}

/* RIGHT: immagine a destra, testo a sinistra */
.card--right {
  flex-direction: row-reverse;
}
.card--right .card-img-top {
  width: 50%;
  height: auto;
}
.card--right .card-body {
  width: 50%;
}

/* ABOVE: immagine sopra, testo sotto */
.card--above {
  flex-direction: column;
}
.card--above .card-img-top {
  width: 100%;
  height: auto;
}
.card--above .card-body {
  width: 100%;
}

/* BELOW: immagine sotto, testo sopra */
.card--below {
  flex-direction: column-reverse;
}
.card--below .card-img-top {
  width: 100%;
  height: auto;
}
.card--below .card-body {
  width: 100%;
}
/* ==============================================
   Override responsive per smartphone
   ============================================== */
@media (max-width: 767px) {
  /* Su schermi piccoli, tutte le card in colonna */
  .card-custom {
    flex-direction: column !important;
  }
  /* Immagine full-width e scaling corretto */
  .card-custom .card-img-top {
    width: 100% !important;
    height: auto !important;
  }
  /* Corpo full-width */
  .card-custom .card-body {
    width: 100% !important;
  }
  /* Mantieni il margin-bottom delle colonne */
  .cards-container .col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Hover effect per i button nelle card */
    .card-custom .btn {
      transition: filter 0.2s ease;
    }
    .card-custom .btn:hover {
      filter: brightness(85%);
    }


/* ==============================================
   FAQ Styles
   ============================================== */
.faq-wrapper .accordion-button {
  font-weight: bold;
}
.faq-wrapper {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 1rem;
}

/* ==============================================
   Banner Slider
   ============================================== */
.banner-slider {
  width: 100%;
  margin: 2rem 0 0;
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
  transition: opacity 0.5s ease, transform 0.3s ease;
}
.banner-slider .slide {
  position: relative;
  width: 100%;
  height: 500px;
}
.banner-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.banner-slider .slide::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  pointer-events: none;
  z-index: 1;
}
.slide-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 2rem;
  background: rgba(15, 147, 125, 0.828);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  z-index: 2;
}
.banner-slider .slide-prev,
.banner-slider .slide-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); color: #fff; border: none;
  padding: 0.75rem 1rem; font-size: 1.2rem;
  border-radius: 50%; cursor: pointer; z-index: 3;
  transition: background 0.3s ease;
}
.banner-slider .slide-prev:hover,
.banner-slider .slide-next:hover {
  background: rgba(0,0,0,0.7);
}
.banner-slider .slide-prev { left: 1rem; }
.banner-slider .slide-next { right: 1rem; }

/* ==============================================
   Pill-shaped Buttons
   ============================================== */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  border: none;
  border-radius: 2rem;
  background-color: #0593a6;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.btn:hover {
  transform: translateY(-3px) scale(1.05);
  background-color: #035863;
}

/* ==============================================
   Card Styles & Color Variants
   ============================================== */
.cards-container {
  margin-top: 2rem;
}
.card-custom {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background-color: var(--card-bg-default);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-custom .card-body {
  background-color: transparent;
  padding: 1.5rem;
  color: var(--card-text-default);
}
.card-custom .card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: var(--card-title-default);
}
.card-custom .card-text {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Alternanza chiaro/scuro */
.cards-container .card-custom:nth-child(odd) {
  --card-bg-default: #ffffff;
  --card-text-default: #212121;
  --card-title-default: #444444;
}
.cards-container .card-custom:nth-child(even) {
  --card-bg-default: #23546c;
  --card-text-default: #263238;
  --card-title-default: #546e7a;
}

/* Palette dedicate per prime 4 card */
.cards-container .card-custom:nth-child(1) {
  --card-bg-default: #2a756e;   /* azzurro chiaro */
  --card-text-default: #ffffff; /* blu scuro */
  --card-title-default: #fcfcfc;/* blu medio */
}
.cards-container .card-custom:nth-child(2) {
  --card-bg-default: #ffebee;   /* rosa chiaro */
  --card-text-default: #b71c1c; /* rosso scuro */
  --card-title-default: #d32f2f;/* rosso medio */
}
.cards-container .card-custom:nth-child(3) {
  --card-bg-default: #e8f5e9;   /* verde chiaro */
  --card-text-default: #1b5e20; /* verde scuro */
  --card-title-default: #388e3c;/* verde medio */
}
.cards-container .card-custom:nth-child(4) {
  --card-bg-default: #fff8e1;   /* giallo chiaro */
  --card-text-default: #ff6f00; /* arancio scuro */
  --card-title-default: #ffa726;/* arancio medio */
}

/* ==============================================
   Form, Map & Image-Text Groups
   ============================================== */
.contact-form-wrapper,
.candidatura-wrapper {
  background-color: #9bdac93f;
  padding: 2rem;
  border-radius: 1.5rem;
  margin: 2rem 0;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ffffff;
  border-radius: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}
label {
  font-weight: bold;
  margin-bottom: 0.25rem;
  display: block;
}
.map-wrapper {
  margin-top: 2rem;
}
.map-embed iframe {
  width: 100%;
  height: 400px;
  border: 0;
}
.image-text-group {
  margin-bottom: 2rem;
}
.image-text-item {
  margin-bottom: 2rem;
}
.image-text-group .image-wrapper {
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 1rem;
}
.image-text-group .image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}
.image-text-group .text-wrapper {
  margin-bottom: 1rem;
}
.image-text-group .row {
  display: flex;
  flex-wrap: wrap;
}
.image-text-group .col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

/* ==============================================
   Media Queries (mobile/tablet)
   ============================================== */
@media (max-width: 767px) {
  .banner-slider .slide { height: 300px; }
  .slide-caption {
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
  }
  .cards-container .col {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .image-text-group .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .banner-slider .slide { height: 250px; }
  .slide-caption { font-size: 1.2rem; }
  .cards-container .col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .banner-slider .slide { height: 400px; }
  .slide-caption { font-size: 2.5rem; }
  .cards-container .col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .banner-slider .slide { height: 350px; }
  .slide-caption { font-size: 2rem; }
  .cards-container .col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
/* ──────────────────────────────────────────
   TikTok – griglia e card video
   ────────────────────────────────────────── */

/* Contenitore di tutti i video             */
/* 1 colonna su mobile, 2 su tablet, 3 desktop */
.tiktok-grid{
  display:grid;
  gap:1.5rem;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
}

/* Wrapper opzionale di ogni elemento       */
/* (utile se devi aggiungere margini extra)  */
.tiktok-item{ width:100%; box-sizing:border-box; }

/* —–– layout “inline‑block” alternativo (facoltativo) —–– */
@media (min-width:768px){  .tiktok-item{ width:48%;  display:inline-block; } } /* 2 per riga */
@media (min-width:1200px){ .tiktok-item{ width:31%; } }                      /* 3 per riga */
.tiktok-item{ margin:0 1% 2rem; }

/* ── Placeholder 9:16 con angoli arrotondati ── */
.tiktok-placeholder{
  position:relative;
  aspect-ratio:9/16;          /* 540 × 960 circa */
  overflow:hidden;
  display:block;
  text-decoration:none;       /* niente underline sul link */
  border-radius:18px;         /* ⬅️ regola l’angolo qui */
  background:#000;            /* fallback se la thumb non carica */
}
.tiktok-placeholder img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:inherit;      /* immagine → stessi angoli del wrapper */
}

/* ── Pulsante play centrato ── */
.tiktok-play-btn{
  position:absolute;
  inset:0;                    /* centratore “a tutta area” */
  margin:auto;
  width:64px; height:64px;
  border:0;
  border-radius:50%;          /* cerchio */
  font:700 32px/64px sans-serif;
  color:#fff;
  background:rgba(0,0,0,.55);
  cursor:pointer;
  transition:background .2s;
  text-align:center;
}
.tiktok-play-btn:hover{ background:rgba(0,0,0,.75); }

/* ── Testo descrizione sotto al video (facoltativo) ── */
.tiktok-desc{
  margin-top:.75rem;
  font-size:.95rem;
  line-height:1.35;
}
.tiktok-desc p{ margin-bottom:.5rem; }

/* ──────────────────────────────────────────────
   TAB ELLA · glass-look (senza contorno)
   ────────────────────────────────────────────── */
/* ──────────────────────────────────────────────
   TABELL A · glass look (no-border, full responsive)
   ────────────────────────────────────────────── */
:root{
  --tbl-radius : 1.2rem;
  --tbl-shadow : 0 8px 24px rgba(0,0,0,.05);   /* set to none for zero shadow */
  --tbl-even   : rgba(255,255,255,.42);
  --tbl-hover  : rgba(255,255,255,.55);
  --tbl-head   : rgba(255,255,255,.65);
  --tbl-accent : #0593a6;                      /* usato solo per la barretta header */
  --tbl-label  : #64748b;
  --tbl-font   : 'Inter',sans-serif;
}

/* ── RESET BORDE RI DI BOOTSTRAP (desktop & mobile) ────────────── */
.tabella-block table,
.tabella-block th,
.tabella-block td,
.tabella-block table.table-bordered,
.tabella-block table.table-bordered th,
.tabella-block table.table-bordered td{
  border: none !important;
  border-color: transparent !important;
}

/* ── WRAPPER GENERALE ──────────────────────────────────────────── */
.tabella-block{ margin:2.5rem 0; font-family:var(--tbl-font); }

/* ========== DESKTOP / TABLET ≥768px ============================ */
@media (min-width:768px){

  .tabella-block table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    border-radius:var(--tbl-radius);
    background:rgba(255,255,255,.35);
    backdrop-filter:blur(8px) saturate(160%);
    box-shadow:var(--tbl-shadow);
    overflow:hidden;                /* mantiene il radius */
  }

  /* header con barretta accent (commenta ::after se non la vuoi) */
  .tabella-block th{
    background:var(--tbl-head);
    padding:1rem 1.25rem;
    font-weight:600;
    text-align:left;
    position:relative;
  }
  .tabella-block th::after{
    content:"";
    position:absolute;
    left:0; right:0; bottom:-1px;
    height:2px;
    background:var(--tbl-accent);
  }

  /* celle senza bordo, zebra + hover */
  .tabella-block td{ padding:.95rem 1.25rem; transition:background .25s;}
  .tabella-block tbody tr:nth-child(even){background:var(--tbl-even);}
  .tabella-block tbody tr:hover         {background:var(--tbl-hover);}
}

/* ========== MOBILE <768px — card rows ========================== */
@media (max-width:767px){

  .tabella-block table{ width:100%; border:0; }
  .tabella-block thead{ display:none; }

  .tabella-block tbody tr{
    display:block;
    margin:0 0 1.2rem;
    background:rgba(255,255,255,.35);              /* ← default “glass” */
    backdrop-filter:blur(8px) saturate(160%);
    border-radius:var(--tbl-radius);
    box-shadow:var(--tbl-shadow);
    overflow:hidden;
  }

  .tabella-block td{
    display:flex;
    gap:.9rem;
    padding:1rem 1.25rem;
    position:relative;
  }

  /* separatore interno (opzionale – rimuovi ::after se vuoi nessuna linea) */
  .tabella-block td:not(:last-child)::after{
    content:"";
    position:absolute;
    left:1.25rem; right:1.25rem; bottom:0;
    height:1px;
    background:linear-gradient(to right,
                transparent 0%,rgba(0,0,0,.05) 50%,transparent 100%);
  }

  /* etichetta colonna */
  .tabella-block td::before{
    content:attr(data-label);
    flex:0 0 42%;
    font-weight:600;
    color:var(--tbl-label);
  }
  .tabella-block td>*{ flex:1 1 58%; }

  /* feedback tap */
  .tabella-block tbody tr:active{ transform:scale(.97); }

 

  /* 2) la cella colorata diventa larga quanto la card */
  .tabella-block td[data-bg]{
    flex:0 0 100%;
    width:100%;
  }
}

/* ── animazioni soft (se vuoi) ─────────────────────────────── */
@keyframes fadeIn  { from{opacity:0;transform:translateY(8px);}  to{opacity:1;transform:none;} }
@keyframes fadeInUp{ from{opacity:0;transform:translateY(14px);} to{opacity:1;transform:none;} }



.opening-hours .list-group-item {
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 0.75rem 1rem;
}
.opening-hours .list-group-item:last-child {
  border-bottom: none;
}
.opening-hours .list-group-item.active {
  background-color: #e9f7ef;
  color: #155724;
}
.opening-hours .badge {
  font-size: 0.85rem;
  text-transform: uppercase;
}
.opening-hours i {
  color: #0593a6;
}

.loan-calculator {
  background-color: var(--card-bg-default);
  color: var(--card-text-default);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.app-store-badge-block {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 30px;
}

.app-store-badge-link {
  display: inline-block;
}

.app-store-badge-img {
  width: 245px;
  height: auto;
  vertical-align: middle;
  object-fit: contain;
}

  