/* ═══════════════════════════════════════════════════
   Sea & Sky Samui — Premium Custom Styles
   Extends Tailwind CSS with luxury effects
   ═══════════════════════════════════════════════════ */

/* ─── Custom Properties ─── */
:root {
  --gold: #C9A96E;
  --gold-light: #E8D5B0;
  --gold-dark: #8B6F3E;
  --navy: #0A1628;
  --navy-mid: #111D32;
  --navy-light: #1A2A44;
  --cream: #F8F5EF;
}

/* ─── Base ─── */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
::selection { background: rgba(201,169,110,0.3); color: #fff; }

/* ─── Hebrew Typography ─── */
/* Override font stack for Hebrew pages - use proper Hebrew fonts */
html[lang="he"] body,
html[lang="he"] .font-sans {
  font-family: 'Assistant', 'Heebo', 'Inter', system-ui, sans-serif !important;
}
html[lang="he"] .font-serif,
html[lang="he"] h1,
html[lang="he"] h2,
html[lang="he"] h3,
html[lang="he"] h4 {
  font-family: 'Heebo', 'Assistant', 'Playfair Display', Georgia, serif !important;
  font-weight: 500;
  letter-spacing: -0.01em;
}
html[lang="he"] .text-gradient-gold {
  font-family: 'Heebo', 'Assistant', sans-serif !important;
  font-weight: 700;
}
/* Keep English brand name in its original font even on Hebrew pages */
html[lang="he"] .nav-logo span {
  font-family: 'Playfair Display', Georgia, serif !important;
}

/* ─── Global Readability Improvements ─── */
/* Brighter body text on dark backgrounds */
.text-white\/50,
.text-white\/60 {
  color: rgba(255,255,255,0.75) !important;
}
.text-white\/40 {
  color: rgba(255,255,255,0.6) !important;
}

/* Brighter subtitle text */
p.text-white\/60 {
  color: rgba(255,255,255,0.8) !important;
}

/* Slightly lighter dark sections for better contrast */
.bg-navy {
  background-color: #0E1D33 !important;
}
.bg-navy-mid {
  background-color: #142640 !important;
}

/* Glass cards — more visible */
.glass-gold {
  background: rgba(201,169,110,0.12) !important;
  border: 1px solid rgba(201,169,110,0.2) !important;
}
.glass {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

/* Card text brighter */
.card-luxury p,
.glass-gold p {
  color: rgba(255,255,255,0.8) !important;
}

/* Cream sections — warmer, softer background */
.bg-cream {
  background-color: #FBF8F2 !important;
}
.bg-cream .text-gray-600 {
  color: #4A4A4A !important;
  line-height: 1.85 !important;
}

/* Hero overlay — slightly lighter for better text visibility */
.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(10,22,40,0.6) 0%,
    rgba(10,22,40,0.4) 40%,
    rgba(10,22,40,0.75) 100%
  ) !important;
}

/* Gold text — slightly brighter */
.text-gold {
  color: #D4B878 !important;
}
.text-gold-light {
  color: #F0DFC0 !important;
}

/* FAQ answers — better readability */
.faq-answer p {
  color: #3D3D3D !important;
  font-size: 0.95rem !important;
  line-height: 1.9 !important;
}

/* Footer — brighter and bigger text */
footer .text-white\/40,
footer p,
footer a {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.9rem !important;
}
footer h4 {
  font-size: 12px !important;
  color: #D4B878 !important;
}
footer .text-white\/20 {
  color: rgba(255,255,255,0.45) !important;
  font-size: 0.8rem !important;
}
footer .text-sm {
  font-size: 0.9rem !important;
}

/* Nav — bigger and brighter text */
nav a {
  font-size: 12px !important;
  color: rgba(255,255,255,0.7) !important;
}
nav a:hover {
  color: #D4B878 !important;
}
nav a.text-gold,
nav a[class*="text-gold"] {
  color: #D4B878 !important;
}
nav .btn-luxury {
  font-size: 12px !important;
  color: #0A1628 !important;
}

