/* ==========================================================================
   Al Khayam Travels – Glassmorphism Landing Page Styles
   Responsive Viewport Layout with Anti-Dark Mode & Keyboard Scroll Support
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Color Palette */
  --text-dark: #122a36;
  --text-body: #1e3d4c;
  --text-muted: #486978;
  --brand-cyan: #38bdf8;

  /* Glass Colors */
  --glass-bg: rgba(255, 255, 255, 0.32);
  --glass-card-bg: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-inner-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.05);
  --glass-drop-shadow: 0 20px 40px rgba(0, 20, 40, 0.2), 0 2px 10px rgba(0, 0, 0, 0.1);

  /* CTA Button Colors */
  --btn-grad-start: #ee7d00;
  --btn-grad-end: #c44700;
  --btn-shadow: 0 8px 20px rgba(212, 85, 0, 0.45);

  /* Transitions */
  --tr-fast: 0.2s ease;
  --tr-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Force Light Color Scheme Globally (Fixes Android Brave/Chrome Forced Night Mode) --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  font-family: var(--font-main);
  color: var(--text-dark) !important;
  color-scheme: light !important;
  -webkit-font-smoothing: antialiased;
}

/* Hard Override for Mobile Browsers with Force-Dark / Night Mode Enabled */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #122a36 !important;
    --text-body: #1e3d4c !important;
    --text-muted: #486978 !important;
  }
  html, body {
    color: #122a36 !important;
    color-scheme: light !important;
  }
  .main-container, .hero-card, .form-card, .header-bar, .glass-shelf {
    background: rgba(255, 255, 255, 0.45) !important;
    color: #122a36 !important;
  }
  .hero-title, .form-title, .brand-bold, .form-group label {
    color: #122a36 !important;
  }
  .hero-description {
    color: #1e3d4c !important;
  }
  .form-group input {
    background: rgba(255, 255, 255, 0.85) !important;
    color: #122a36 !important;
  }
}

/* --- Page Background Wrapper --- */
.page-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  background-image: url('assets/background.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Dead center on desktop */
  overflow: hidden;
  padding: 16px;
  box-sizing: border-box;
}

/* Ambient Sky Light Rays overlay */
.light-ray {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.ray-1 {
  top: -100px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(56, 189, 248, 0.2) 70%, transparent 100%);
}

.ray-2 {
  top: 10%;
  right: 15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(254, 215, 170, 0.6) 0%, rgba(251, 146, 60, 0.15) 70%, transparent 100%);
}

/* --- Main Glass Outer Container --- */
.main-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  box-shadow: var(--glass-drop-shadow), var(--glass-inner-shadow);
  padding: 24px;
  z-index: 5;
  margin: auto; /* Always centered vertically on desktop */
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  isolation: isolate;
  transform: translateZ(0);
  overflow-x: hidden;
}

/* --- Header Navigation Bar --- */
.header-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 10px 20px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon svg,
.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.brand-text {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-bold {
  font-weight: 800;
  color: #113442;
}

.brand-light {
  font-weight: 400;
  color: #5c8496;
  margin-left: 4px;
}

/* --- Content Grid Layout --- */
.content-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

/* --- Hero Glass Card --- */
.hero-card {
  position: relative;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
  isolation: isolate;
}

/* Rainbow Glare in bottom-left corner */
.prism-glare {
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 260px;
  height: 180px;
  background: radial-gradient(circle at 30% 70%,
    rgba(255, 180, 180, 0.45) 0%,
    rgba(255, 240, 150, 0.4) 25%,
    rgba(160, 240, 255, 0.4) 50%,
    rgba(200, 180, 255, 0.2) 75%,
    transparent 100%);
  filter: blur(20px);
  pointer-events: none;
  transform: rotate(-15deg);
}

.hero-title {
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}

.hero-description {
  font-size: clamp(0.85rem, 1.2vw, 1.02rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-body);
  position: relative;
  z-index: 2;
}

/* --- Form Glass Card --- */
.form-card {
  position: relative;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
  isolation: isolate;
  overflow: hidden;
}

.form-title {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all var(--tr-fast);
  scroll-margin-bottom: 40px;
}

.form-group input::placeholder {
  color: #648292;
  font-weight: 400;
}

.form-group input:focus {
  background: rgba(255, 255, 255, 0.92);
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* --- CTA Submit Button --- */
.btn-submit {
  margin-top: 6px;
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--btn-grad-start) 0%, var(--btn-grad-end) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    var(--btn-shadow);
  transition: all var(--tr-normal);
  position: relative;
  overflow: hidden;
}

.btn-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 10px 10px 50% 50%;
  pointer-events: none;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 12px 26px rgba(212, 85, 0, 0.55);
  filter: brightness(1.05);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 4px 10px rgba(212, 85, 0, 0.4);
}

