/* ==========================================================================
   iOS COMPATIBILITY RULES — DO NOT OVERRIDE WITHOUT BACKUP
   ==========================================================================
   - All `[data-theme="black"]` overrides MUST use plain hex colors (#444444).
   - Avoid color-mix(), rgba(var(--xxx-rgb), ...), or modern CSS inside
     black-theme blocks — older iOS/Safari will silently drop those rules.
   - Header MUST have padding-top: env(safe-area-inset-top) for standalone PWA.
   - Footer must NOT add env(safe-area-inset-bottom); .main-content already
     handles bottom spacing for the fixed mobile bar with plain 60px.
   - Elements using color-mix() for visual effects MUST provide plain fallback
     declarations before the modern rule (e.g. .theme-toggle-btn pattern).
   - `.header-controls` buttons (lang-toggle, theme-toggle-btn, lang-btn.active)
     use color-mix() with rgba fallbacks for theme-aware opacity on iOS 16.
   - Keep this file backed up before editing theme overrides.
   ========================================================================== */

/*@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');*/
/* ==========================================================================
   1. Plus Jakarta Sans (Main Body / UI)
   ========================================================================== */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/PlusJakartaSans-VariableFont_wght.ttf') format('truetype-variations'),
    url('../fonts/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
}

/* ==========================================================================
   2. Playfair Display (Accents / Titles)
   ========================================================================== */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype-variations'),
    url('../fonts/PlayfairDisplay-BoldItalic.ttf') format('truetype');
}

:root {
  --ap-primary: #0ea5e9;
  --ap-primary-rgb: 14, 165, 233;
  --ap-primary-hover: #0284c7;
  --ap-primary-hover-rgb: 2, 132, 199;
  --ap-bg-main: #f0f9ff;
  --ap-bg-card: #ffffff;
  --ap-bg-card-2: #e0f2fe;
  --ap-text-main: #0f172a;
  --ap-text-muted: #475569;
  --ap-border: #bae6fd;
  --ap-hero-bg: #0c4a6e;
  --ap-hero-bg-rgb: 12, 74, 110;
  --ap-hero-text: #f0f9ff;
  --ap-accent: #f59e0b;
  --ap-accent-light: #fbbf24;
  --ap-heading: #0f172a;
  --ap-text-on-dark: #f0f9ff;
  --ap-text-contrast: #0c4a6e;
  --scrollbar-thumb: #bae6fd;
}

/* Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--ap-bg-main);
  color: var(--ap-text-main);
  line-height: 1.5;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Main Scrollable Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Prevent iOS Safari auto-zoom on focused form controls */
input,
select,
textarea {
  font-size: 16px;
}

/* Account modal and profile modal form controls - override inline styles */
.account-form input,
.account-form select,
.account-form textarea,
#profile-form input,
#profile-form select,
#profile-form textarea,
#admin-user-form input,
#admin-user-form select,
#admin-user-form textarea,
#user-search-input {
  width: 100% !important;
  background: var(--ap-bg-card-2) !important;
  color: var(--ap-text-main) !important;
  border: 1px solid var(--ap-border) !important;
  padding: 11px 14px !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-family: inherit !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus,
#profile-form input:focus,
#profile-form select:focus,
#profile-form textarea:focus,
#admin-user-form input:focus,
#admin-user-form select:focus,
#admin-user-form textarea:focus,
#user-search-input:focus {
  border-color: var(--ap-primary) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-primary) 25%, transparent) !important;
  outline: none !important;
}

[data-theme="black"] #admin-user-form input,
[data-theme="black"] #admin-user-form select,
[data-theme="black"] #admin-user-form textarea,
[data-theme="black"] #user-search-input {
  background: #333333 !important;
  border-color: #555555 !important;
  color: #ffffff !important;
}

/* Typography Utilities */
.text-blue-600 {
  color: #2563eb;
}

.text-amber-500 {
  color: #f59e0b;
}

.text-amber-600 {
  color: #d97706;
}

.text-ap-main {
  color: var(--ap-text-main);
}

.bg-ap-main {
  background-color: var(--ap-bg-main);
}

.hidden {
  display: none !important;
}

/* Hardware Acceleration & Performance Harness */
/* Prevents scroll flicker and composite tearing on iOS WebKit */
.gpu-accelerated,
.header-bar,
.site-footer,
.glass-overlay {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* Glassmorphic Reusable Utility Class
   Isolates background-blend-mode inside ::before pseudo-element to eliminate
   iOS 16 WebKit rendering conflicts with backdrop-filter.
*/
.glass-overlay {
  position: relative;
  overflow: hidden;

  /* Backdrop filter separated from background-blend-mode for WebKit compatibility */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  /* Fallback border color */
  border-color: rgba(255, 255, 255, 0.2);
}

.glass-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;

  /* Fallbacks for iOS 16.0 - 16.1 */
  background-color: rgba(15, 23, 42, 0.4);
  background-image:
    linear-gradient(135deg, rgba(59, 130, 246, 0.75), rgba(15, 23, 42, 0.85));
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
}

