/* === Google Fonts === */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* === Font Loading Optimization === */
html.fonts-loaded {
  /* Fonts are loaded, no layout shift needed */
}

html:not(.fonts-loaded) {
  /* Prevent layout shift while fonts load */
  font-display: swap;
}

/* Prevent layout shift for text elements */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a {
  font-display: swap;
}

/* === CSS Variables === */
:root {
  --primary: #1a365d;
  --primary-light: #2d5a87;
  --secondary: #f7fafc;
  --accent: #3182ce;
  --accent-light: #63b3ed;
  --success: #38a169;
  --warning: #d69e2e;
  --danger: #e53e3e;
  --text-dark: #1a202c;
  --text-light: #4a5568;
  --text-muted: #5a6c7d; /* Darkened for better contrast */
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #171923;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --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);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-display: swap; /* Prevent font-based layout shifts */
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  color: var(--text-dark);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  ); /* Changed accent to primary-light for better contrast */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
}

p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* === Mobile Menu Toggle === */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.75rem;
  z-index: 1001;
  border-radius: var(--border-radius);
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.mobile-menu-toggle:hover {
  background: var(--gray-100);
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 2px;
}

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

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

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* === Navigation === */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Prevent overlapping */
  flex-wrap: nowrap;
  gap: 1rem;
  /* Ensure layout is not affected by mobile menu */
  position: relative;
  z-index: 1001;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Prevent overlapping */
  flex-shrink: 0;
}

.logo::before {
  content: "🚀";
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  /* Prevent overlapping */
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  /* Prevent overlapping */
  white-space: nowrap;
  padding: 0.5rem 0;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links .nav-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white !important;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  /* Prevent overlapping */
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links .nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white !important;
}

/* === Hero Section === */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  padding-top: 2rem;
  margin-top: 1rem;
  /* Removed ::before pseudo-element to prevent layout shifts */
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
  /* Ensure proper spacing */
  min-height: 400px;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  /* Remove animation to prevent layout shifts */
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  /* Remove animation to prevent layout shifts */
}

.hero-image {
  position: relative;
  /* Remove animation to prevent layout shifts */
  width: 100%;
  height: 350px; /* Reserve space to prevent layout shift */
  min-height: 350px;
  max-height: 500px;
  /* Ensure proper spacing */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  /* Remove transition to prevent layout shifts */
  aspect-ratio: 16/10; /* Prevent layout shift */
  min-height: 350px; /* Ensure minimum height */
  max-height: 500px; /* Prevent excessive height */
  /* Remove hover animation that causes layout shifts */
  transform: none !important;
}

/* Remove hover animation that causes layout shifts */
.hero-img:hover {
  /* transform: scale(1.02); - REMOVED to prevent layout shifts */
}

/* === Hero Stats Layout Fix === */
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  /* Remove animation to prevent layout shifts */
  min-height: 60px; /* Reserve space to prevent layout shift */
  align-items: center;
  justify-content: flex-start;
  /* Ensure proper spacing */
  flex-shrink: 0;
}

.stat {
  text-align: center;
  min-width: 80px; /* Prevent layout shift */
  min-height: 50px; /* Reserve space */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light); /* Changed from text-muted for better contrast */
  font-weight: 500;
}

/* === CTA Button === */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  /* Remove transition to prevent layout shifts */
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  /* Remove animations that cause layout shifts */
  transform: none !important;
}

/* Remove ::before animation that causes layout shifts */
.cta::before {
  /* content: ""; - REMOVED to prevent layout shifts */
  /* position: absolute; - REMOVED to prevent layout shifts */
  /* top: 0; - REMOVED to prevent layout shifts */
  /* left: -100%; - REMOVED to prevent layout shifts */
  /* width: 100%; - REMOVED to prevent layout shifts */
  /* height: 100%; - REMOVED to prevent layout shifts */
  /* background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); - REMOVED to prevent layout shifts */
  /* transition: var(--transition); - REMOVED to prevent layout shifts */
}