/* Mobile menu — bigger and brighter */
.mobile-menu a {
  font-size: 1.3rem !important;
  color: rgba(255,255,255,0.85) !important;
}

/* Lang switcher — bigger */
#lang-dropdown a,
#mobile-lang-dropdown a {
  font-size: 0.85rem !important;
  padding: 0.5rem 1rem !important;
}

/* Bigger line-height for body text */
body {
  line-height: 1.8;
}
p {
  line-height: 1.85;
}

/* ─── Glass Morphism ─── */
.glass {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass-light {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.5);
}
.glass-gold {
  background: rgba(201,169,110,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201,169,110,0.15);
}

/* ─── Parallax ─── */
.parallax-bg {
  position: absolute;
  inset: -20% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 0;
}

/* ─── Video Background (hero) ─── */
.video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #0A1628;
}
.video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 reverse */
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 0;
}
/* Poster/fallback image while video loads */
.video-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--video-poster);
  background-size: cover;
  background-position: center;
  z-index: -1;
}

/* ─── Gold Gradient Text ─── */
.text-gradient-gold {
  background: linear-gradient(135deg, #E8D5B0, #C9A96E, #8B6F3E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Glow Effects ─── */
.glow-gold {
  box-shadow: 0 0 30px rgba(201,169,110,0.15), 0 0 60px rgba(201,169,110,0.05);
}
.glow-gold-hover:hover {
  box-shadow: 0 0 40px rgba(201,169,110,0.25), 0 0 80px rgba(201,169,110,0.1);
}

/* ─── Animated Gold Border ─── */
.border-gold-animated {
  position: relative;
  overflow: hidden;
}
.border-gold-animated::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(201,169,110,0.3), transparent, rgba(201,169,110,0.3)) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ─── Card Hover Effects ─── */
.card-luxury {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-luxury:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3), 0 0 40px rgba(201,169,110,0.1);
}

/* ─── Image Hover Zoom ─── */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.img-zoom:hover img {
  transform: scale(1.08);
}

/* ─── Scroll Indicator ─── */
.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* ─── Animated Counter ─── */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* ─── Gold Divider ─── */
.divider-gold {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider-gold-wide {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ─── Luxury Button ─── */
.btn-luxury {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}
.btn-luxury::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s ease;
}
.btn-luxury:hover::before {
  left: 100%;
}
.btn-luxury:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,169,110,0.3);
}

/* ─── Nav Glass ─── */
.nav-glass {
  transition: all 0.4s ease;
}
.nav-glass.scrolled {
  background: rgba(10,22,40,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* ─── Full-Screen Mobile Menu ─── */
.mobile-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ─── Hero Overlay ─── */
.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(10,22,40,0.7) 0%,
    rgba(10,22,40,0.5) 40%,
    rgba(10,22,40,0.8) 100%
  );
}

/* ─── FAQ Accordion ─── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.5rem;
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform 0.3s ease;
}

/* ─── Swiper Custom ─── */
.swiper-pagination-bullet {
  background: rgba(201,169,110,0.4) !important;
  opacity: 1 !important;
}
.swiper-pagination-bullet-active {
  background: var(--gold) !important;
  width: 24px !important;
  border-radius: 4px !important;
}

/* ─── Lightbox ─── */
.lightbox-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* ─── Video Wrapper ─── */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ─── Timeline Vertical Line ─── */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  transform: translateX(-50%);
}

