/* 
 * YourSelfAndMe - Main Stylesheet
 * Premium Dark Theme with Gold Accents
 * RTL Ready
 */

/* Font loaded via <link> in HTML headers for better performance */

:root {
  /* Colors - Mapped to UI Kit */
  --bg-color: var(--bg-main);
  --surface-color: var(--bg-soft);
  --surface-color-light: rgba(255, 255, 255, 0.055);
  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);
  --accent-gold: var(--gold);
  --accent-gold-hover: #f3d783;
  --error-color: var(--danger);
  --success-color: var(--success);
  --glass-bg: var(--bg-glass);
  --glass-border: var(--border-soft);
  
  /* Typography */
  --font-family: 'Inter', sans-serif;
  --font-size-base: clamp(1rem, 1vw + 0.5rem, 1.125rem);
  --font-size-h1: clamp(2.5rem, 5vw, 4.5rem);
  --font-size-h2: clamp(2rem, 4vw, 3rem);
  --font-size-h3: clamp(1.5rem, 3vw, 2.25rem);
  
  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: clamp(3rem, 6vw, 6rem);
  
  /* Borders */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-color: #30363d;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Prevent horizontal overflow on all pages */
  overflow-x: hidden;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold-hover);
}

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  width: min(100% - 32px, 1200px);
  margin: 0 auto;
}

.section {
  padding: var(--spacing-xl) 0;
}

.text-center {
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-size: 1.05rem;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
  color: #000;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}

.btn-outline:hover {
  background-color: rgba(212, 175, 55, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER — Glassmorphism Floating Pill Navbar
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  padding: 10px 0;
  /* needed so the mobile dropdown positions relative to this header */
  position: sticky;
  background: linear-gradient(
    to bottom,
    rgba(11,11,15,0.88) 0%,
    rgba(11,11,15,0.0) 100%
  );
  backdrop-filter: blur(0px);
}

/* The inner pill */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(17, 17, 26, 0.72);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  padding: 8px 14px 8px 18px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo span {
  color: var(--accent-gold);
}

/* ── Navigation links ─── */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  color: rgba(255,255,255,0.72);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
  white-space: nowrap;
}

/* Animated underline */
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-gold);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
  opacity: 0;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.main-nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.main-nav a.active {
  color: var(--accent-gold);
  background: rgba(201,168,76,0.1);
}

.main-nav a.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* ── Language Switcher ─── */
.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(15,15,22,0.97);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  min-width: 130px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  z-index: 1000;
  overflow: hidden;
  animation: fadeDropIn 0.18s ease;
}

@keyframes fadeDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-dropdown.show {
  display: block;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-dropdown a:hover {
  background: rgba(201,168,76,0.1);
  color: var(--accent-gold);
}

/* ── Mobile hamburger ─── */
.menu-toggle {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 1.4rem;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  line-height: 1;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.1);
}

/* ── Auth area separator ─── */
.nav-auth {
  display: flex;
  align-items: center;
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,0.1);
  gap: 8px;
  flex-shrink: 0;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Log In — subtle ghost pill ─── */
.btn-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.82);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.845rem;
  letter-spacing: 0.015em;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.22s ease;
}

.btn-nav-login i {
  font-size: 1rem;
  opacity: 0.8;
}

.btn-nav-login:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.26);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Sign Up — glowing gold CTA ─── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.btn-nav-signup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 999px;
  background: linear-gradient(
    110deg,
    #b8860b 0%,
    #e2c04a 30%,
    #f5d97a 50%,
    #e2c04a 70%,
    #b8860b 100%
  );
  background-size: 250% auto;
  color: #1c1200;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.845rem;
  letter-spacing: 0.025em;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow:
    0 0 0 1px rgba(229,189,66,0.3),
    0 4px 16px rgba(201,168,76,0.45),
    inset 0 1px 0 rgba(255,255,255,0.25);
  animation: shimmer 4s linear infinite;
}

.btn-nav-signup i {
  font-size: 1rem;
}

.btn-nav-signup:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(229,189,66,0.5),
    0 8px 28px rgba(201,168,76,0.65),
    inset 0 1px 0 rgba(255,255,255,0.3);
  color: #1c1200;
  animation-play-state: paused;
}