/* Remove hover animations that cause layout shifts */
.cta:hover::before {
  /* left: 100%; - REMOVED to prevent layout shifts */
}

.cta:hover {
  /* transform: translateY(-3px); - REMOVED to prevent layout shifts */
  box-shadow: var(--shadow-xl);
  text-decoration: none;
  color: white;
  /* Remove hover animations that cause layout shifts */
  transform: none !important;
}

.cta::after {
  content: "→";
  font-size: 1.25rem;
  /* Remove transition to prevent layout shifts */
  /* transition: var(--transition); - REMOVED to prevent layout shifts */
}

/* Remove hover animation that causes layout shifts */
.cta:hover::after {
  /* transform: translateX(4px); - REMOVED to prevent layout shifts */
}

/* === Sections === */
.section {
  padding: 4rem 0;
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section:nth-child(even) {
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-light);
}

/* === Cards Grid === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

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

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* === Pricing Styles === */
.price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: center;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  font-family: inherit;
  line-height: 1;
}

.price::before {
  content: "$";
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  font-family: inherit;
  line-height: inherit;
  display: inline-block;
  vertical-align: baseline;
}

.price-period {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light); /* Changed from text-muted for better contrast */
  margin-left: 0.25rem;
}

/* === Featured Card === */
.featured-card {
  border: 2px solid var(--primary);
  transform: scale(1.05);
  position: relative;
}

.featured-card::before {
  content: "Most Popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Maintenance Cards === */
.maintenance-card {
  text-align: center;
  padding: 1.5rem;
}

.maintenance-card .card-icon {
  margin: 0 auto 1rem auto;
}

.maintenance-card h3 {
  margin-bottom: 0.5rem;
}

.maintenance-card p {
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* === Growth Cards === */
.growth-card {
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.growth-card .card-icon {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-light) 100%
  );
}

/* === Custom Plan Text === */
.custom-plan-text {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.custom-plan-text strong {
  color: var(--text-dark);
}

/* === Features List === */
.features-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 1rem;
  color: var(--text-light);
}

.features-list li:last-child {
  border-bottom: none;
}

.features-list li::before {
  content: "✓";
  background: var(--success);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* === Testimonials === */
.testimonials {
  background: var(--white);
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
}

.testimonials::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23e2e8f0" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  opacity: 0.5;
}

.testimonials .section-header h2,
.testimonials .section-header p {
  color: var(--text-dark);
  position: relative;
  z-index: 1;
}

.testimonial-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  text-align: left;
  position: relative;
  z-index: 1;
  transition: var(--transition);
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 3rem;
  color: var(--gray-400); /* Changed from gray-300 for better contrast */
  font-family: serif;
  line-height: 1;
}

.testimonial-rating {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}

.testimonial-rating .star {
  color: #fbbf24;
  font-size: 1.125rem;
}

.testimonial-text {
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  color: var(--text-light);
  flex-grow: 1;
}