/* Progressive Enhancement for iOS 16.2+ & Modern Browsers */
@supports (color: color-mix(in srgb, red, blue)) {
  .glass-overlay {
    border-color: color-mix(in srgb, var(--ap-primary-hover) 60%, #ffffff);
  }

  .glass-overlay::before {
    background-color: color-mix(in srgb, var(--ap-hero-bg) 40%, transparent);
    background-image:
      linear-gradient(135deg,
        color-mix(in srgb, var(--ap-primary-hover) 75%, transparent),
        color-mix(in srgb, var(--ap-hero-bg) 85%, transparent));
  }
}

/* Sticky Header */
.header-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  min-height: 80px;

  /* Backdrop filter works reliably when separated from background-blend-mode */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  /* Fallback border color */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* Progressive enhancement border for modern browsers */
@supports (color: color-mix(in srgb, red, blue)) {
  .header-bar {
    border-bottom-color: color-mix(in srgb, var(--ap-primary-hover) 60%, #ffffff);
  }
}

/* Isolated background overlay layer */
.header-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;

  /* 1. Fallback for iOS 16.0 - 16.1 */
  background-color: rgba(15, 23, 42, 0.4);
  background-image:
    linear-gradient(135deg, rgba(59, 130, 246, 0.75), rgba(15, 23, 42, 0.85)),
    url('images/header.jpg');

  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
}

/* 2. Modern color-mix override for iOS 16.2+ (top-level, not nested, so older
   WebKit that lacks CSS Nesting support still parses the fallback above) */
@supports (color: color-mix(in srgb, red, blue)) {
  .header-bar::before {
    background-color: color-mix(in srgb, var(--ap-hero-bg) 40%, transparent);
    background-image:
      linear-gradient(135deg,
        color-mix(in srgb, var(--ap-primary-hover) 75%, transparent),
        color-mix(in srgb, var(--ap-hero-bg) 85%, transparent)),
      url('images/header.jpg');
  }
}

.header-inner {
  width: 100%;
  max-width: 100%;
  min-height: 80px;
  margin: 0;
  /* Left/right padding reserves real space for the absolutely-positioned
     .brand-wrap (~190px) and .header-controls (~150px) so .desktop-nav's
     available width actually shrinks as the window narrows, instead of
     flexbox ignoring them and only ever sizing nav up to its 600px cap. */
  padding: 0.75rem 1.25rem;
 /*padding-left: calc(1.25rem + 190px);
  padding-right: calc(1.25rem + 150px);*/
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.brand-wrap {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 70px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.desktop-nav {
  flex: 1 1 550px;
  width: auto;
  max-width: 550px;
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  align-self: center;
  flex-wrap: wrap;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--ap-accent-light);
}

.header-controls {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-right: 10px;
}

.eye-toggle {
  position: absolute;
  right: 10px;
  top: 30px;
  background: none;
  border: none;
  color: var(--ap-text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
}

.eye-toggle:hover {
  color: var(--ap-text);
}

#pwMatchIcon {
  position: absolute;
  right: 40px !important;
  top: 30px;
  font-size: 16px;
  display: none;
}

#pwMatchIcon.match {
  color: #22c55e;
}

#pwMatchIcon.mismatch {
  color: #dc2626;
}

.controls-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
  flex-wrap: wrap;
}

/* Language Switcher */
.lang-toggle {
  display: flex;
  background: rgba(14, 165, 233, 0.35);
  background: color-mix(in srgb, var(--ap-primary) 35%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border: 1px solid color-mix(in srgb, var(--ap-primary) 30%, #ffffff);
}

.lang-btn {
  background: transparent;
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: rgba(2, 132, 199, 0.85);
  background: color-mix(in srgb, var(--ap-primary-hover) 85%, transparent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ap-primary) 40%, transparent);
}

.lang-btn:not(.active):hover {
  color: #ffffff;
}

/* Theme Toggle Button & Picker */
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border: 1px solid color-mix(in srgb, var(--ap-primary) 30%, #ffffff);
  background: rgba(14, 165, 233, 0.35);
  background: color-mix(in srgb, var(--ap-primary) 35%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--ap-primary) 40%, transparent);
}

.theme-picker {
  position: absolute;
  top: 44px;
  right: 0;
  background: var(--ap-bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 999999;
}

.chat-header-btn {
  padding: 0;
}

.chat-header-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-picker.hidden {
  display: none;
}

.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 30% 30%, var(--swatch-accent), var(--swatch-bg));
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.theme-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #ffffff, 0 4px 14px rgba(0, 0, 0, 0.5);
}

.theme-swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
  border-radius: 50%;
}


@media (max-width: 768px) {
  .header-bar {
    min-height: 60px;
  }

  .desktop-nav {
    display: none;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-controls {
    gap: 6px;
  }

  #header-chat-toggle {
    display: none;
  }

  .brand-logo {
    width: 120px;
    height: auto;
    max-width: 120px;
  }

  .btn-header {
    height: 34px;
    padding: 0 8px;
    font-size: 0.68rem;
    animation: registerPulse 2s ease-in-out infinite;
  }
}

@media (max-width: 360px) {
  .header-inner {
    padding: 0.5rem 0.5rem;
    gap: 0.35rem;
  }

  .brand-logo {
    width: 90px;
    height: auto;
    max-width: 90px;
  }

  .header-controls {
    gap: 2px;
  }

  .controls-wrap {
    gap: 3px;
  }

  .btn-header {
    height: 28px;
    padding: 0 6px;
    font-size: 0.62rem;
    animation: registerPulse 2s ease-in-out infinite;
  }

  .lang-btn {
    font-size: 0.65rem;
    padding: 3px 7px;
  }

  .theme-toggle-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ap-primary) 0%, var(--ap-primary-hover) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--ap-primary) 35%, transparent);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ap-primary) 50%, transparent);
}

.btn-header {
  font-size: 0.8rem;
  padding: 8px 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border: 1px solid color-mix(in srgb, var(--ap-primary) 30%, #ffffff);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.85) 0%, rgba(2, 132, 199, 0.9) 100%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ap-primary) 85%, transparent) 0%, color-mix(in srgb, var(--ap-primary-hover) 90%, transparent) 100%);
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  animation: registerPulse 2s ease-in-out infinite;
}

.btn-block {
  width: 100%;
  border-radius: 12px;
  padding: 12px;
}

.btn-featured {
  background: linear-gradient(135deg, var(--ap-accent) 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--ap-accent) 40%, transparent);
}

.btn-featured:hover {
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ap-accent) 60%, transparent);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--ap-border);
  color: var(--ap-text-main);
  box-shadow: none;
}

.btn-outline:hover {
  background: color-mix(in srgb, var(--ap-bg-card-2) 80%, transparent);
  transform: translateY(-1px);
}