/* ── User Menu — logged-in state ─── */
.user-menu {
  position: relative;
  display: inline-block;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(201,168,76,0.3);
  background: rgba(201,168,76,0.07);
  color: #fff;
  font-family: var(--font-family);
  font-size: 0.845rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.user-menu-btn:hover {
  border-color: rgba(201,168,76,0.6);
  background: rgba(201,168,76,0.13);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a227, #f5d97a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1c1200;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(201,168,76,0.3);
}

.user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: rgba(13,13,20,0.97);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.65);
  z-index: 1000;
  overflow: hidden;
  animation: fadeDropIn 0.18s ease;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  color: rgba(255,255,255,0.78);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-dropdown a i {
  font-size: 1.05rem;
  opacity: 0.7;
}

.user-dropdown a:hover {
  background: rgba(201,168,76,0.1);
  color: var(--accent-gold);
}

.user-dropdown a:hover i {
  opacity: 1;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 4px 0;
}

.user-dropdown-logout {
  color: rgba(248,100,100,0.9) !important;
}

.user-dropdown-logout:hover {
  background: rgba(248,81,73,0.1) !important;
  color: #f87171 !important;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  background-color: var(--surface-color);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Cards (Services, Pricing) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.card {
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl) var(--spacing-lg);
  transition: all var(--transition-normal);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-gold);
  box-shadow: 0 12px 48px rgba(212, 175, 55, 0.15);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--accent-gold);
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

/* Pricing Card specific */
.pricing-card {
  text-align: center;
  position: relative;
}

.pricing-card.popular {
  border-color: var(--accent-gold);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-gold);
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: var(--spacing-md) 0;
}

.price span {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.pricing-features {
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

.pricing-features li {
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-gold);
  font-weight: bold;
}

/* Hero Section */
.hero {
  padding: var(--spacing-xl) 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-color);
  background-image: url('../images/abstract_background.png');
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border-color);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(13, 17, 23, 0.95) 0%, rgba(13, 17, 23, 0.7) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-content {
  text-align: left;
  animation: slideUp var(--transition-slow);
}

.hero-visual {
  position: relative;
  animation: fadeIn var(--transition-slow);
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  animation: float 6s ease-in-out infinite;
}

.hero h1 {
  background: linear-gradient(90deg, #fff 0%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin-bottom: var(--spacing-lg);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* Scroll Animation Classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--spacing-md) 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  color: var(--accent-gold);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-gold);
  transition: transform var(--transition-fast);
}

.faq-question.active::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-answer-inner {
  padding-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0 var(--spacing-md) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

.footer-col ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-col a {
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--accent-gold);
}

.disclaimer-box {
  background-color: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.2);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  margin-top: var(--spacing-lg);
  text-align: center;
}

