/**
 * DEPENDEX & ACAT BASSO POLESINE — MOBILE-FIRST 9:16 ULTRA EXPERIENCE
 * Zero sbordature, touch-first responsive design, layout ottimizzato portrait 9:16
 */

/* Anti-sbordatura globale */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

img, svg, video, canvas {
  max-width: 100% !important;
  height: auto;
  display: block;
}

/* Container principale Mobile-First in formato 9:16 per Smartphone */
.mobile-916-shell {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 10px 12px 110px;
  position: relative;
  transition: max-width 0.3s ease, padding 0.3s ease;
}

/* FORMATO PC / TABLET 16:9 WIDESCREEN (Schermi ampi, Desktop, Notebook e Tablet) */
@media (min-width: 992px) {
  .mobile-916-shell {
    max-width: 1440px !important;
    margin: 24px auto !important;
    padding: 24px 32px 60px !important;
    background: rgba(10, 12, 18, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(212, 175, 55, 0.08);
  }

  /* LAYOUT CINEMATICO A 2 COLONNE 16:9 (Visual & Azione Affiancati) */
  .adaptive-169-split {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) !important;
    gap: 32px !important;
    align-items: start !important;
  }

  .adaptive-169-split .split-col-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 90px;
  }

  .adaptive-169-split .split-col-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* La barra sticky da smartphone su desktop 16:9 non serve */
  .m-sticky-bar {
    display: none !important;
  }
}

@media (min-width: 1400px) {
  .mobile-916-shell {
    max-width: 1560px !important;
    padding: 30px 42px 70px !important;
  }
  .adaptive-169-split {
    gap: 40px !important;
  }
}

/* HELPER PROPORZIONALI ASPECT-RATIO 16:9 E 9:16 */
.ratio-16-9 {
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
  object-fit: cover !important;
}

.ratio-9-16 {
  aspect-ratio: 9 / 16 !important;
  width: 100% !important;
  object-fit: cover !important;
}

/* GRIGLIE WIDESCREEN ADATTIVE 16:9 */
.grid-169-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.grid-169-3col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.grid-169-4col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .grid-169-2col { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .grid-169-3col { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .grid-169-4col { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (min-width: 1024px) {
  .grid-169-3col { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .grid-169-4col { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* Card Luxury Mobile 9:16 */
.m-card {
  background: rgba(16, 18, 26, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.m-card-gold-glow {
  border-color: rgba(212, 175, 55, 0.5) !important;
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.18), 0 0 15px rgba(212, 175, 55, 0.1) !important;
}

/* FORMATTAZIONE TESTO GIUSTIFICATO DENTRO CARDS E TABELLE */
.m-card p,
.m-card li,
.m-card .m-card-desc,
.m-card .m-schedule-desc,
.m-card article p,
.card p,
.card li,
.card-luxury p,
.card-luxury li,
article p,
table td,
table th,
.table td,
.table th,
.data-table td,
.data-table th,
.m-schedule-desc {
  text-align: justify !important;
  text-justify: inter-word !important;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

/* Poster locandina ottimizzato */
.m-poster-box {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: #000;
  position: relative;
  margin-bottom: 12px;
}

.m-poster-box img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Tab Switcher touch-friendly */
.m-tab-bar {
  display: flex;
  gap: 6px;
  background: rgba(22, 25, 36, 0.9);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.m-tab-btn {
  flex: 1;
  padding: 9px 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 750;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.m-tab-btn.active {
  background: linear-gradient(135deg, #d4af37, #996515);
  color: #070709;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

/* Pulsanti Touch Grandi (min 50px altezza) */
.m-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 1.02rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-align: center;
}

.m-btn:active {
  transform: scale(0.98);
}

.m-btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #ff7700 50%, #b829ff 100%);
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.m-btn-whatsapp {
  background: #25d366 !important;
  color: #05260f !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.m-btn-outline {
  background: rgba(22, 25, 36, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #ffffff !important;
}

.m-btn-outline:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: #d4af37;
}

/* Badge compatti */
.m-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.m-badge-gold {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #d4af37;
}

.m-badge-green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.m-badge-red {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Form input mobile (16px per evitare zoom iOS) */
.m-form-group {
  margin-bottom: 14px;
}

.m-form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 750;
  color: #ffffff;
  margin-bottom: 6px;
}

.m-form-group label small {
  color: #94a3b8;
  font-weight: 400;
  margin-left: 4px;
}

.m-input, .m-select, .m-textarea {
  width: 100% !important;
  min-height: 48px;
  font-size: 16px !important; /* PREVIENE LO ZOOM AUTOMATICO SU SMARTPHONE SAFARI */
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: #141620;
  color: #ffffff;
  padding: 12px 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.m-input:focus, .m-select:focus, .m-textarea:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.m-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Sticky Bottom Action Bar per Smartphone */
.m-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
}

.m-sticky-bar-inner {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Timeline orari a blocchi verticali */
.m-schedule-day {
  margin-bottom: 16px;
}

.m-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.m-schedule-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
  line-height: 1.4;
}

.m-schedule-item:last-child {
  border-bottom: none;
}

.m-schedule-time {
  min-width: 82px;
  font-weight: 800;
  color: #d4af37;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.m-schedule-desc {
  flex: 1;
  color: #e2e8f0;
}

.m-schedule-desc b {
  color: #ffffff;
}

/* Progress bar capienza posti */
.m-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}

.m-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #d4af37, #ff7700);
  border-radius: 999px;
  transition: width 0.4s ease;
}