.testimonial-author {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.testimonial-company {
  font-size: 0.875rem;
  color: var(--text-light); /* Changed from text-muted for better contrast */
  font-weight: 500;
  margin-bottom: 1rem;
}

.testimonial-stats {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.testimonial-stat {
  text-align: center;
  flex: 1;
}

.testimonial-stat-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.testimonial-stat-label {
  font-size: 0.75rem;
  color: var(--text-light); /* Changed from text-muted for better contrast */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* === Footer === */
.footer {
  background: var(--gray-900);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
  color: white !important; /* Force white color with !important */
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--gray-50) !important; /* Slightly dimmed on hover */
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 1rem;
  text-align: center;
  color: white !important; /* Force white color with !important */
  font-size: 0.875rem;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* === Responsive Design === */
@media (max-width: 768px) {
  /* Mobile Navigation */
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 6rem 2rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    /* Ensure menu is hidden by default */
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
  }

  .nav-links.active {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-links a {
    display: block;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 1.125rem;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    /* Ensure links are properly styled */
    color: var(--text-dark);
    text-decoration: none;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links .nav-cta {
    margin-top: 1.5rem;
    text-align: center;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: var(--border-radius);
    min-height: 50px;
    justify-content: center;
  }

  /* Hero Section */
  .hero {
    min-height: auto;
    padding: 2rem 0;
    margin-top: 0;
    /* Prevent layout shift on mobile */
    height: auto;
    overflow: visible;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    /* Reserve space to prevent layout shift */
    min-height: 400px;
  }

  .hero-img {
    height: 200px;
    border-radius: var(--border-radius);
    /* Prevent layout shift on mobile */
    width: 100%;
    object-fit: cover;
    aspect-ratio: 16/10;
    min-height: 200px;
    max-height: 250px;
  }

  .hero-image {
    /* Reserve space to prevent layout shift */
    height: 200px;
    min-height: 200px;
    max-height: 250px;
    width: 100%;
  }

  .hero-stats {
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    /* Prevent layout shift on mobile */
    min-height: 80px;
    align-items: center;
  }

  .stat {
    min-width: 80px;
    /* Prevent layout shift on mobile */
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* Prevent font-based layout shifts on mobile */
  .hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    /* Reserve space */
    min-height: 3rem;
  }

  .hero-content p {
    font-size: 1.125rem;
    line-height: 1.6;
    /* Reserve space */
    min-height: 4rem;
  }

  /* Cards and Sections */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section-container {
    padding: 0 1.5rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .section-header p {
    font-size: 1.125rem;
  }

  /* Cards */
  .card {
    padding: 2rem;
    margin-bottom: 0;
  }

  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Pricing */
  .price {
    font-size: 3.5rem;
    gap: 0.15rem;
  }

  .price::before {
    font-size: inherit;
  }

  .price-period {
    font-size: 1.125rem;
  }

  .featured-card {
    transform: none;
    border-width: 3px;
  }

  .maintenance-card {
    padding: 1.5rem;
  }

  .custom-plan-text {
    font-size: 1.125rem;
    padding: 0 1rem;
  }

  /* Testimonials */
  .testimonial-card {
    padding: 1.5rem;
  }

  .testimonial-stats {
    gap: 1.5rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }

  .footer-container {
    padding: 0 1.5rem;
  }

  .footer-content {
    gap: 2rem;
  }

  /* CTA Buttons */
  .cta {
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  /* Mobile Navigation */
  .nav-links {
    width: 100%;
    padding: 5rem 1.5rem 2rem 1.5rem;
  }

  .nav-links a {
    padding: 1rem 0;
    font-size: 1rem;
  }

  .nav-links .nav-cta {
    padding: 1rem 1.5rem;
    margin-top: 1rem;
  }

  /* Hero Section */
  .hero {
    padding: 1.5rem 0;
  }

  .hero-container {
    gap: 1.5rem;
  }

  .hero-img {
    height: 150px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .stat {
    min-width: auto;
  }

  /* Cards and Sections */
  .section {
    padding: 1.5rem 0;
  }

  .section-container {
    padding: 0 1rem;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  .cards-grid {
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card-icon {
    width: 45px;
    height: 45px;
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 1.125rem;
  }

  /* Pricing */
  .price {
    font-size: 3.5rem;
  }

  .maintenance-card {
    padding: 1rem;
  }

  .custom-plan-text {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  /* Testimonials */
  .testimonial-card {
    padding: 1rem;
  }

  .testimonial-stats {
    gap: 1rem;
  }

  /* CTA Buttons */
  .cta {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 0 1rem;
  }

  .footer-container {
    padding: 0 1rem;
  }

  .footer-content {
    gap: 1.5rem;
  }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Reduce spacing between navbar and hero */
  .hero {
    padding-top: 1rem;
    margin-top: 0.5rem;
  }

  .hero-container {
    gap: 3rem;
    padding: 0 2rem;
    /* Fix tablet layout */
    grid-template-columns: 1fr 1fr;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
  }

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

  .section {
    padding: 4rem 0;
  }

  .section-container {
    padding: 0 2rem;
    max-width: 1000px;
    margin: 0 auto;
  }

  .cta {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
  }

  /* Fix tablet navigation spacing */
  .nav-container {
    padding: 0 2rem;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
  }

  .nav-links {
    gap: 2.5rem;
  }

  .nav-links .nav-cta {
    padding: 1rem 1.75rem;
    font-size: 1rem;
  }

  /* Fix tablet hero spacing */
  .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
  }

  .hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    line-height: 1.6;
  }

  .hero-stats {
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .stat {
    min-width: 100px;
    margin-bottom: 0.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 1rem;
  }

  /* Fix tablet card spacing */
  .card {
    padding: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .card p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
  }

  /* Fix tablet image sizing */
  .hero-image {
    height: 400px;
    min-height: 400px;
    max-height: 400px;
  }

  .hero-img {
    height: 400px;
    min-height: 400px;
    max-height: 400px;
  }

  /* Fix tablet section headers */
  .section-header {
    margin-bottom: 4rem;
  }

  .section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .section-header p {
    font-size: 1.25rem;
  }
}

/* Tablet Portrait Orientation (narrower tablets) */
@media (min-width: 769px) and (max-width: 900px) {
  /* Reduce spacing between navbar and hero */
  .hero {
    padding-top: 1rem;
    margin-top: 0.5rem;
  }

  .hero-container {
    gap: 2rem;
    padding: 0 1.5rem;
    /* Single column layout for narrower tablets */
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }

  .hero-content h1 {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
  }

  .hero-content p {
    font-size: 1.125rem;
    margin-bottom: 1.75rem;
  }

  .hero-stats {
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
  }

  .stat {
    min-width: 90px;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .hero-image {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    margin-top: 1.5rem;
  }

  .hero-img {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }

  /* Fix navigation for narrower tablets */
  .nav-container {
    padding: 0 1.5rem;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-links .nav-cta {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }

  /* Fix cards for narrower tablets */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    padding: 2rem;
    margin-bottom: 1.5rem;
  }

  .card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.875rem;
  }

  .card p {
    font-size: 1.0625rem;
    margin-bottom: 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-container {
    padding: 0 1.5rem;
    max-width: 800px;
    margin: 0 auto;
  }

  .section-header {
    margin-bottom: 3rem;
  }

  .section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
  }

  .section-header p {
    font-size: 1.125rem;
  }
}

/* Very Narrow Tablets (iPad Mini, etc.) */
@media (min-width: 769px) and (max-width: 820px) {
  /* Reduce spacing between navbar and hero */
  .hero {
    padding-top: 1rem;
    margin-top: 0.5rem;
  }

  .hero-container {
    gap: 1rem;
    padding: 0 0.75rem;
    /* Single column layout */
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .hero-stats {
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
  }

  .stat {
    min-width: 70px;
    margin-bottom: 0.5rem;
  }

  .hero-image {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    margin-top: 1rem;
  }

  .hero-img {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
  }

  /* Fix navigation for very narrow tablets */
  .nav-container {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.875rem;
    padding: 0.5rem 0;
  }

  .nav-links .nav-cta {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Fix cards for very narrow tablets */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .card {
    padding: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }

  .card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .section-container {
    padding: 0 0.75rem;
  }

  .cta {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* === Utility Classes === */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}

.hidden {
  display: none;
}
.block {
  display: block;
}
.flex {
  display: flex;
}
.grid {
  display: grid;
}

.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}

.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}

.rounded {
  border-radius: var(--border-radius);
}
.rounded-lg {
  border-radius: var(--border-radius-lg);
}

.shadow {
  box-shadow: var(--shadow);
}
.shadow-lg {
  box-shadow: var(--shadow-lg);
}
.shadow-xl {
  box-shadow: var(--shadow-xl);
}

/* === Contact Form Styles === */
.contact-form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

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

.form-help {
  font-size: 0.875rem;
  color: var(--text-light); /* Changed from text-muted for better contrast */
  margin-top: 0.25rem;
  line-height: 1.4;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-light);
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.submit-btn {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
  font-size: 1.125rem;
  padding: 1.25rem 2rem;
}

/* === Responsive Form === */
@media (max-width: 768px) {
  .contact-form-container {
    padding: 2rem;
    margin: 0 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-form {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .contact-form-container {
    padding: 1.5rem;
  }

  .submit-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

/* === Blog Card Styles === */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.blog-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.blog-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.3;
}

.blog-card-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.blog-date {
  color: var(--text-light); /* Changed from text-muted for better contrast */
  font-weight: 500;
}

.blog-category {
  background: var(--gray-100);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  align-self: flex-start;
}

.blog-read-more:hover {
  color: var(--accent);
  text-decoration: none;
}

/* === Blog Post Styles === */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.blog-post-header p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.blog-post-content {
  line-height: 1.8;
  color: var(--text-light);
}

.blog-post-content h2 {
  color: var(--text-dark);
  margin: 2.5rem 0 1rem 0;
  font-size: 1.5rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
}

.blog-post-content strong {
  color: var(--text-dark);
  font-weight: 600;
}

.blog-post-cta {
  background: var(--gray-50);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin: 3rem 0;
  border: 1px solid var(--gray-200);
}

.blog-post-cta h2 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.blog-post-cta p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.blog-post-cta .cta {
  margin-bottom: 0;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.blog-back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.blog-back-link::before {
  content: "←";
  font-size: 1.25rem;
}

/* === Responsive Blog Styles === */
@media (max-width: 768px) {
  .blog-card-image {
    height: 150px;
  }

  .blog-card-content {
    padding: 1rem;
  }

  .blog-card-content h3 {
    font-size: 1.125rem;
  }

  .blog-card-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .blog-post {
    padding: 1rem;
  }

  .blog-post-header h1 {
    font-size: 2rem;
  }

  .blog-post-header p {
    font-size: 1.125rem;
  }

  .blog-post-content h2 {
    font-size: 1.25rem;
  }

  .blog-post-cta {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  .blog-hero-image {
    height: 200px;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-card-image {
    height: 120px;
  }

  .blog-card-content {
    padding: 0.75rem;
  }

  .blog-card-content h3 {
    font-size: 1rem;
  }

  .blog-post {
    padding: 0.5rem;
  }

  .blog-post-header h1 {
    font-size: 1.75rem;
  }

  .blog-post-header p {
    font-size: 1rem;
  }

  .blog-post-content h2 {
    font-size: 1.125rem;
  }

  .blog-post-cta {
    padding: 1rem;
    margin: 1.5rem 0;
  }

  .blog-hero-image {
    height: 150px;
    margin-bottom: 1rem;
  }
}

/* === Blog Hero Image === */
.blog-hero-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.blog-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-hero-image:hover img {
  transform: scale(1.02);
}

/* === Speed Index Optimizations === */
/* Optimize above-the-fold content for faster visual loading */
.hero {
  /* Ensure hero loads quickly */
  contain: layout style paint;
  will-change: auto;
}

.hero-container {
  /* Optimize layout containment */
  contain: layout style;
}

.hero-content {
  /* Prioritize text rendering */
  text-rendering: optimizeSpeed;
  font-display: swap;
}

.hero-image {
  /* Optimize image rendering */
  contain: layout style paint;
  will-change: auto;
}

/* === Accessibility Improvements === */
.nav-links a:focus,
.cta:focus,
.card:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--border-radius);
}

/* Improve focus visibility for interactive elements */
.nav-links a:focus-visible,
.cta:focus-visible,
.card:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Ensure sufficient color contrast for all text */
.card p,
.section-header p,
.testimonial-text,
.blog-post-content p {
  color: var(--text-light);
  line-height: 1.7;
}

/* Override footer text specifically - more specific than general p rule */
.footer .footer-section p,
.footer .footer-section a,
.footer .footer-bottom {
  color: white !important;
}

/* Specifically target the copyright paragraph */
.footer .footer-bottom p {
  color: white !important;
}

/* Improve button contrast */
.cta,
.nav-links .nav-cta {
  color: white !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Mobile Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 1rem 0;
    margin-top: 0;
  }

  .hero-container {
    gap: 1.5rem;
    min-height: 300px;
  }

  .hero-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-img {
    height: 150px;
    min-height: 150px;
    max-height: 150px;
  }

  .hero-image {
    height: 150px;
    min-height: 150px;
    max-height: 150px;
  }

  .hero-stats {
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .stat {
    min-width: 70px;
    min-height: 50px;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.875rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .section-container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .cta {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  /* Adjust mobile menu for landscape */
  .nav-links {
    width: 250px;
    padding: 4rem 1.5rem 1.5rem 1.5rem;
  }

  .nav-links a {
    padding: 1rem 0;
    font-size: 1rem;
  }
}

/* Tablet Landscape Orientation */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  .hero-container {
    gap: 2.5rem;
    padding: 0 1.5rem;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .hero-content h1 {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
  }

  .hero-content p {
    font-size: 1.125rem;
    margin-bottom: 1.75rem;
  }

  .hero-stats {
    gap: 2rem;
    margin-top: 1.75rem;
  }

  .stat {
    min-width: 90px;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .hero-image {
    height: 350px;
    min-height: 350px;
    max-height: 350px;
  }

  .hero-img {
    height: 350px;
    min-height: 350px;
    max-height: 350px;
  }

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

  .section {
    padding: 3rem 0;
  }

  .nav-container {
    padding: 0 1.5rem;
  }

  .nav-links {
    gap: 2rem;
  }
}

/* Desktop Optimization */
@media (min-width: 1025px) {
  .hero-container {
    gap: 4rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
  }

  .hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }

  .hero-stats {
    gap: 3rem;
    margin-top: 2rem;
  }

  .stat {
    min-width: 120px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 1rem;
  }

  .hero-image {
    height: 450px;
    min-height: 450px;
    max-height: 450px;
  }

  .hero-img {
    height: 450px;
    min-height: 450px;
    max-height: 450px;
  }

  .section {
    padding: 5rem 0;
  }

  .section-container {
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .card {
    padding: 3rem;
  }

  .card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .card p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
  }

  .cta {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
  }

  .nav-container {
    padding: 0 2rem;
    gap: 1rem;
  }

  .nav-links {
    gap: 2.5rem;
  }

  .nav-links .nav-cta {
    padding: 1rem 1.75rem;
    font-size: 1rem;
  }
}

/* === Additional Responsive Fixes === */

/* Ensure contact form doesn't overflow on small screens */
@media (max-width: 480px) {
  .contact-form-container {
    padding: 1rem;
    margin: 0 0.5rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 0.875rem;
  }

  .submit-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    width: 100%;
  }
}

/* Ensure blog cards don't have text overflow */
.blog-card-content h3 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.blog-card-content p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure pricing doesn't overflow on small screens */
.price {
  word-break: keep-all;
  white-space: nowrap;
}

/* Ensure testimonials don't overflow */
.testimonial-text {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure hero stats don't wrap awkwardly */
.hero-stats {
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  flex-shrink: 0;
  min-width: 80px;
}

/* Ensure navigation doesn't break on very small screens */
@media (max-width: 360px) {
  .nav-container {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .nav-links .nav-cta {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Ensure footer text doesn't overflow */
.footer-section p,
.footer-section a {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure CTA buttons don't overflow */
.cta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Ensure form labels don't overflow */
.form-group label {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure blog post content is readable */
.blog-post-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.blog-post-content h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure section headers don't overflow */
.section-header h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.section-header p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}