[data-theme="black"] .btn {
  background: #444444;
  color: #ffffff;
}

/* Hero Section */

@keyframes registerPulse {

  0%,
  100% {
    transform: scale(1);
    color: var(--ap-accent-light);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--ap-primary) 35%, transparent);
  }

  50% {
    transform: scale(1.06);
    color: #ffffff;
    box-shadow: 0 0 20px color-mix(in srgb, var(--ap-primary) 60%, transparent), 0 4px 14px color-mix(in srgb, var(--ap-primary) 35%, transparent);
    text-shadow: 0 0 8px color-mix(in srgb, var(--ap-primary) 70%, transparent);
  }
}

.mobile-cta {
  animation: none;
}

.sparkle-stack {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  position: relative;
}

.sparkle-base {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  animation: sparkleFlash 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 2px rgba(255, 140, 0, 0.5));
}

.sparkle-base svg {
  width: 100%;
  height: 100%;
  fill: #ffaa00;
  display: block;
}

.sparkle-dot {
  grid-area: 1 / 1;
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffcc00;
  opacity: 0;
  pointer-events: none;
  animation: sparkleDot 3.5s ease-in-out infinite;
  will-change: opacity, filter;
}

.sparkle-dot:nth-child(2) {
  top: 2px;
  right: 2px;
  animation-delay: 0s;
}

.sparkle-dot:nth-child(3) {
  bottom: 2px;
  right: 2px;
  animation-delay: 0.9s;
}

.sparkle-dot:nth-child(4) {
  bottom: 2px;
  left: 2px;
  animation-delay: 1.8s;
}

.sparkle-dot:nth-child(5) {
  top: 2px;
  left: 2px;
  animation-delay: 2.6s;
}

@keyframes sparkleDot {

  0%,
  100% {
    opacity: 0;
    filter: drop-shadow(0 0 0px rgba(255, 140, 0, 0));
  }

  40%,
  60% {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(255, 69, 0, 0.9)) drop-shadow(0 0 6px rgba(255, 165, 0, 0.6));
  }
}

@keyframes sparkleFlash {

  0%,
  100% {
    opacity: 0.4;
    filter: drop-shadow(0 0 1px rgba(255, 140, 0, 0.3));
  }

  50% {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(255, 69, 0, 0.9)) drop-shadow(0 0 10px rgba(255, 165, 0, 0.6));
  }
}

[data-theme="black"] .btn-header {
  background: #444444;
  color: #ffffff;
  animation: registerPulse 2s ease-in-out infinite;
}

[data-theme="black"] .btn-block {
  background: #444444;
  color: #ffffff;
}

[data-theme="black"] .btn-outline {
  border-color: #555555;
  color: #ffffff;
}

[data-theme="black"] .btn-outline:hover {
  background: #333333;
}

[data-theme="black"] .lang-btn.active {
  background: #444444;
  color: #ffffff;
}

.hero {
  background: var(--ap-hero-bg);
  background-image:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--ap-accent) 15%, transparent) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--ap-primary) 20%, transparent) 0%, transparent 50%);
  color: var(--ap-hero-text);
  min-height: 35rem;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 99%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  /* Spacers 30px between every child row */
}

.hero-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  background: color-mix(in srgb, var(--ap-accent) 20%, transparent);
  color: var(--ap-accent-light);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border: 1px solid color-mix(in srgb, var(--ap-accent) 40%, transparent);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 2px rgb(0, 0, 0);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 3.5rem;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgb(0, 0, 0);
}

/* Line 1: Shift Left 50px */
.hero-title>span:first-child {
  display: inline-block;
  transform: translateX(-50px);
}

/* Line 2: Shift Right 50px */
.hero-title-accent {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--ap-accent-light);
  text-shadow: 0 2px 6px rgb(0, 0, 0);
}

.hero-subtitle {
  font-size: 1rem;
  color: #0c4a6e;
  opacity: 0.9;
  font-weight: 500;
  text-shadow: 0 3px 3px rgba(0, 174, 255, 0.222);
  transform: translateY(20px);
}

.amenities-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.amenity-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.28);
  background: color-mix(in srgb, var(--ap-accent) 28%, transparent);
  color: #000000;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border: 1px solid color-mix(in srgb, var(--ap-accent) 50%, transparent);
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.amenity-icon {
  font-size: 0.9rem;
}

/* Section Styling */
.section {
  padding: 3rem 1rem;
}

/* Scroll target offset for fixed header bar */
#home,
#about,
#program,
#itinerary,
#media,
#booking,
#contact,
#booking-form {
  scroll-margin-top: 80px;
}

.section-alt {
  background-color: var(--ap-bg-card-2);
}

.container {
  max-width: 64rem;
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ap-heading);
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  color: var(--ap-text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* Package Grid */
.package-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 40rem;
  }

  .hero-inner {
    gap: 2.5rem;
  }

  .hero-badge {
    margin-bottom: 4rem;
  }

  .hero-title {
    font-size: 2.5rem;
    margin-top: -7rem;
    margin-bottom: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    transform: translateY(1.875rem);
    margin-top: -5rem;
  }

  .amenities-bar {
    margin-top: 19rem;
  }

  .amenity-item {
    font-size: 0.85rem;
    padding: 8px 18px;
  }
}

@media (min-width: 1024px) {
  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 43rem;
  }

  .hero-inner {
    gap: 3rem;
  }

  .hero-badge {
    margin-bottom: 2.5rem;
  }

  .hero-title {
    font-size: 3rem;
    margin-top: -5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-top: -7rem;
  }

  .amenity-item {
    font-size: 0.9rem;
    padding: 10px 22px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 2rem;
    margin-top: -3rem;
    letter-spacing: -0.02em;
  }

  .hero-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
    transform: translateY(30px);
    margin-top: -5rem;

  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .amenities-bar {
    margin-top: 16rem;
  }

  .amenity-item {
    font-size: 0.6rem;
  }

  .hero-title>span:first-child,
  .hero-title-accent {
    transform: translateX(10);
  }


}

