/* Mobile-First Responsive Enhancements */

:root {
  --mobile-break-sm: 480px;
  --mobile-break-md: 768px;
  --mobile-break-lg: 1024px;
}

/* ===== Base Typography Improvements ===== */
html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* ===== Mobile Navigation ===== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    gap: 4px;
    transition: max-height 0.3s ease;
    order: 3;
    background: rgba(3, 3, 3, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0;
    margin: 12px 0 0 0;
  }

  .nav-links.open {
    max-height: 400px;
  }

  .nav-links a {
    padding: 12px 16px;
    display: block;
    border-radius: 0;
  }
}

/* ===== Touch-Friendly Buttons ===== */
button,
.btn,
input[type="button"],
input[type="submit"],
a[role="button"] {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Ensure clickable elements have sufficient size */
a,
button,
input,
select,
textarea {
  -webkit-touch-callout: none;
}

/* ===== Small Screens (Mobile) - 480px ===== */
@media (max-width: 480px) {
  :root {
    --pad: 16px;
  }

  html,
  body {
    font-size: 15px;
  }

  body {
    overflow-x: hidden;
  }

  .headline {
    font-size: clamp(24px, 7vw, 40px) !important;
    letter-spacing: -0.5px;
    line-height: 1.1;
  }

  h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .subhead {
    font-size: clamp(14px, 4vw, 18px) !important;
  }

  .hero-inner {
    padding: 24px 16px 28px !important;
    gap: 20px !important;
  }

  .booking-panel {
    padding: 18px 14px !important;
  }

  .booking-grid {
    grid-template-columns: 1fr !important;
  }

  .trust-row {
    flex-direction: column;
    gap: 14px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
  }

  .examples-title {
    font-size: 18px;
    margin: 0 0 8px;
  }

  .examples-sub {
    font-size: 14px;
    margin: 0 0 24px;
  }

  .example-row {
    gap: 10px;
  }

  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .feature-item {
    padding: 14px 12px;
    min-height: auto;
  }

  .feature-item strong {
    font-size: 14px;
  }

  .feature-item p {
    font-size: 13px;
  }

  .cta-band-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 14px !important;
  }

  .cta-band-inner .btn {
    width: 100%;
  }

  .cta-copy {
    font-size: 15px;
  }

  .cta-sub {
    font-size: 13px;
  }

  /* Forms */
  .field {
    margin-bottom: 14px;
  }

  label {
    font-size: 13px;
  }

  select,
  input[type="date"],
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  /* Prevent zoom on focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px;
  }

  .row2 {
    grid-template-columns: 1fr !important;
  }

  /* Cards */
  .card {
    padding: 16px;
  }

  .booking-kicker {
    font-size: 11px;
  }

  .booking-title {
    font-size: clamp(26px, 6vw, 44px);
  }

  /* Slots grid on mobile */
  #slots {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .slot-button,
  .slot-skeleton {
    min-height: 40px;
    font-size: 12px;
  }

  /* Modal/Lightbox */
  .lightbox-close {
    top: -8px;
    right: -8px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  /* Remove unnecessary spacing */
  .booking-intro {
    font-size: 13px;
  }

  .value-list li {
    padding-bottom: 12px;
    gap: 12px;
  }

  .value-num {
    font-size: 16px;
  }

  .value-list strong {
    font-size: 14px;
  }

  .value-list span {
    font-size: 12px;
  }

  /* Gallery */
  .gallery-item {
    border-radius: 12px;
  }

  /* Team cards */
  .team-item {
    padding: 12px;
  }
}

/* ===== Medium Screens (Tablet) - 768px ===== */
@media (max-width: 768px) {
  :root {
    --pad: 18px;
  }

  .hero-inner {
    grid-template-columns: 1fr !important;
    padding: 32px 18px 36px !important;
    gap: 28px !important;
  }

  .booking-grid {
    grid-template-columns: 1fr !important;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }

  .examples-wrap {
    gap: 28px;
  }

  .example-row {
    grid-auto-columns: 80%;
  }

  select,
  input[type="date"],
  input[type="text"],
  input[type="email"],
  input[type="tel"] {
    font-size: 16px;
    padding: 12px;
    min-height: 44px;
  }

  .logo {
    max-width: 100%;
    height: auto;
  }

  .row2 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  @media (max-width: 600px) {
    .row2 {
      grid-template-columns: 1fr;
    }
  }

  /* Panel spacing */
  .panel {
    padding: 6px;
  }

  /* Section titles */
  .section-title {
    font-size: 11px;
    margin: 12px 0 8px;
  }
}

/* ===== Large Screens (Desktop) - 769px+ ===== */
@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }

  .nav-links {
    max-height: none !important;
  }
}

/* ===== Extra Large Screens (1200px+) ===== */
@media (min-width: 1200px) {
  :root {
    --container: 1280px;
  }
}

/* ===== Image Optimization ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.example-card img,
.gallery-item img,
.team-item img,
.hero::before {
  width: 100%;
  height: auto;
  object-fit: cover;
}

picture {
  display: block;
}

/* ===== Form Optimization ===== */
.form-group,
.field {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 16px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 36px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #bfa58a;
  box-shadow: 0 0 0 3px rgba(191, 165, 138, 0.1);
}

/* Remove default select arrow for better mobile appearance */
::-webkit-search-decoration,
::-webkit-search-cancel-button {
  display: none;
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-color-scheme: dark) {
  img {
    opacity: 0.95;
  }
}

/* ===== Landscape Mobile ===== */
@media (max-width: 920px) and (orientation: landscape) {
  .hero-inner {
    padding: 16px 18px;
    gap: 16px;
  }

  .booking-panel h3 {
    font-size: 22px;
  }

  .headline {
    font-size: 28px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    padding: 12px 18px;
    font-size: 13px;
  }
}

/* ===== Print Styles ===== */
@media print {
  .nav,
  .nav-toggle,
  .btn,
  button,
  .booking-panel,
  .hero-actions,
  .cta-band {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ===== Focus Visible for Keyboard Navigation ===== */
:focus-visible {
  outline: 2px solid #bfa58a;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #bfa58a;
  outline-offset: 2px;
}

/* Remove focus outline on mouse click (keep for keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ===== Container Queries (future-proofing) ===== */
@supports (container-type: inline-size) {
  .container {
    container-type: inline-size;
  }
}

