/* ========================================
   RESPONSIVE DESIGN SYSTEM
   Mobile-First Approach for Manterprise
   Tipping Paper Machine Solutions
   ======================================== */

/* Design Tokens */
:root {
  /* Breakpoints */
  --bp-xs: 360px;
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* Spacing Scale */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */

  /* Font Sizes */
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-md: 1rem;       /* 16px */
  --fs-lg: 1.125rem;   /* 18px */
  --fs-xl: 1.25rem;    /* 20px */
  --fs-2xl: 1.5rem;    /* 24px */
  --fs-3xl: 1.875rem;  /* 30px */
  --fs-4xl: 2.25rem;   /* 36px */
  --fs-5xl: 3rem;      /* 48px */
  --fs-6xl: 3.75rem;   /* 60px */

  /* Line Heights */
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius: 0.5rem;       /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Container Max Widths */
  --container: 1200px;
  --container-narrow: 960px;
  --container-wide: 1400px;

  /* Touch Target Size */
  --touch-target: 44px;
  --touch-target-lg: 48px;

  /* Safe Areas for Mobile */
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
}

/* ========================================
   BASE MOBILE STYLES
   ======================================== */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

/* Prevent horizontal overflow */
* {
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Container System */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Main Content Spacing */
main {
  padding-top: 80px; /* Account for fixed navbar height (88px) + extra spacing */
}

/* Mobile adjustments for main content spacing */
@media (max-width: 767px) {
  main {
    padding-top: 60px; /* Slightly less padding on mobile */
  }
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-wide {
  max-width: var(--container-wide);
}

/* ========================================
   TYPOGRAPHY RESPONSIVE SCALING
   ======================================== */

/* Mobile-first typography */
h1 {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

h5 {
  font-size: var(--fs-lg);
  line-height: var(--lh-tight);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--fs-md);
  line-height: var(--lh-tight);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

p {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-4);
}

/* Tablet and up typography scaling */
@media (min-width: 768px) {
  h1 {
    font-size: var(--fs-5xl);
  }

  h2 {
    font-size: var(--fs-4xl);
  }

  h3 {
    font-size: var(--fs-3xl);
  }

  p {
    font-size: var(--fs-lg);
  }
}

/* Desktop typography scaling */
@media (min-width: 1024px) {
  h1 {
    font-size: var(--fs-6xl);
  }

  h2 {
    font-size: var(--fs-5xl);
  }

  h3 {
    font-size: var(--fs-4xl);
  }
}

/* ========================================
   NAVIGATION RESPONSIVE SYSTEM
   ======================================== */

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: var(--shadow-lg);
  padding-top: var(--safe-top);
}

.mobile-nav .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 0 var(--space-4);
}

.mobile-nav .logo {
  height: 40px;
  width: auto;
}

.mobile-nav .hamburger {
  width: var(--touch-target);
  height: var(--touch-target);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-nav .hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 2px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-nav .hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav .hamburger.active span:nth-child(2) {
  opacity: 0;
}

.mobile-nav .hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding-top: var(--safe-top);
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu .menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu .menu-logo {
  height: 32px;
  width: auto;
}

.mobile-menu .close-btn {
  width: var(--touch-target);
  height: var(--touch-target);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: var(--radius);
}

.mobile-menu .menu-items {
  padding: var(--space-4);
}

.mobile-menu .menu-item {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: white;
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
  transition: all 0.2s ease;
}

.mobile-menu .menu-item:hover,
.mobile-menu .menu-item.active {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
}

/* Desktop Navigation */
.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: block;
  }

  .desktop-nav {
    display: block;
  }

  .hamburger {
    display: none !important;
  }
}

/* ========================================
   HERO SECTION RESPONSIVE
   ======================================== */

/* Hero Section */
.hero-section {
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

/* Gradient overlay for hero background */
.gradient-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
}

/* Hero content alignment classes */
.hero-content.text-left {
  text-align: left;
}

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

.hero-content.text-right {
  text-align: right;
}

/* Hero overlay theme classes */
.hero-title.text-white,
.hero-subtitle.text-white {
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-title.text-black,
.hero-subtitle.text-black {
  color: #1f2937 !important;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-content {
  text-align: center;
  padding: var(--space-4);
  max-width: 100%;
}

.hero-title {
  font-size: var(--fs-4xl);
  font-weight: 800;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-6);
  color: white;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-8);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