.package-card {
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.package-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.package-card.featured {
  border: 2px solid var(--ap-accent);
  position: relative;
  overflow: hidden;
}

.package-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--ap-accent);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 6px 14px;
  border-bottom-left-radius: 12px;
  letter-spacing: 0.05em;
}

.package-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.package-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 0.75rem;
}

.package-price {
  margin-bottom: 1.5rem;
}

.price-amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--ap-primary);
  line-height: 1;
}

.price-period {
  font-size: 0.85rem;
  color: var(--ap-text-muted);
  font-weight: 500;
}

.package-features {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.package-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--ap-text-muted);
}

.check-mark {
  font-weight: 800;
  color: var(--ap-primary);
}

/* Group Benefits Grid */
.group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

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

.group-card {
  background: var(--ap-bg-card);
  padding: 1.5rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--ap-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  text-align: center;
  transition: transform 0.25s ease;
}

.group-card:hover {
  transform: translateY(-2px);
}

.group-card.highlight {
  border-color: color-mix(in srgb, var(--ap-accent) 60%, transparent);
}

.group-card.highlight-strong {
  border: 2px solid var(--ap-accent);
  background: color-mix(in srgb, var(--ap-accent) 8%, var(--ap-bg-card));
}

.group-badge-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 4px;
}

.group-desc {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  font-weight: 500;
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 0.35rem;
}

.feature-desc {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  font-weight: 500;
}

/* Media Clips Section */
#media .section-title { margin-bottom: 0.25rem; }
#media .section-subtitle { margin-bottom: 1rem; }

.media-wrapper {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
}

.media-clips {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0.75rem;
  padding: 0.5rem 4rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.media-clips::-webkit-scrollbar { display: none; }

.clip-card {
  flex: 0 0 calc(50% - 0.375rem);
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  cursor: pointer;
  position: relative;
}

.clip-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.clip-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 3px;
}

.clip-info { padding: 0.5rem 0.6rem; }

.clip-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ap-heading);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.clip-channel {
  font-size: 0.72rem;
  color: var(--ap-text-muted);
  line-height: 1.3;
}

.clip-date {
  font-size: 0.7rem;
  color: var(--ap-text-muted);
  margin-top: 2px;
}

.clip-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 28px;
  background: rgba(255, 0, 0, 0.85);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  pointer-events: none;
}

.clip-card.hidden-clip { opacity: 0.45; }

/* Inline Player */
.clip-player-card {
  flex: 0 0 calc(50% - 0.75rem);
  scroll-snap-align: start;
  margin: 0 auto 1rem;
}

@media (min-width: 768px) {
  .clip-player-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

.clip-player-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--ap-border);
  background: #000;
}

.clip-player-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.clip-player-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clip-player-close:hover { background: rgba(0,0,0,0.9); }

.clip-player-card .clip-info { padding: 0.5rem 0.25rem; }

  /* Video Modal */
  .video-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.85);
  }

  .video-modal.hidden {
    display: none;
  }

  .video-modal-backdrop {
    position: absolute;
    inset: 0;
  }

  .video-modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 50.625vw;
    max-height: 90vh;
    background: #000;
    border: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  .video-modal-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .video-modal-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
  }

  .video-modal-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .video-modal-close:hover {
    background: rgba(0, 0, 0, 0.95);
  }

  /* Media Clip Editor */
.clip-editor {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  background: var(--ap-bg-card-2);
}

.clip-editor-title-input {
  margin-bottom: 8px;
}

.clip-editor-title-input input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--ap-border);
  background: var(--ap-bg-card);
  color: var(--ap-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.clip-editor-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clip-editor-input input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--ap-border);
  background: var(--ap-bg-card);
  color: var(--ap-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.clip-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.clip-editor button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--ap-primary);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.clip-editor-add-btn {
  flex-shrink: 0;
}

.clip-editor-cancel-btn {
  background: transparent !important;
  color: var(--ap-text-muted) !important;
  border: 1px solid var(--ap-border) !important;
}

/* Editor Clip List */
.clip-list { margin-top: 1rem; }

.clip-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ap-border);
  flex-wrap: wrap;
}

.clip-list-item:last-child { border-bottom: none; }

.clip-list-title {
  flex: 1 1 40%;
  min-width: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ap-text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.clip-list-date {
  flex: 0 0 100%;
  font-size: 0.72rem;
  color: var(--ap-text-muted);
  margin-top: 2px;
  margin-bottom: 4px;
}

.clip-list-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  background: var(--ap-bg-card-2);
  color: var(--ap-text);
  border: 1px solid var(--ap-border);
  cursor: pointer;
}

.clip-list-btn.hide-btn { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.clip-list-btn.delete-btn { background: rgba(220, 38, 38, 0.15); color: #dc2626; }
.clip-list-btn.edit-btn { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }

.clip-no-media {
  text-align: center;
  padding: 2rem;
  color: var(--ap-text-muted);
  font-size: 0.9rem;
}



@media (min-width: 1024px) {
  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 43rem;
  }

  .hero-inner {
    gap: 3rem;
  }

  .hero-badge {
    margin-bottom: 2.5rem;
  }

  .hero-title {
    font-size: 3rem;
    margin-top: -5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-top: -7rem;
  }

  .amenity-item {
    font-size: 0.9rem;
    padding: 10px 22px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 2rem;
    margin-top: -3rem;
    letter-spacing: -0.02em;
  }

  .hero-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
    transform: translateY(30px);
    margin-top: -5rem;

  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .amenities-bar {
    margin-top: 16rem;
  }

  .amenity-item {
    font-size: 0.6rem;
  }

  .hero-title>span:first-child,
  .hero-title-accent {
    transform: translateX(10);
  }


}

.package-card {
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.package-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.package-card.featured {
  border: 2px solid var(--ap-accent);
  position: relative;
  overflow: hidden;
}

.package-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--ap-accent);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 6px 14px;
  border-bottom-left-radius: 12px;
  letter-spacing: 0.05em;
}