/* ==========================================================================
   Realistic CSS Water Droplets Engine
   ========================================================================== */
.water-drop {
  position: absolute;
  border-radius: 51% 49% 48% 52% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 35% 30%,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.2) 30%,
    rgba(0, 0, 0, 0.03) 70%,
    rgba(0, 0, 0, 0.22) 100%);
  box-shadow:
    inset -2px -3px 5px rgba(0, 0, 0, 0.3),
    inset 2px 3px 4px rgba(255, 255, 255, 0.95),
    2px 4px 7px rgba(0, 20, 40, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  pointer-events: none;
  z-index: 10;
}

/* Specular White Highlight Dot */
.water-drop::before {
  content: '';
  position: absolute;
  top: 18%;
  left: 22%;
  width: 32%;
  height: 28%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.9);
}

/* Water Drop Positions */
.drop-hero-1 {
  width: 20px;
  height: 20px;
  top: 14px;
  right: 14px;
  transform: rotate(-15deg);
}

.drop-form-1 {
  width: 15px;
  height: 15px;
  top: 90px;
  right: 4px;
  transform: rotate(25deg);
}

.drop-main-1 {
  width: 24px;
  height: 24px;
  bottom: 18px;
  left: 170px;
  transform: rotate(10deg);
}

.drop-main-2 {
  width: 16px;
  height: 16px;
  top: 80px;
  left: 4px;
}

/* --- Glass Shelf Plane at Bottom --- */
.glass-shelf {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 900px;
  height: 52px;
  margin: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.18) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  flex-shrink: 0;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 15;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  color: #113442;
  transition: all var(--tr-fast);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-decoration: none;
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  color: #113442;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 820px) {
  .page-wrapper {
    padding: 12px 10px;
    justify-content: space-between;
    overflow-y: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
  }

  .main-container {
    max-width: 440px;
    max-height: none;
    padding: 16px;
    border-radius: 24px;
    margin: auto 0;
    flex: 1 0 auto;
  }

  .header-bar {
    padding: 6px 14px;
    margin-bottom: 10px;
    border-radius: 14px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .logo-icon svg,
  .brand-logo-img {
    width: 28px;
    height: 28px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
  }

  .hero-title {
    font-size: 1.35rem;
    margin-bottom: 6px;
  }

  .hero-description {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .form-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
  }

  .form-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
  }

  .booking-form {
    gap: 8px;
  }

  .form-group {
    gap: 3px;
  }

  .form-group label {
    font-size: 0.75rem;
  }

  .form-group input {
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 10px;
  }

  .btn-submit {
    margin-top: 4px;
    padding: 10px 14px;
    font-size: 0.88rem;
    border-radius: 10px;
  }

  .drop-main-1 {
    display: none;
  }

  .glass-shelf {
    height: 48px;
    margin-top: 12px;
    margin-bottom: 4px;
    max-width: 440px;
    border-radius: 16px;
    padding: 0 16px;
    justify-content: center;
  }

  .social-icons {
    gap: 12px;
  }

  .social-icon {
    width: 32px;
    height: 32px;
  }

  .social-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* Small Viewports / Mobile Soft Keyboard Open */
@media (max-height: 700px) {
  .page-wrapper {
    overflow-y: auto !important;
  }
  .main-container {
    padding: 12px 14px;
    margin: 8px 0;
  }
  .header-bar {
    margin-bottom: 6px;
    padding: 4px 12px;
  }
  .hero-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }
  .hero-description {
    font-size: 0.75rem;
  }
  .booking-form {
    gap: 6px;
  }
  .form-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }
}

/* Feedback Banner & Loading State */
.form-feedback {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  text-align: center;
  word-break: break-word;
}

.form-feedback.show-success {
  display: block;
  background: rgba(34, 197, 94, 0.22);
  color: #064e3b;
  border: 1px solid rgba(34, 197, 94, 0.6);
}

.form-feedback.show-error {
  display: block;
  background: rgba(239, 68, 68, 0.22);
  color: #7f1d1d;
  border: 1px solid rgba(239, 68, 68, 0.6);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