.hero-cta .btn {
  min-height: var(--touch-target-lg);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-2xl);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 280px;
}

.hero-cta .btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: white;
  box-shadow: var(--shadow-lg);
}

.hero-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.hero-cta .btn-secondary {
  border: 2px solid white;
  color: white;
  background: transparent;
}

.hero-cta .btn-secondary:hover {
  background: white;
  color: #1e293b;
}

/* CTA Button Styling - Consistent across all hero sections */
.hero-cta .btn {
  min-height: var(--touch-target-lg);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-2xl);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  max-width: 280px;
  border: none;
  cursor: pointer;
  font-size: var(--fs-md);
  text-transform: none;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

.hero-cta .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.hero-cta .btn:hover::before {
  left: 100%;
}

/* Primary button styling - matches fallback content */
.hero-cta .btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: white;
  box-shadow: var(--shadow-lg);
}

.hero-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
}

/* Secondary button styling - matches fallback content */
.hero-cta .btn-secondary {
  border: 2px solid white;
  color: white;
  background: transparent;
}

.hero-cta .btn-secondary:hover {
  background: white;
  color: #1e293b;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Light button styling for dark overlays */
.hero-cta .btn-light {
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.hero-cta .btn-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: white;
  color: #111827;
}

/* Tablet hero adjustments */
@media (min-width: 768px) {
  .hero-title {
    font-size: var(--fs-5xl);
  }

  .hero-subtitle {
    font-size: var(--fs-xl);
  }

  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }

  .hero-cta .btn {
    width: auto;
  }
}

/* Desktop hero adjustments */
@media (min-width: 1024px) {
  .hero-title {
    font-size: var(--fs-6xl);
  }

  .hero-subtitle {
    font-size: var(--fs-2xl);
  }
}

/* ========================================
   GRID SYSTEM RESPONSIVE
   ======================================== */