.package-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.package-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 0.75rem;
}

.package-price {
  margin-bottom: 1.5rem;
}

.price-amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--ap-primary);
  line-height: 1;
}

.price-period {
  font-size: 0.85rem;
  color: var(--ap-text-muted);
  font-weight: 500;
}

.package-features {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.package-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--ap-text-muted);
}

.check-mark {
  font-weight: 800;
  color: var(--ap-primary);
}

/* Group Benefits Grid */
.group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

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

.group-card {
  background: var(--ap-bg-card);
  padding: 1.5rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--ap-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  text-align: center;
  transition: transform 0.25s ease;
}

.group-card:hover {
  transform: translateY(-2px);
}

.group-card.highlight {
  border-color: color-mix(in srgb, var(--ap-accent) 60%, transparent);
}

.group-card.highlight-strong {
  border: 2px solid var(--ap-accent);
  background: color-mix(in srgb, var(--ap-accent) 8%, var(--ap-bg-card));
}

.group-badge-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 4px;
}

.group-desc {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  font-weight: 500;
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 0.35rem;
}

.feature-desc {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  font-weight: 500;
}

/* Media Clips Section */
.media-wrapper {
  position: relative;
}

.media-clips {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.media-clips::-webkit-scrollbar {
  display: none;
}

.media-wrapper .media-clips {
  padding: 1rem 4rem;
}

.clip-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(14, 165, 233, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
  transition: background 0.2s, box-shadow 0.2s;
}

@supports (color: color-mix(in srgb, red, blue)) {
  .clip-nav {
    background: color-mix(in srgb, var(--ap-primary) 25%, transparent);
    box-shadow: 0 0 16px color-mix(in srgb, var(--ap-primary) 50%, transparent);
  }
}

.clip-nav:hover {
  background: rgba(14, 165, 233, 0.45);
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.6);
}

@supports (color: color-mix(in srgb, red, blue)) {
  .clip-nav:hover {
    background: color-mix(in srgb, var(--ap-primary) 55%, transparent);
    box-shadow: 0 0 24px color-mix(in srgb, var(--ap-primary) 75%, transparent);
  }
}

.clip-nav-left,
.clip-nav-right {
  background: #0ea5e9;
  background: var(--ap-primary);
}

.clip-nav-left {
  left: 8px;
  color: #ffffff;
  box-shadow: 0 0 12px var(--ap-primary);
}

.clip-nav-right {
  right: 8px;
  color: #ffffff;
  box-shadow: 0 0 12px var(--ap-primary);
}

.clip-nav[disabled] {
  opacity: 0.2;
  pointer-events: none;
}

.clip-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 30px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  pointer-events: none;
}

.clip-card {
  position: relative;
}

.clip-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.85);
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  z-index: 2;
}

.clip-delete:hover {
  background: rgba(220, 38, 38, 1);
}

@media (max-width: 480px) {
  .media-wrapper .media-clips {
    padding: 1rem 3rem;
  }

  .clip-nav {
    width: 36px;
    height: 36px;
  }
}

.clip-card {
  position: relative;
  flex: 0 0 calc(50% - 0.75rem);
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
}

.clip-info {
  padding: 0.75rem;
}

.clip-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ap-heading);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip-date {
  font-size: 0.75rem;
  color: var(--ap-text-muted);
}

/* Media Clip Editor */
.clip-editor {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  background: var(--ap-bg-card-2);
}

@media (min-width: 768px) {
  .clip-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

/* Form Container */
.form-container {
  max-width: 34rem;
  margin: 0 auto;
}

.form-card {
  background: var(--ap-bg-card);
  padding: 2.25rem;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--ap-border);
}

.form-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 4px;
}

.form-subtitle {
  font-size: 0.85rem;
  color: var(--ap-text-muted);
}

.booking-container {
  max-width: 76rem;
}

.booking-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .booking-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.itinerary-card {
  width: 100%;
  margin: 0;
  padding: 2.25rem;
  border: 1px solid var(--ap-border);
  border-radius: 20px;
  background: var(--ap-bg-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  color: var(--ap-text-main);
  font-family: inherit;
}

.itinerary-title {
  margin-bottom: 1.5rem;
  color: var(--ap-heading);
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}

.brochure-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ap-text-main);
}

.brochure-links .btn {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .brochure-links {
    flex-direction: column;
    gap: 8px;
  }
  .brochure-links .btn {
    width: 100%;
    max-width: 280px;
  }
}

.itinerary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  gap: 1.25rem;
  align-items: start;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--ap-border);
}

.itinerary-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.itinerary-content {
  position: relative;
  min-width: 0;
}

.itinerary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
}

.day-badge {
    flex: 0 0 auto;
    width: fit-content;
    box-sizing: border-box;
    background-color: var(--ap-primary);
    color: #ffffff;
    text-align: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.day-badge .day-number {
  font-weight: 900;
}

.itinerary-header strong {
  flex: 1;
  color: var(--ap-primary);
  font-size: 1.05rem;
}

.itinerary-details {
  width: 100%;
  border: 0;
}

.itinerary-details ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ap-text-main);
  line-height: 1.55;
}

