/* ==========================================================================
   Suorkear Investment (SKI) - Professional Stylesheet (Day & Night Mode)
   ========================================================================== */

:root {
  /* Refined Corporate Palette - Day Mode */
  --ski-navy: #0F2547;
  --ski-dark-navy: #08152B;
  --ski-navy-light: #1C3B6E;
  --ski-orange: #C86D1F;
  --ski-orange-hover: #AF5B13;
  --ski-orange-light: rgba(200, 109, 31, 0.12);
  --ski-gold: #D49B4B;
  --ski-accent: #1D4ED8;
  --ski-emerald: #0D9488;

  /* Theme Surface & Text Tokens (Day Mode) */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --bg-elevated: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.94);
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-heading: #0F2547;
  --border-color: #E2E8F0;
  --border-subtle: #F1F5F9;
  --card-shadow: 0 12px 28px -6px rgba(15, 37, 71, 0.08);
  --card-hover-shadow: 0 22px 38px -10px rgba(15, 37, 71, 0.16);
  --input-bg: #F8FAFC;
  --input-focus-bg: #FFFFFF;
}

html.dark {
  /* Refined Corporate Palette - Night Mode */
  --ski-navy: #163059;
  --ski-dark-navy: #060D1A;
  --ski-navy-light: #244880;
  --ski-orange: #E08232;
  --ski-orange-hover: #F09343;
  --ski-orange-light: rgba(224, 130, 50, 0.16);
  --ski-gold: #E5B263;

  /* Theme Surface & Text Tokens (Night Mode) */
  --bg-primary: #0A111F;
  --bg-secondary: #0F1A2E;
  --bg-tertiary: #16243D;
  --bg-elevated: #152238;
  --bg-header: rgba(10, 17, 31, 0.94);
  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-heading: #F8FAFC;
  --border-color: #1E2E4A;
  --border-subtle: #17253D;
  --card-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.45);
  --card-hover-shadow: 0 22px 38px -10px rgba(0, 0, 0, 0.65);
  --input-bg: #0B1526;
  --input-focus-bg: #111F36;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Automatic Day/Night Adaptation for Utility Classes */
html.dark body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

html.dark .bg-white {
  background-color: var(--bg-secondary) !important;
}

html.dark .bg-gray-50,
html.dark .bg-slate-50 {
  background-color: var(--bg-primary) !important;
}

html.dark .bg-gray-100,
html.dark .bg-slate-100 {
  background-color: var(--bg-tertiary) !important;
}

html.dark .text-skiNavy {
  color: var(--text-heading) !important;
}

html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-slate-800 {
  color: var(--text-primary) !important;
}

html.dark .text-gray-600,
html.dark .text-slate-600 {
  color: var(--text-secondary) !important;
}

html.dark .text-gray-500,
html.dark .text-gray-400,
html.dark .text-slate-500 {
  color: var(--text-muted) !important;
}

html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-slate-100,
html.dark .border-slate-200 {
  border-color: var(--border-color) !important;
}

/* Hero Background styling */
.hero-bg {
  background: url('../images/phumi-mongkol-drone.jpg') center/cover no-repeat;
  background-attachment: scroll;
}

@media (min-width: 1024px) {
  .hero-bg {
    background-attachment: fixed;
  }
}

/* Glassmorphism helpers */
.glass-panel {
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
}

.glass-panel-dark {
  background: rgba(8, 21, 43, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Navigation Header */
header.site-header {
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease-in-out;
}

header.site-header.scrolled {
  box-shadow: 0 8px 28px -4px rgba(8, 21, 43, 0.12);
}

html.dark header.site-header.scrolled {
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.5);
}

/* Fixed Header When Scrolling Down */
header.site-header.fixed-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 50 !important;
  box-shadow: 0 10px 30px -5px rgba(8, 21, 43, 0.16) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: headerSlideDown 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark header.site-header.fixed-nav {
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.65) !important;
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Move to Top Floating Button */
#move-to-top-btn {
  box-shadow: 0 8px 25px rgba(200, 109, 31, 0.4);
}

#move-to-top-btn:hover {
  box-shadow: 0 12px 30px rgba(200, 109, 31, 0.6);
}

/* Brand Logo */
.brand-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.brand-logo-img:hover {
  transform: scale(1.03);
}

html.dark .brand-logo-wrap {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 4px 8px;
  border-radius: 10px;
}

/* Professional Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--ski-orange) 0%, var(--ski-orange-hover) 100%);
  color: #ffffff !important;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(200, 109, 31, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ski-orange-hover) 0%, #964B0C 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(200, 109, 31, 0.42);
}

.btn-navy {
  background-color: var(--ski-navy);
  color: #ffffff !important;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(15, 37, 71, 0.2);
}

.btn-navy:hover {
  background-color: var(--ski-navy-light);
  transform: translateY(-1px);
}

/* Card hover enhancements */
.property-card,
.event-card,
.gallery-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.property-card:hover,
.event-card:hover,
.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(200, 109, 31, 0.45);
}

/* Form controls */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 0.75rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  background-color: var(--input-focus-bg);
  border-color: var(--ski-orange);
  box-shadow: 0 0 0 3px var(--ski-orange-light);
}

/* Filter Pill Buttons */
.filter-pill {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--ski-orange);
  color: var(--ski-orange);
}

.filter-pill.active {
  background-color: var(--ski-orange);
  color: #ffffff !important;
  border-color: var(--ski-orange);
  box-shadow: 0 4px 12px rgba(200, 109, 31, 0.3);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--ski-orange);
  color: var(--ski-orange);
}

/* Dropdown menu surface */
.nav-dropdown-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-hover-shadow);
}

.nav-dropdown-item {
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--ski-orange) !important;
}

/* Modal Surface */
.modal-surface {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ski-orange);
}

/* ==========================================================================
   Khmer Typography & Language Switcher (i18n)
   ========================================================================== */
html[lang="km"],
html.khmer-font,
html[lang="km"] body,
html.khmer-font body,
html[lang="km"] input,
html[lang="km"] button,
html[lang="km"] select,
html[lang="km"] textarea {
  font-family: 'Kantumruy Pro', 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
}

html[lang="km"] h1,
html[lang="km"] h2,
html[lang="km"] h3,
html[lang="km"] h4 {
  line-height: 1.45;
}

.lang-switch-wrap {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.lang-btn {
  font-family: 'Inter', 'Kantumruy Pro', sans-serif;
  transition: all 0.2s ease;
}

.lang-btn.active-lang {
  background-color: var(--ski-orange) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(200, 109, 31, 0.35);
}