.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid adjustments */
@media (min-width: 480px) {
  .grid-cols-2-mobile {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid-cols-2-tablet {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3-tablet {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-3-desktop {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-cols-4-desktop {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Auto-fit grids for flexible layouts */
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ========================================
   CARDS RESPONSIVE
   ======================================== */

.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid #e5e7eb;
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* Service cards specific styling */
.service-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-card .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .card-image {
  transform: scale(1.05);
}

.service-card .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.8) 0%, rgba(245, 158, 11, 0.8) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card:hover .card-overlay {
  opacity: 1;
}

/* ========================================
   FORMS RESPONSIVE
   ======================================== */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: #374151;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-4);
  border: 2px solid #d1d5db;
  border-radius: var(--radius);
  font-size: var(--fs-md);
  transition: all 0.2s ease;
  background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

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

.form-button {
  min-height: var(--touch-target-lg);
  padding: var(--space-3) var(--space-8);
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--fs-md);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Mobile-specific form enhancements */
@media (max-width: 767px) {
  .form-input[type="tel"] {
    inputmode: "tel";
  }

  .form-input[type="email"] {
    inputmode: "email";
  }

  .form-input[type="number"] {
    inputmode: "numeric";
  }
}

/* ========================================
   TABLES RESPONSIVE
   ======================================== */

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

/* Mobile table stacking */
@media (max-width: 767px) {
  .table-responsive {
    display: block;
  }

  .table-responsive thead {
    display: none;
  }

  .table-responsive tbody,
  .table-responsive tr,
  .table-responsive td {
    display: block;
  }

  .table-responsive tr {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
  }

  .table-responsive td {
    border: none;
    padding: var(--space-2) 0;
    position: relative;
    padding-left: 50%;
  }

  .table-responsive td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-right: var(--space-2);
    white-space: nowrap;
    font-weight: 600;
    color: #374151;
  }
}

/* ========================================
   MODALS AND OVERLAYS RESPONSIVE
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  padding: var(--space-6);
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* Mobile modal adjustments */
@media (max-width: 767px) {
  .modal {
    margin: var(--space-4);
    max-height: calc(100vh - 2rem);
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

/* Spacing utilities */
.p-mobile { padding: var(--space-4); }
.p-tablet { padding: var(--space-6); }
.p-desktop { padding: var(--space-8); }

.m-mobile { margin: var(--space-4); }
.m-tablet { margin: var(--space-6); }
.m-desktop { margin: var(--space-8); }

/* Text utilities */
.text-mobile { font-size: var(--fs-sm); }
.text-tablet { font-size: var(--fs-md); }
.text-desktop { font-size: var(--fs-lg); }

/* Display utilities */
.hidden-mobile { display: none; }
.hidden-tablet { display: block; }
.hidden-desktop { display: block; }

@media (min-width: 768px) {
  .hidden-mobile { display: block; }
  .hidden-tablet { display: none; }
}

@media (min-width: 1024px) {
  .hidden-tablet { display: block; }
  .hidden-desktop { display: none; }
}

/* Touch target utilities */
.touch-target {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
}

.touch-target-lg {
  min-height: var(--touch-target-lg);
  min-width: var(--touch-target-lg);
}

/* Safe area utilities */
.safe-top { padding-top: var(--safe-top); }
.safe-bottom { padding-bottom: var(--safe-bottom); }
.safe-left { padding-left: var(--safe-left); }
.safe-right { padding-right: var(--safe-right); }

/* ========================================
   ANIMATIONS AND TRANSITIONS
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Hero Slider Smooth Transitions */
.hero-section .absolute.inset-0 > div {
  transition: opacity 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.hero-content > div {
  transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

/* Ensure smooth transitions for all hero elements */
.hero-section [x-show] {
  transition: opacity 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.hero-content [x-show] {
  transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

/* Force smooth transitions for hero slider */
.hero-section .absolute.inset-0 > div[x-show] {
  transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out !important;
}

.hero-content > div[x-show] {
  transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out !important;
}

/* No transitions for text elements - instant display */
.hero-title, .hero-subtitle, .hero-cta {
  transition: none !important;
}

/* Ensure text elements have no transitions */
.hero-content .hero-title,
.hero-content .hero-subtitle,
.hero-content .hero-cta {
  transition: none !important;
}

/* Prevent text flickering and improve rendering */
.hero-title, .hero-subtitle {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

/* Smooth text rendering */
.hero-content {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Smooth slide navigation dots */
.hero-section .absolute.bottom-8 button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-section .absolute.bottom-8 button:hover {
  transform: scale(1.2);
}

/* Smooth navigation arrows */
.hero-section .absolute.left-4 button,
.hero-section .absolute.right-4 button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-section .absolute.left-4 button:hover,
.hero-section .absolute.right-4 button:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(255, 255, 255, 0.4);
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Reduce motion for users who prefer it */
@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;
  }
}

/* Optimize images */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .mobile-nav,
  .desktop-nav,
  .mobile-menu,
  .modal-overlay,
  .hero-cta,
  .btn {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Focus styles */
*:focus {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #d97706;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1001;
}

.skip-link:focus {
  top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid #000;
  }

  .btn {
    border: 2px solid #000;
  }
}

/* ========================================
   SERVICES PAGE RESPONSIVE
   ======================================== */

/* Mobile filter dropdown */
.services-mobile-filter {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid #e5e7eb;
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.services-mobile-filter h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: #111827;
  margin-bottom: var(--space-4);
}

.services-mobile-filter select {
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-4);
  border: 2px solid #d1d5db;
  border-radius: var(--radius);
  font-size: var(--fs-md);
  background: white;
  transition: all 0.2s ease;
}

.services-mobile-filter select:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.services-mobile-filter label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
}

/* Desktop sidebar */
.services-desktop-sidebar {
  width: 320px;
  flex-shrink: 0;
}

.services-desktop-sidebar .sidebar-content {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  position: sticky;
  top: var(--space-8);
}

/* Services grid responsive */
.services-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Service cards */
.service-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.service-card .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .card-image {
  transform: scale(1.05);
}

.service-card .card-content {
  padding: var(--space-6);
}

.service-card h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: #111827;
  margin-bottom: var(--space-3);
}

.service-card p {
  color: #6b7280;
  line-height: var(--lh-loose);
  margin-bottom: var(--space-4);
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --border-color: #374151;
  }

  body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
  }

  .card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
  }

  .form-input,
  .form-textarea,
  .form-select {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
  }
}