.itinerary-image {
    width: 100%;
    min-height: 7.5rem;
    aspect-ratio: 1;
    border: 1px dashed var(--ap-border);
    border-radius: 14px;
    background: var(--ap-bg-card-2);
    color: var(--ap-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
  }

@media (max-width: 640px) {
  .itinerary-card {
    padding: 1.25rem;
  }

  .itinerary-title {
    margin-bottom: 1rem;
    font-size: 1.2rem;
  }

  .itinerary-row {
    grid-template-columns: minmax(0, 1fr) 5.5rem;
    gap: 0.85rem;
    padding: 0.85rem 0;
  }

  .itinerary-image {
    min-height: 5.5rem;    
    font-size: 0.65rem;
  }

  .itinerary-header strong {
    font-size: 0.95rem;
  }

  .itinerary-details ul {
    font-size: 0.86rem;
    line-height: 1.45;
  }
}

@media (max-width: 400px) {
  .itinerary-card {
    padding: 1rem;
  }

  .itinerary-row {
    grid-template-columns: minmax(0, 1fr) 4.75rem;
    gap: 0.65rem;
  }

  .itinerary-image {
    min-height: 4.75rem;
  }

  .itinerary-details ul {
    font-size: 0.8rem;
  }
}

[data-theme="black"] .itinerary-card {
  background: #141414;
  border-color: #333333;
  box-shadow: none;
}

[data-theme="black"] .itinerary-title {
  color: #ffffff;
}

[data-theme="black"] .day-badge {
  background: #444444;
  color: #ffffff;
}

[data-theme="black"] .clip-nav {
  background: #444444;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
}

[data-theme="black"] .clip-nav-left,
[data-theme="black"] .clip-nav-right {
  background: #444444;
  color: #ffffff;
}

[data-theme="black"] .clip-nav:hover {
  background: #555555;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.25);
}

[data-theme="black"] .itinerary-header strong {
  color: #ffffff;
}

[data-theme="black"] .itinerary-details ul {
  color: #dddddd;
}

[data-theme="black"] .itinerary-image {
  background: #1f1f1f;
  border-color: #555555;
  color: #ffffff;
}

.booking-form .form-row {
  margin-bottom: 1.15rem;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .form-row-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.booking-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ap-heading);
  margin-bottom: 6px;
}

.booking-form input,
.booking-form select {
  width: 100%;
  background: var(--ap-bg-card-2);
  color: var(--ap-text-main);
  border: 1px solid var(--ap-border);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-primary) 25%, transparent);
}

.booking-form textarea {
  width: 100%;
  background: var(--ap-bg-card-2);
  color: var(--ap-text-main);
  border: 1px solid var(--ap-border);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.booking-form input[type="date"] {
  width: 100%;
  background: var(--ap-bg-card-2);
  color: var(--ap-text-main);
  border: 1px solid var(--ap-border);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

.booking-form input[type="date"]:focus {
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-primary) 25%, transparent);
}

/* Account modal and profile modal form controls - match booking-form behavior */
.account-form input,
.account-form select,
.account-form textarea,
#profile-form input,
#profile-form select,
#profile-form textarea {
  width: 100%;
  background: var(--ap-bg-card-2);
  color: var(--ap-text-main);
  border: 1px solid var(--ap-border);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus,
#profile-form input:focus,
#profile-form select:focus,
#profile-form textarea:focus {
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-primary) 25%, transparent);
}

.btn-submit {
  margin-top: 0.5rem;
}

.form-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ap-text-muted);
  margin-top: 0.75rem;
}

.booking-form .phone-input-group {
  display: flex;
  gap: 8px;
}

.booking-form .phone-input-group #form-phone-code {
  flex: 0 0 20%;
  max-width: 80px;
}

.booking-form .phone-input-group #form-phone-number {
  flex: 1;
}

.account-modal-body .phone-input-group {
  display: flex;
  gap: 8px;
}

.account-modal-body .phone-input-group #register-phone-code {
  flex: 0 0 20%;
  max-width: 80px;
}


/* Mobile Navigation Bar */


/* Unified Item Style (Vertical Layout) */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
}

/* Icon Uniformity */
.mobile-nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: inherit;
}

/* Label Typography */
.mobile-nav-label {
  font-size: 11px;
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
}

/* Optional CTA Highlight (e.g. Register Button) */
.mobile-cta {
  color: var(--ap-accent-light);
}

.mobile-nav-item:hover .mobile-nav-label,
.mobile-nav-item:focus .mobile-nav-label {
  color: var(--ap-accent);
}

@media (max-width: 768px) {
  .mobile-bar {
    display: flex;
  }

  #chat-toggle {
    display: none;
  }

  /* Add safe area spacing for form on mobile devices */
  .form-container {
    padding-bottom: 4rem;
  }

}

.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: manipulation;
}

.mobile-menu-btn:hover {
  color: var(--ap-accent-light);
}

.mobile-icon {
  font-size: 1.2rem;
}

.mobile-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--ap-bg-card);
  border-top: 1px solid var(--ap-border);
  border-bottom: 1px solid var(--ap-border);
  padding: 0.5rem 0;
  margin-bottom: 4px;
  z-index: 1001;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-link {
  display: block;
  padding: 10px 1.25rem;
  color: var(--ap-text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--ap-border) 40%, transparent);
}

.mobile-menu-link:last-child {
  border-bottom: none;
}

.mobile-menu-link:hover {
  background: color-mix(in srgb, var(--ap-bg-card-2) 60%, transparent);
  color: var(--ap-accent);
}

.mobile-chat-btn,
.mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--ap-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.mobile-chat-btn:hover,
.mobile-cta:hover {
  color: var(--ap-accent);
}