.disclaimer-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.disclaimer-box strong {
  color: var(--error-color);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* RTL Support via .rtl class on body */
body.rtl {
  direction: rtl;
  text-align: right;
}

body.rtl .main-nav ul {
  padding-right: 0;
}

body.rtl .lang-dropdown {
  right: auto;
  left: 0;
}

body.rtl .logo {
  flex-direction: row-reverse;
}

body.rtl .pricing-features {
  text-align: right;
  padding-right: 0;
}

body.rtl .pricing-features li {
  padding-right: 0;
}

body.rtl .pricing-features li::before {
  margin-left: 8px;
  margin-right: 0;
}

body.rtl .faq-question {
  text-align: right;
}

body.rtl select.form-control {
  background-position: left 16px center;
  padding-right: 16px;
  padding-left: 40px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content {
    order: 1;
  }
  
  .hero-visual {
    order: 2;
    margin-top: var(--spacing-lg);
  }
  
  .hero p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Shrink pill padding on mobile */
  .site-header .container {
    border-radius: 20px;
    padding: 8px 10px;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    background: rgba(13,13,22,0.97);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    padding: 12px 8px 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
  }

  .main-nav.show {
    display: block;
    animation: fadeDropIn 0.2s ease;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .main-nav a {
    border-radius: 12px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
  }

  .main-nav a::after {
    display: none;
  }

  /* Auth buttons stack below nav links on mobile */
  .nav-auth {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 10px 8px 0;
    padding: 14px 8px 0;
    flex-direction: column;
    gap: 8px;
  }

  .auth-buttons {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-nav-login,
  .btn-nav-signup {
    width: 100%;
    justify-content: center;
    padding: 11px 20px;
    font-size: 0.925rem;
  }

  .lang-dropdown {
    position: static;
    animation: none;
    box-shadow: none;
    border: none;
    background: transparent;
    border-radius: 0;
    padding-left: 12px;
  }
}

/* Fix Hero Z-index to not overlap mobile menu */
.hero {
  z-index: 1;
}

/* ==========================================================================
   Global Responsive Fixes (Phase 1 & 5)
   ========================================================================== */

/* Fluid Media Constraints */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.table-responsive table {
    width: 100%;
    min-width: 600px; /* Forces scroll on small screens */
    margin: 0;
    border: none;
}

/* RTL Arabic Support (Phase 10) */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .sidebar-nav i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .message-mine {
    align-self: flex-start;
    border-radius: 16px 16px 16px 0;
}

[dir="rtl"] .message-theirs {
    align-self: flex-end;
    border-radius: 16px 16px 0 16px;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* Chat Mobile Layout Fixes (Phase 4 & 9) */
.chat-container {
    display: flex;
    height: calc(100vh - 120px);
    gap: 1.5rem;
}

.chat-sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.chat-input-row {
    display: flex;
    gap: 1rem;
}

@media (max-width: 820px) {
    .chat-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 120px);
    }
    
    .chat-sidebar {
        width: 100% !important;
        max-height: 250px;
        flex: none;
    }
    
    .chat-window {
        height: 600px;
    }
    
    .chat-input-row {
        flex-wrap: wrap;
    }
    
    .chat-input-row input[type="text"] {
        min-width: 200px;
        width: 100%;
        order: 1;
        margin-bottom: 0.5rem;
    }
    
    .chat-input-row button, .chat-input-row label {
        order: 2;
    }
}

/* ══════════════════════════════════════════════
   Mobile Small Screens (480px)
   ══════════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero { min-height: 60vh; }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .card {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .price { font-size: 2rem; }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section { padding: var(--spacing-lg) 0; }

  .container { width: min(100% - 24px, 1200px); }

  .site-header .container {
    padding: 0 var(--spacing-sm);
  }

  .faq-question { font-size: 1rem; }
}

/* ══════════════════════════════════════════════
   Very Small Screens (360px)
   ══════════════════════════════════════════════ */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 0.95rem; }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .card {
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
  }

  .container { width: min(100% - 16px, 1200px); }


/* ══════════════════════════════════════════════
   AUTH & BOOKING PAGES — Responsive Fixes
   ══════════════════════════════════════════════ */

/* Auth/Login card: always fluid */
.auth-card, .login-card, .register-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* Booking form multi-step: collapse 2-col to 1-col on phones */
.booking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Form rows with 2 columns */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Service card: ensure it never overflows */
.service-card {
  min-width: 0;
  overflow: hidden;
}

/* Pricing table: horizontal scroll on tablet */
@media (max-width: 900px) {
  .pricing-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── 768px: tablet ── */
@media (max-width: 768px) {
  .booking-grid,
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  /* Booking steps stepper: stack on phone */
  .booking-steps {
    gap: 4px;
  }
  .booking-step-label {
    font-size: 0.65rem;
  }

  /* Service cards: single column */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* About section: stack */
  .about-grid {
    grid-template-columns: 1fr;
  }

  /* Testimonials: single column */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Section title: smaller */
  .section-title {
    font-size: clamp(1.4rem, 4vw, 2rem);
  }

  /* Confirmation page */
  .confirmation-card {
    padding: 1.5rem 1rem;
  }

  /* Contact page */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Prevent any fixed-width container from causing scroll */
  .container {
    overflow-x: hidden;
  }
}

/* ── 480px: phone ── */
@media (max-width: 480px) {
  /* Nav pill: make it rectangular */
  .site-header .container {
    border-radius: 12px;
    padding: 6px 8px;
  }

  /* Logo text: hide on very small phones if needed */
  .logo-text { font-size: 1.1rem !important; }

  /* Auth cards: edge-to-edge */
  .auth-card, .login-card, .register-card {
    max-width: 100%;
    border-radius: 16px;
  }

  /* Hero CTA: stack buttons */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer: single column */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Pricing cards: ensure full width */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Upload proof: smaller area */
  .file-upload-zone {
    padding: 1.5rem 1rem;
  }

  /* Booking confirmation info grid */
  .booking-info-grid {
    grid-template-columns: 1fr;
  }

  /* Trust badges row: wrap */
  .trust-badges {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ── 360px: very small phones ── */
@media (max-width: 360px) {
  .site-header .container {
    border-radius: 10px;
    padding: 4px 6px;
  }

  /* Shrink logo icon */
  .logo img {
    height: 36px !important;
  }

  /* Buttons: full width */
  .btn {
    padding: 10px 16px;
    font-size: 0.875rem;
  }

  /* Section padding tighter */
  .section {
    padding: 2rem 0;
  }

  /* Form controls: slightly smaller font */
  .form-control {
    font-size: 0.9375rem;
    padding: 12px 14px;
  }
}
