/* ===================================
   PeopleBuddy - Global Styles
   Enterprise SaaS Design System
   =================================== */

/* ===================================
   CSS RESET & BASE
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: #FAF4EE;
  /* Warm beige - NO pure white */
  overflow-x: hidden;
  /* Account for fixed header height */
  padding-top: 80px;
}

/* ===================================
   DESIGN TOKENS - COLOR PALETTE
   WARM PREMIUM ENTERPRISE THEME
   =================================== */
:root {
  /* PRIMARY BRAND COLOR - WARM BEIGE */
  --primary-50: #fdf8f3;
  --primary-100: #faf0e6;
  --primary-200: #f5e1cd;
  --primary-300: #f0d2b4;
  --primary-400: #ebc39b;
  --primary-500: #E9B48A;
  /* Main Warm Beige */
  --primary-600: #d49b6f;
  --primary-700: #bf8254;
  --primary-800: #aa6939;
  --primary-900: #95501e;

  /* SECONDARY BRAND COLOR - MUTED BROWN */
  --secondary-50: #f7f3f1;
  --secondary-100: #efe7e3;
  --secondary-200: #dfcfc7;
  --secondary-300: #cfb7ab;
  --secondary-400: #bf9f8f;
  --secondary-500: #956959;
  /* Main Muted Brown */
  --secondary-600: #7d5849;
  --secondary-700: #654739;
  --secondary-800: #4d3629;
  --secondary-900: #352519;

  /* SUPPORTING DARK ACCENT - DEEP BROWN */
  --accent-50: #f5f1f0;
  --accent-100: #ebe3e1;
  --accent-200: #d7c7c3;
  --accent-300: #c3aba5;
  --accent-400: #af8f87;
  --accent-500: #5C352C;
  /* Main Deep Brown - CTAs */
  --accent-600: #4d2c24;
  --accent-700: #3e231c;
  --accent-800: #2f1a14;
  --accent-900: #20110c;

  /* PRIMARY DARK - ESPRESSO DARK */
  --dark-50: #f3f0ef;
  --dark-100: #e7e1df;
  --dark-200: #cfc3bf;
  --dark-300: #b7a59f;
  --dark-400: #9f877f;
  --dark-500: #2A1713;
  /* Main Espresso Dark - Text/Header/Footer */
  --dark-600: #231310;
  --dark-700: #1c0f0d;
  --dark-800: #150b0a;
  --dark-900: #0e0707;

  /* Neutral Grays (Warm-tinted) */
  --gray-50: #fafaf9;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-400: #a8a29e;
  --gray-500: #78716c;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;

  /* Semantic Colors */
  --success-light: #d1fae5;
  --success: #10b981;
  --success-dark: #059669;

  --warning-light: #fef3c7;
  --warning: #f59e0b;
  --warning-dark: #d97706;

  --error-light: #fee2e2;
  --error: #ef4444;
  --error-dark: #dc2626;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #FAF6F2;
  /* Very light warm tint */
  --bg-tertiary: #f5f0eb;
  --bg-dark: #2A1713;
  /* Espresso Dark */

  /* Text Colors */
  --text-primary: #2A1713;
  /* Espresso Dark */
  --text-secondary: #5C352C;
  /* Deep Brown */
  --text-tertiary: #956959;
  /* Muted Brown */
  --text-inverse: #ffffff;

  /* Border Colors */
  --border-light: #e7e5e4;
  --border-medium: #d6d3d1;
  --border-dark: #a8a29e;

  /* Premium Gradient Backgrounds for Visual Depth */
  --bg-gradient-warm: linear-gradient(135deg, #FAF4EE 0%, #F1E3D6 100%);
  --bg-gradient-highlight: linear-gradient(135deg, #E9B48A 0%, #F5E6D8 100%);
  --bg-gradient-emphasis: linear-gradient(135deg, #5C352C 0%, #3D241D 100%);
  --bg-gradient-subtle: linear-gradient(180deg, #FFFFFF 0%, #FAF4EE 100%);

  /* Spacing Scale (8px base) */
  --space-1: 0.5rem;
  /* 8px */
  --space-2: 1rem;
  /* 16px */
  --space-3: 1.5rem;
  /* 24px */
  --space-4: 2rem;
  /* 32px */
  --space-5: 2.5rem;
  /* 40px */
  --space-6: 3rem;
  /* 48px */
  --space-8: 4rem;
  /* 64px */
  --space-10: 5rem;
  /* 80px */
  --space-12: 6rem;
  /* 96px */
  --space-16: 8rem;
  /* 128px */

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
}

h5 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

h6 {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

p {
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.75;
}

.text-large {
  font-size: 1.25rem;
  line-height: 1.75;
}

.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1.5;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

/* ===================================
   LAYOUT & CONTAINER
   =================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-narrow {
  max-width: 960px;
}

.container-wide {
  max-width: 1440px;
}

/* Section Spacing */
section {
  padding: var(--space-12) 0;
}

.section-sm {
  padding: var(--space-8) 0;
}

.section-lg {
  padding: var(--space-16) 0;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-500);
  /* Deep Brown #5C352C */
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--dark-500);
  /* Espresso Dark #2A1713 */
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-color: var(--text-tertiary);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.btn-outline {
  background: transparent;
  color: var(--text-tertiary);
  border-color: var(--text-tertiary);
}

.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

.btn-small {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

/* ===================================
   CARDS
   =================================== */
.card {
  background: var(--bg-primary);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(233, 180, 138, 0.05), rgba(149, 105, 89, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 50px rgba(92, 53, 44, 0.2);
  border-color: var(--primary-300);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-100);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  font-size: 1.75rem;
  color: var(--text-tertiary);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.card-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Card Images */
.card img {
  transition: transform var(--transition-base);
}

.card:hover img {
  transform: scale(1.05);
}


/* ===================================
   GRID SYSTEM
   =================================== */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===================================
   FLEXBOX UTILITIES
   =================================== */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

/* ===================================
   TEXT UTILITIES
   =================================== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

.text-brand {
  color: var(--primary-600);
}

/* ===================================
   SPACING UTILITIES
   =================================== */
.mt-1 {
  margin-top: var(--space-1);
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-3 {
  margin-top: var(--space-3);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-1 {
  margin-bottom: var(--space-1);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-3);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.pt-4 {
  padding-top: var(--space-4);
}

.pt-6 {
  padding-top: var(--space-6);
}

.pt-8 {
  padding-top: var(--space-8);
}

.pb-4 {
  padding-bottom: var(--space-4);
}

.pb-6 {
  padding-bottom: var(--space-6);
}

.pb-8 {
  padding-bottom: var(--space-8);
}

/* ===================================
   ANIMATIONS & TRANSITIONS
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}


.animate-scale {
  animation: scaleIn 0.6s ease-out;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Animations for Cards */
.reveal:nth-child(1) {
  transition-delay: 0s;
}

.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.reveal:nth-child(5) {
  transition-delay: 0.4s;
}

.reveal:nth-child(6) {
  transition-delay: 0.5s;
}

/* Image Hover Effects */
.image-hover-zoom {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.image-hover-zoom img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.image-hover-zoom:hover img {
  transform: scale(1.08);
}

/* Image Loading States */
img {
  transition: opacity 0.3s ease, filter 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img.loaded,
img:not([loading]) {
  opacity: 1;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card {
    transition: box-shadow 0.2s ease;
  }
}

/* ===================================
   HEADER STYLES
   =================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  max-width: 1440px;
  margin: 0 auto;
  /* Fixed header height: 24px (padding-top) + 40px (content) + 24px (padding-bottom) = ~80px */
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-500);
  /* Deep Brown #5C352C */
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-600);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-600);
  transition: width var(--transition-base);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
}

.hamburger {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: all var(--transition-base);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  bottom: -7px;
}

/* ===================================
   FOOTER STYLES
   =================================== */
.footer {
  background: var(--bg-dark);
  /* Espresso Dark #2A1713 */
  color: var(--primary-500);
  /* Warm Beige #E9B48A */
  padding: var(--space-12) 0 var(--space-4);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section h4 {
  color: var(--primary-500);
  /* Warm Beige */
  margin-bottom: var(--space-3);
  font-size: 1.125rem;
}

.footer-links {
  list-style: none;
}

.footer-link {
  display: block;
  color: var(--text-tertiary);
  /* Muted Brown */
  text-decoration: none;
  margin-bottom: var(--space-2);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-500);
  /* Warm Beige */
}

.footer-bottom {
  border-top: 1px solid rgba(149, 105, 89, 0.3);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-bottom p {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin: 0;
}

/* ===================================
   HERO SECTION
   =================================== */

/* DEFAULT HERO - For inner pages (premium gradient banners) */
.hero {
  /* Premium inner page banner with warm gradient */
  padding: var(--space-6) 0 var(--space-7);
  background: linear-gradient(135deg, #F5E6D8 0%, #E9B48A 100%);
  position: relative;
  overflow: hidden;
  /* Compact height for inner pages */
  min-height: 220px;
  max-height: 32vh;
  margin-top: 0;
  display: flex;
  align-items: center;
  /* Subtle bottom shadow for separation */
  box-shadow: 0 4px 12px rgba(42, 23, 19, 0.08);
}

/* Add subtle texture overlay for depth */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Override any inline background images on inner pages */
.hero[style*="background-image"]:not(#home-hero),
.hero[style*="url("]:not(#home-hero) {
  /* Force premium gradient for inner pages */
  background-image: none !important;
  background: linear-gradient(135deg, #F5E6D8 0%, #E9B48A 100%) !important;
  max-height: 32vh;
  min-height: 240px;
}

/* HOME PAGE HERO - Large, impactful with image */
#home-hero,
body:has(#home-hero) .hero,
.hero.hero-home {
  /* Prominent home page hero */
  padding: var(--space-14) 0 var(--space-16);
  min-height: 550px;
  max-height: 85vh;
  box-shadow: none;
}

#home-hero::before,
body:has(#home-hero) .hero::before,
.hero.hero-home::before {
  /* Remove texture overlay from home hero */
  display: none;
}

#home-hero[style*="background-image"],
#home-hero[style*="url("],
body:has(#home-hero) .hero[style*="background-image"],
body:has(#home-hero) .hero[style*="url("],
.hero.hero-home[style*="background-image"],
.hero.hero-home[style*="url("] {
  /* Larger hero for home page with image */
  max-height: 85vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  /* Ensure content is immediately visible */
  padding: var(--space-3) 0;
}

.hero-title {
  margin-bottom: var(--space-4);
  color: var(--text-inverse);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Inner page hero titles - darker text for solid backgrounds */
.hero:not(#home-hero) .hero-title {
  color: var(--text-primary);
  text-shadow: none;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-6);
  line-height: 1.8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Inner page hero subtitles - darker text for solid backgrounds */
.hero:not(#home-hero) .hero-subtitle {
  color: var(--text-secondary);
  text-shadow: none;
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================
   FORM STYLES
   =================================== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-family: inherit;
  background: var(--bg-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =================================== */

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-3);
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reduce section padding on tablets */
  .section-lg {
    padding: var(--space-10) 0;
  }

  section {
    padding: var(--space-8) 0;
  }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {

  /* Inner pages - compact */
  .hero {
    padding: var(--space-5) 0 var(--space-6);
    max-height: 30vh;
    min-height: 240px;
  }

  .hero[style*="background-image"],
  .hero[style*="url("] {
    max-height: 30vh;
    min-height: 260px;
  }

  /* Home page - prominent */
  body:has(#home-hero) .hero,
  .hero.hero-home {
    padding: var(--space-10) 0 var(--space-12);
    max-height: 65vh;
    min-height: 450px;
  }

  body:has(#home-hero) .hero[style*="background-image"],
  body:has(#home-hero) .hero[style*="url("],
  .hero.hero-home[style*="background-image"],
  .hero.hero-home[style*="url("] {
    max-height: 65vh;
    min-height: 480px;
  }

  .hero-content {
    max-width: 800px;
  }
}

/* Mobile Navigation & Styles (max-width: 768px) */
@media (max-width: 768px) {

  /* ===== HEADER & NAVIGATION ===== */
  .header-container {
    padding: var(--space-3) var(--space-4);
    height: 70px;
    /* Slightly smaller on mobile */
  }

  /* Adjust body padding for smaller mobile header */
  body {
    padding-top: 70px;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo-icon {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-dark);
    padding: var(--space-8) var(--space-4);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    flex-direction: column;
  }

  .nav.active {
    right: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
    margin-bottom: var(--space-6);
    width: 100%;
  }

  .nav-link {
    color: var(--primary-500);
    padding: var(--space-3) 0;
    border-bottom: 1px solid rgba(233, 180, 138, 0.2);
    width: 100%;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav .btn-primary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .mobile-menu-toggle {
    display: flex;
    z-index: 1001;
  }

  /* ===== CONTAINER & SPACING ===== */
  .container {
    padding: 0 var(--space-3);
  }

  section {
    padding: var(--space-6) 0;
  }

  .section-lg {
    padding: var(--space-8) 0;
  }

  /* ===== HERO SECTION ===== */
  /* Inner pages - very compact on mobile */
  .hero {
    padding: var(--space-3) 0 var(--space-4);
    min-height: 160px;
    max-height: auto;
  }

  /* Home page - adaptive height */
  #home-hero,
  body:has(#home-hero) .hero,
  .hero.hero-home {
    padding: var(--space-10) 0 var(--space-12);
    min-height: 420px;
    max-height: auto;
  }

  #home-hero[style*="background-image"],
  #home-hero[style*="url("],
  body:has(#home-hero) .hero[style*="background-image"],
  body:has(#home-hero) .hero[style*="url("],
  .hero.hero-home[style*="background-image"],
  .hero.hero-home[style*="url("] {
    max-height: auto;
    min-height: 450px;
  }

  .hero-content {
    padding: var(--space-3) 0;
  }

  .hero-title {
    font-size: 1.75rem !important;
    margin-bottom: var(--space-3);
  }

  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: var(--space-4);
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--space-2);
  }

  .hero-cta .btn {
    width: 100%;
  }

  /* ===== TYPOGRAPHY ===== */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.125rem;
  }

  p {
    font-size: 1rem;
  }

  .text-large {
    font-size: 1.125rem;
  }

  /* ===== BUTTONS ===== */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }

  .btn-large {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  /* ===== GRIDS ===== */
  .grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* ===== CARDS ===== */
  .card {
    padding: var(--space-4);
  }

  .card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .card-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  /* ===== INLINE FLEX CONTAINERS (CTA SECTIONS) ===== */
  div[style*="display: flex"][style*="justify-content: center"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--space-2) !important;
  }

  div[style*="display: flex"][style*="justify-content: center"] .btn {
    width: 100% !important;
  }

  /* ===== FEATURE ITEMS (Features Page) ===== */
  .feature-item {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }

  /* ===== TABS (Features Page) ===== */
  .tabs {
    flex-direction: column;
    gap: var(--space-2);
    align-items: stretch;
  }

  .tab-button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    text-align: center;
  }

  /* ===== STEP INDICATORS (How It Works) ===== */
  div[style*="display: flex"][style*="align-items: start"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: var(--space-3) !important;
  }

  div[style*="flex-shrink: 0"][style*="width: 4rem"] {
    width: 3rem !important;
    height: 3rem !important;
    font-size: 1.25rem !important;
  }

  /* ===== FOOTER ===== */
  .footer {
    padding: var(--space-8) 0 var(--space-4);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }

  .footer-bottom div {
    flex-direction: column;
    gap: var(--space-2);
  }

  /* ===== FORMS ===== */
  form[style*="display: flex"] {
    flex-direction: column !important;
  }

  form[style*="display: flex"] input {
    width: 100% !important;
  }

  form[style*="display: flex"] button {
    width: 100% !important;
  }

  /* ===== UTILITY OVERRIDES ===== */
  .mb-8 {
    margin-bottom: var(--space-6);
  }

  .mt-8 {
    margin-top: var(--space-6);
  }

  /* ===== SPECIFIC PAGE FIXES ===== */

  /* Pricing cards */
  .pricing-card {
    max-width: 100%;
  }

  /* Stats/Numbers sections */
  div[style*="font-size: 3rem"] {
    font-size: 2rem !important;
  }

  /* Icon boxes */
  div[style*="width: 3rem; height: 3rem"] {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-2);
  }

  /* Inner pages - minimal */
  .hero {
    padding: var(--space-3) 0 var(--space-4);
    min-height: 180px;
    max-height: auto;
  }

  .hero[style*="background-image"],
  .hero[style*="url("] {
    max-height: 25vh;
    min-height: 200px;
  }

  /* Home page - content first */
  body:has(#home-hero) .hero,
  .hero.hero-home {
    padding: var(--space-6) 0 var(--space-8);
    min-height: 350px;
    max-height: auto;
  }

  body:has(#home-hero) .hero[style*="background-image"],
  body:has(#home-hero) .hero[style*="url("],
  .hero.hero-home[style*="background-image"],
  .hero.hero-home[style*="url("] {
    max-height: auto;
    min-height: 380px;
  }

  .hero-title {
    font-size: 1.5rem !important;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  .btn,
  .btn-large {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }

  .card {
    padding: var(--space-3);
  }

  section {
    padding: var(--space-5) 0;
  }

  .section-lg {
    padding: var(--space-6) 0;
  }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.overflow-hidden {
  overflow: hidden;
}