/* Custom Scrollbar - ultra sleek modern track */
::-webkit-scrollbar {
  width: 3px;
  height: 3px;
  color: var(--ap-bg-main);
 
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* Footer */
/* Footer (Desktop) - Matching Header Blend & Blur */
.site-footer {
  position: relative;
  overflow: hidden;

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

@supports (color: color-mix(in srgb, red, blue)) {
  .site-footer {
    border-top-color: color-mix(in srgb, var(--ap-primary-hover) 60%, #ffffff);
  }
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;

  /* 1. Fallback for iOS 16.0 - 16.1 */
  background-color: rgba(15, 23, 42, 0.4);
  background-image:
    linear-gradient(135deg, rgba(59, 130, 246, 0.75), rgba(15, 23, 42, 0.85)),
    url('images/footer.jpg');

  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
}

/* 2. Modern color-mix override for iOS 16.2+ (top-level, not nested) */
@supports (color: color-mix(in srgb, red, blue)) {
  .site-footer::before {
    background-color: color-mix(in srgb, var(--ap-hero-bg) 40%, transparent);
    background-image:
      linear-gradient(135deg,
        color-mix(in srgb, var(--ap-primary-hover) 75%, transparent),
        color-mix(in srgb, var(--ap-hero-bg) 85%, transparent)),
      url('images/footer.jpg');
  }
}

/* Mobile Bottom Navigation Bar - Matching Header Blend & Blur */
.mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 0;
  transition: all 0.3s ease;
}

/* Move image, linear-gradient, and blend-mode to a pseudo-element layer */
.mobile-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;

  background-color: rgba(15, 23, 42, 0.4);
  background-image:
    linear-gradient(135deg, rgba(59, 130, 246, 0.75), rgba(15, 23, 42, 0.85)),
    url('images/footer.jpg');
  background-blend-mode: overlay;
  background-size: cover;
  background-position: center;
}

@supports (color: color-mix(in srgb, red, blue)) {
  .mobile-bar {
    border-top-color: color-mix(in srgb, var(--ap-primary-hover) 60%, #ffffff);
  }

  .mobile-bar::before {
    background-color: color-mix(in srgb, var(--ap-hero-bg) 40%, transparent);
    background-image:
      linear-gradient(135deg,
        color-mix(in srgb, var(--ap-primary-hover) 75%, transparent),
        color-mix(in srgb, var(--ap-hero-bg) 85%, transparent)),
      url('images/footer.jpg');
  }
}

[data-theme="black"] .lang-btn {
  color: #ffffff;
}

[data-theme="black"] .lang-btn.active {
  color: #ffffff;
}

[data-theme="black"] .controls-wrap {
  border-radius: 999px;
  padding: 4px;
}

[data-theme="black"] .lang-toggle {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="black"] .theme-toggle-btn {
  background: #333333;
  border-color: #555555;
}

[data-theme="black"] .btn-block {
  background: #444444;
  color: #ffffff;
}

[data-theme="black"] .lang-btn.active {
  background: #444444;
  color: #ffffff;
}

[data-theme="black"] .footer-contact {
  background: #333333;
}


.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.footer-contact {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.35);
  background: color-mix(in srgb, var(--ap-bg-main) 35%, transparent);
  border: 1px solid var(--ap-border);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(4px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  align-items: flex-start;
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .footer-contact {
    background: rgba(0, 0, 0, 0.35);
  }
}

[data-theme="black"] .footer-contact {
  background: #2a2a2a;
  border-color: #444444;
}

.footer-contact-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 180px;
}

.footer-contact-group h4 {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-contact-group p {
  margin: 0;
  line-height: 1.5;
}

.footer-contact-group p strong {
  color: var(--ap-accent-light);
}

.footer-contact-group .footer-phone-us {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-contact-group .footer-phone-vn {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="black"] .footer-contact-group p strong {
  color: #fbbf24;
}

.footer-contact a {
  color: var(--ap-accent-light);
  text-decoration: none;
  font-weight: 600;
  outline: none;
  transition: none;
}

.footer-contact-group.footer-chat {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-website {
  margin: 0;
  font-size: 0.85rem;
}

.footer-website a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copy {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.chat-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  position: relative;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: manipulation;
}

.site-footer a,
.site-footer button {
  outline: none;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.site-footer a:active,
.site-footer button:active,
.site-footer a:focus,
.site-footer button:focus {
  outline: none;
  color: inherit;
  background: transparent;
}

.chat-toggle-btn:hover .chat-icon-img {
  color: rgba(255, 255, 255, 0.8);
}


.mobile-chat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: manipulation;
}

.mobile-chat-btn:hover {
  color: var(--ap-accent);
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  margin-left: 2px;
}

.chat-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 30%, transparent);
}

.mobile-chat-status-dot {
  margin: 0 4px 0 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.chat-modal.hidden {
  display: none;
}

.chat-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.chat-modal-card {
  position: relative;
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border);
  border-radius: 16px;
  padding: 1.75rem;
  max-width: 26rem;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.2s ease;
}

#profile-modal .chat-modal-card {
  max-height: 85vh;
  overflow-y: auto;
}

.chat-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ap-heading);
  margin-bottom: 0.5rem;
}

.chat-modal-text {
  font-size: 0.9rem;
  color: var(--ap-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.chat-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.chat-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ap-border);
  background: var(--ap-bg-card-2);
  color: var(--ap-text-main);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chat-modal-close:hover {
  transform: scale(1.1);
  background: color-mix(in srgb, var(--ap-bg-card-2) 80%, transparent);
}

/* Chat modal input and textarea theme colors */
#chat-modal-input,
.chat-modal-input,
#chat-modal-input:focus,
.chat-modal-input:focus,
.chat-modal-composer textarea,
.chat-modal-composer textarea:focus {
  background: var(--ap-bg-card-2) !important;
  color: var(--ap-text-main) !important;
  border: 1px solid var(--ap-border) !important;
  padding: 11px 14px !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  font-family: inherit !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#chat-modal-input:focus,
.chat-modal-input:focus,
.chat-modal-composer textarea:focus {
  border-color: var(--ap-primary) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-primary) 25%, transparent) !important;
  outline: none !important;
}

/* Fallback for iOS 16.0-16.1 - plain rgba before color-mix */
#chat-modal-input:focus,
.chat-modal-input:focus,
.chat-modal-composer textarea:focus {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important;
}
#chat-modal-input:focus,
.chat-modal-input:focus,
.chat-modal-composer textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-primary) 25%, transparent) !important;
}