/* ─── Stats Counter Animation ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Subtle Grid Pattern ─── */
.grid-pattern {
  background-image:
    linear-gradient(rgba(201,169,110,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,169,110,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── RTL Support ─── */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }
[dir="rtl"] .ml-auto { margin-left: 0; margin-right: auto; }
[dir="rtl"] .mr-auto { margin-right: 0; margin-left: auto; }

/* ─── Desktop/Mobile video toggle ─── */
.mobile-only-bg { display: none; }
.desktop-only-video { display: block; }
.mobile-only-video { display: none; }

@media (max-width: 1023px) {
  .desktop-only-video { display: none !important; }
  .mobile-only-bg { display: block !important; }
  .mobile-only-video { display: block !important; }
}

/* ─── Mobile AOS fallback — ALWAYS VISIBLE on mobile ─── */
@media (max-width: 768px) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
}

/* ─── Responsive / Mobile Fixes ─── */
@media (max-width: 768px) {
  /* Disable parallax on mobile to prevent content disappearing */
  .parallax-bg {
    background-attachment: scroll !important;
    inset: 0 !important;
    transform: none !important;
  }

  /* Darker overlay on mobile for better text contrast */
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(10,22,40,0.85) 0%,
      rgba(10,22,40,0.75) 40%,
      rgba(10,22,40,0.92) 100%
    ) !important;
  }

  /* Hero min-height — don't force full viewport on mobile */
  section[class*="min-h-screen"],
  section.min-h-screen {
    min-height: auto !important;
    padding-top: 7rem !important;
    padding-bottom: 4rem !important;
  }

  section[class*="min-h-[60vh]"] {
    min-height: auto !important;
    padding-top: 7rem !important;
    padding-bottom: 3rem !important;
  }

  /* Make sure hero content is always visible */
  .hero-content, section > .relative.z-10 {
    position: relative !important;
    z-index: 10 !important;
  }

  /* Larger/clearer hero text on mobile */
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
    word-wrap: break-word;
  }

  h2 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
  }

  /* Reduce extreme padding on mobile */
  .py-24, .py-28 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Floating stats bar — make it normal flow on mobile (not absolute) */
  .absolute.bottom-0.left-0.right-0,
  section > div.absolute.bottom-0,
  div.absolute.bottom-0 {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 2rem !important;
  }

  /* Stats grid — fix text sizing and spacing on mobile */
  .glass.grid,
  .grid.glass {
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }
  .glass.grid > div,
  .grid.glass > div {
    padding: 1rem 0.5rem !important;
  }
  .glass.grid .font-serif,
  .grid.glass .font-serif {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  .glass.grid span.text-\[9px\],
  .grid.glass span.text-\[9px\] {
    font-size: 8px !important;
    letter-spacing: 0.15em !important;
    word-break: break-word;
    line-height: 1.3 !important;
  }

  /* Remove divider lines on mobile stats */
  .divide-x > * + *,
  .divide-white\/5 > * + * {
    border-left-width: 0 !important;
    border-right-width: 0 !important;
  }

  /* Stats grid as 4-up cards */
  .grid.grid-cols-2.lg\:grid-cols-4 > div,
  .grid.grid-cols-2.md\:grid-cols-4 > div {
    padding: 1rem !important;
  }

  /* Scroll indicator hidden on mobile */
  .scroll-indicator { display: none !important; }

  /* Replace backdrop-filter with solid backgrounds on mobile */
  .glass {
    background: rgba(17, 29, 50, 0.85) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .glass-light {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .glass-gold {
    background: rgba(201, 169, 110, 0.12) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .nav-glass.scrolled {
    background: rgba(10, 22, 40, 0.97) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Ensure nav has solid background on mobile even before scroll */
  .nav-glass {
    background: rgba(10, 22, 40, 0.92) !important;
  }

  /* Mobile menu must be fully opaque */
  .mobile-menu {
    background: #0A1628 !important;
  }

  /* Ensure hero parallax image is visible (not fixed) */
  .parallax-bg {
    position: absolute !important;
    inset: 0 !important;
  }
}

/* ─── Extra small screens ─── */
@media (max-width: 480px) {
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.5rem !important; }
  .text-lg { font-size: 0.95rem !important; }
  .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .lg\:px-12 { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* ─── Print ─── */
@media print {
  .no-print { display: none !important; }
  body { background: white; color: black; }
}
