/* ============================================================
   Local S52 – CSS principal (mobile-first)
   ============================================================ */

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #1a1a2e;
  --accent:    #e63946;
  --accent2:   #f4a261;
  --bg:        #f8f9fa;
  --white:     #ffffff;
  --text:      #1f2937;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --success:   #16a34a;
  --warning:   #d97706;
  --danger:    #dc2626;
  --radius:    12px;
  --shadow:    0 2px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Navbar --- */
.navbar {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.navbar-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-logo span { color: var(--accent); }
.navbar-menu { display: flex; gap: 8px; }
.navbar-menu a {
  color: #cbd5e1;
  font-size: .9rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--transition);
}
.navbar-menu a:hover, .navbar-menu a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 60%, #0f3460 100%);
  color: #fff;
  padding: 56px 16px 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero p {
  font-size: clamp(.95rem, 3vw, 1.15rem);
  color: #cbd5e1;
  max-width: 520px;
  margin: 0 auto 28px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #c1121f; color:#fff; text-decoration:none; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.12); text-decoration:none; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color:#fff; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* --- How it works --- */
.how-section { padding: 48px 16px; background: var(--white); }
.how-section h2 { text-align: center; font-size: 1.5rem; margin-bottom: 32px; }
.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.step-num {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.step-body h3 { font-size: 1rem; margin-bottom: 4px; }
.step-body p  { font-size: .9rem; color: var(--muted); }

/* --- Calendar section --- */
.calendar-section { padding: 40px 16px; }
.calendar-section h2 { font-size: 1.4rem; margin-bottom: 20px; }
.calendar-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: .85rem;
}
.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.legend-dot.free     { background: #d1fae5; border: 1px solid #6ee7b7; }
.legend-dot.occupied { background: #fee2e2; border: 1px solid #fca5a5; }
.legend-dot.today    { background: var(--primary); }

#calendar-container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--primary);
  color: #fff;
}
.cal-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
}
.cal-header button:hover { background: rgba(255,255,255,.15); }
.cal-header h3 { font-size: 1rem; font-weight: 600; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.cal-day-name {
  background: #f1f5f9;
  text-align: center;
  padding: 8px 4px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cal-cell {
  min-height: 48px;
  padding: 6px 4px;
  text-align: center;
  font-size: .85rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.cal-cell.empty { background: #fafafa; }
.cal-cell.free {
  background: #f0fdf4;
  cursor: pointer;
  transition: var(--transition);
}
.cal-cell.free:hover { background: #bbf7d0; }
.cal-cell.free .cal-num { color: var(--success); font-weight: 600; }
.cal-cell.occupied { background: #fff1f2; cursor: not-allowed; }
.cal-cell.occupied .cal-num { color: var(--danger); }
.cal-cell.today { outline: 2px solid var(--primary); outline-offset: -2px; }
.cal-cell.past { opacity: .45; pointer-events: none; }
.cal-num { display: block; font-size: .9rem; }
.cal-cell.occupied::after {
  content: '●';
  color: var(--danger);
  font-size: .6rem;
  display: block;
}
.cal-cell.sunday {
  background: #fff7ed;
  cursor: pointer;
  transition: var(--transition);
}
.cal-cell.sunday:hover { background: #fed7aa; }
.cal-cell.sunday .cal-num { color: #c2410c; font-weight: 600; }
.cal-sunday-note {
  display: block;
  font-size: .62rem;
  color: #ea580c;
  line-height: 1;
  margin-top: 1px;
}
.legend-dot.sunday { background: #fff7ed; border: 1px solid #fdba74; }

/* --- Packs grid --- */
.packs-section { padding: 40px 16px; background: var(--white); }
.packs-section h2 { font-size: 1.4rem; margin-bottom: 8px; }
.packs-section .subtitle { color: var(--muted); margin-bottom: 24px; font-size: .95rem; }
.packs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.pack-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.pack-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pack-card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #e5e7eb;
}
.pack-card-thumb-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.pack-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pack-cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
}
.pack-name { font-size: 1.05rem; font-weight: 700; }
.pack-desc { font-size: .875rem; color: var(--muted); flex: 1; }
.pack-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}
.pack-includes { margin-top: 6px; }
.pack-includes li {
  font-size: .8rem;
  color: var(--muted);
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pack-includes li::before { content: '✓'; color: var(--success); font-weight: 700; }
.pack-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

/* --- Pack detail page --- */
.pack-detail-page { padding: 24px 16px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.pack-detail-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.pack-detail-hero img { width: 100%; max-height: 300px; object-fit: cover; }
.pack-detail-content { display: flex; flex-direction: column; gap: 20px; }
.pack-detail-content h1 { font-size: 1.5rem; }
.detail-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; border-left: 3px solid var(--accent); padding-left: 10px; }
.detail-section ul li { padding: 4px 0; display: flex; gap: 8px; font-size: .9rem; }
.detail-section ul li::before { content:'✓'; color:var(--success); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.gallery-grid img {
  border-radius: 8px;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  transition: var(--transition);
}
.gallery-grid img:hover { opacity: .85; }

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 75vh; border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.lightbox-nav {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}
.lightbox-nav button {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

/* --- Reservation form --- */
.form-page { padding: 24px 16px 64px; }
.form-page h1 { font-size: 1.4rem; margin-bottom: 4px; }
.form-page .subtitle { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }

.form-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.form-block-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.form-block-header .icon { font-size: 1.1rem; }
.form-block-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: .875rem; font-weight: 600; color: var(--text); }
.form-group label .req { color: var(--accent); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--white);
  color: var(--text);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,.12);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Pack selector cards */
.pack-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pack-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}
.pack-option.selected {
  border-color: var(--accent);
  background: #fff5f5;
}
.pack-option input[type=radio],
.pack-option input[type=checkbox] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.pack-option-body { flex: 1; }
.pack-option-body .name { font-weight: 700; font-size: .95rem; }
.pack-option-body .desc { font-size: .82rem; color: var(--muted); margin: 2px 0; }
.pack-option-body .items { font-size: .78rem; color: var(--muted); }
.pack-option-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 1rem;
  white-space: nowrap;
}
.pack-detail-btn {
  color: var(--accent);
  font-size: .78rem;
  margin-top: 4px;
  display: inline-block;
}

/* Live details */
#live-details-section {
  background: #fff8f0;
  border: 1.5px dashed var(--accent2);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
#live-details-section .form-block-header { background: #f97316; }

/* Summary box */
.summary-box {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.summary-box h3 { font-size: 1rem; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 8px; }
.summary-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .9rem; }
.summary-row.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid rgba(255,255,255,.2); padding-top: 8px; margin-top: 4px; }
.summary-row .label { color: #cbd5e1; }

/* Submit area */
.submit-area { text-align: center; padding: 0 16px 32px; }
.submit-area .btn { width: 100%; max-width: 480px; justify-content: center; padding: 16px; font-size: 1.05rem; }

/* --- Confirmation page --- */
.confirmation-page { padding: 40px 16px; text-align: center; }
.confirmation-icon { font-size: 4rem; margin-bottom: 16px; }
.confirmation-page h1 { font-size: 1.5rem; margin-bottom: 8px; }
.confirmation-page p { color: var(--muted); margin-bottom: 24px; }
.confirmation-ref {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin: 0 auto 24px;
  max-width: 400px;
}
.confirmation-ref .ref-label { font-size: .85rem; color: var(--muted); }
.confirmation-ref .ref-value { font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: .05em; }

/* --- Toast notification --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: .9rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* --- Footer --- */
.site-footer {
  background: var(--primary);
  color: #94a3b8;
  text-align: center;
  padding: 24px 16px;
  font-size: .85rem;
  margin-top: auto;
}

/* --- Loading spinner --- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
}
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-refused   { background: #fee2e2; color: #991b1b; }

/* ============================================================
   Responsive – tablet & desktop
   ============================================================ */
@media (min-width: 600px) {
  .packs-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-direction: row; }
}

@media (min-width: 768px) {
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .packs-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid img { height: 110px; }
}

@media (min-width: 960px) {
  .packs-grid { grid-template-columns: repeat(3, 1fr); }
}