/* Chat message bubbles - matching restaurant style */
.chat-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 8px 0;
}
.chat-row.self {
  align-items: flex-end;
}
.chat-row.other {
  align-items: flex-start;
}
.chat-bubble {
  padding: 12px 18px;
  border-radius: 16px;
  max-width: 82%;
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.chat-row.self .chat-bubble {
  background: var(--ap-bg-card) !important;
  color: var(--ap-text-main) !important;
  border: 1px solid var(--ap-border) !important;
  border-bottom-right-radius: 4px;
}
.chat-row.other .chat-bubble {
  background: linear-gradient(135deg, var(--ap-primary) 0%, var(--ap-primary-hover) 100%) !important;
  color: var(--ap-bg-main) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-bottom-left-radius: 4px;
}
.chat-meta {
  font-size: 0.72rem;
  color: var(--ap-text-muted);
  margin-top: 5px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Black theme overrides for chat bubbles */
[data-theme="black"] .chat-row.self .chat-bubble {
  background: #444444 !important;
  color: #ffffff !important;
  border: 1px solid #555555 !important;
}
[data-theme="black"] .chat-row.other .chat-bubble {
  background: #444444 !important;
  color: #ffffff !important;
  border: 1px solid #555555 !important;
}

@media (max-width: 640px) {
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .chat-modal-card {
    padding: 1.25rem;
  }

  .chat-modal-actions {
    flex-direction: column;
  }

  .chat-modal-actions .btn {
    width: 100%;
  }
}

/* Account and Profile Modal Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--ap-bg-card-2);
    border-radius: 8px;
    padding: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .profile-tabs::-webkit-scrollbar { display: none; }

  .profile-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    background: transparent;
    border: none;
    color: var(--ap-text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

.profile-tab-btn.active {
  background: var(--ap-primary);
  color: #ffffff;
}

.profile-tab-btn:hover:not(.active) {
  color: var(--ap-primary);
}

.account-form .form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: var(--ap-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--ap-border);
  background: var(--ap-bg-card-2);
  color: var(--ap-text);
  font-size: 16px;
}

.form-group.full input {
  width: 100%;
}

[data-theme="black"] .profile-tabs {
  background: #333333;
}

[data-theme="black"] .profile-tab-btn {
  color: #ffffff;
}

[data-theme="black"] .profile-tab-btn.active {
  background: #444444;
  color: #ffffff;
}

[data-theme="black"] .form-group input {
  background: #333333;
  border-color: #555555;
  color: #ffffff;
}

[data-theme="black"] .clip-editor {
  background: #1a1a1a;
  border-color: #444444;
}

[data-theme="black"] .clip-editor-title-input input,
[data-theme="black"] .clip-editor input {
  background: #333333;
  border-color: #555555;
  color: #ffffff;
}

[data-theme="black"] .clip-editor button {
  background: #0ea5e9;
  color: #ffffff;
}

[data-theme="black"] .clip-list-title {
  color: #ffffff;
}

[data-theme="black"] .clip-list-btn {
  color: #ffffff;
  border: 1px solid #555555;
}

[data-theme="black"] .clip-list-btn.edit-btn { color: #0ea5e9; }
[data-theme="black"] .clip-list-btn.delete-btn { color: #dc2626; }
[data-theme="black"] .clip-list-btn.hide-btn { color: #ffc107; }

[data-theme="black"] .clip-no-media {
  color: #aaaaaa;
}

[data-theme="black"] .clip-player-wrap {
  border-color: #444444;
}

[data-theme="black"] .clip-player-close {
  background: rgba(255, 255, 255, 0.2);
}

.hero {
  background-image: url('images/background.png');
  background-size: cover;
  background-position: center;
}

/* Tablet: use PNG for better quality on smaller screens */
@media (min-width: 481px) and (max-width: 1024px) {
  .hero {
    background-image: url('images/background.png');
  }
}

@media (max-width: 480px) {
  .hero {
    background-image: url('images/background.png');
  }

  .hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 2rem;
    margin-top: -3rem;
    letter-spacing: -0.02em;
  }

  .hero-subtitle {
    font-size: .7rem;
    color: #0c4a6e;
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 174, 255, 0.222);
    transform: translateY(20px);
    margin-top: -4rem;
  }

  .amenities-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 14rem;

  }

  .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ap-heading);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
  }
}

/* Ensure mobile nav items use unified high-contrast colors */
.mobile-nav-item,
.mobile-menu-btn,
.mobile-chat-btn,
.mobile-cta {
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  background: transparent;
  border: none;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: manipulation;
}

.mobile-nav-label {
  font-size: 11px;
  color: inherit;
  font-weight: 900;
  line-height: 1;
}


.mobile-nav-item:hover,
.mobile-chat-btn:hover,
.mobile-menu-btn:hover,
.mobile-cta:hover {
  color: var(--ap-accent-light);
}

.mobile-nav-item:active,
.mobile-chat-btn:active,
.mobile-menu-btn:active,
.mobile-cta:active,
.mobile-nav-item:focus,
.mobile-chat-btn:focus,
.mobile-menu-btn:focus,
.mobile-cta:focus,
.mobile-nav-item:focus-visible,
.mobile-chat-btn:focus-visible,
.mobile-menu-btn:focus-visible,
.mobile-cta:focus-visible {
  background: transparent !important;
  color: var(--ap-accent-light);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Override conflicting dark color definition for chat button */
.mobile-chat-btn {
  color: rgba(255, 255, 255, 0.95);
  background: transparent;
}

@media (max-width: 768px) {
 
  .mobile-bar {
    display: flex;
  }

  #chat-toggle {
    display: none;
  }

  /* Disable fixed attachment on mobile to fix rendering and clipping bugs */
  .header-bar,
  .site-footer,
  .mobile-bar {
    background-attachment: scroll;
  }

  /* Add safe area spacing for form on mobile devices */
  .form-container {
    padding-bottom: 4rem;
  }

  /* Prevent main content from being hidden behind fixed mobile bottom bar */
  .main-content {
    padding-bottom: 60px;
  }
}
@media (max-width: 1080px) {
  .desktop-nav {
    flex: 1 1 300px;
    max-width: 300px;
  }
}

