/* ===================================
   HERO SECTION - APP-LIKE DENSITY
   Implementing research principles
   =================================== */

/* Tighter hero layout */
.hero-wrapper {
  padding: var(--space-4) 0 !important; /* 32px vs excessive default */
  min-height: auto !important;
}

/* Compact hero header */
.hero-header {
  padding: 0 var(--space-4) 0 var(--space-5) !important; /* 40px left, 32px right */
  margin-bottom: var(--space-3) !important; /* 24px */
}

/* Tighter hero title */
.hero-title-main {
  font-size: clamp(2rem, 5vw, 3.5rem) !important; /* Smaller than default */
  line-height: 1.15 !important; /* Much tighter */
  margin-bottom: var(--space-2) !important; /* 16px vs default */
  letter-spacing: var(--letter-spacing-tight) !important;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem) !important; /* More reasonable */
  line-height: var(--line-height-base) !important; /* 1.45 */
  margin-bottom: var(--space-3) !important; /* 24px */
  max-width: 600px !important;
}

/* Hero stats - more compact */
.hero-stats {
  gap: var(--space-2) !important; /* 16px */
  margin-top: var(--space-3) !important; /* 24px vs excessive default */
}

.stat-item {
  padding: var(--space-1) var(--space-2) !important; /* 8px 16px */
}

.stat-number {
  font-size: clamp(1.5rem, 3vw, 2rem) !important; /* Smaller */
  line-height: 1 !important;
  margin-bottom: var(--space-1) !important; /* 8px */
}

.stat-label {
  font-size: var(--font-size-secondary) !important; /* 14-15px */
  line-height: var(--line-height-base) !important;
}

/* Hero form - more compact */
.hero-form {
  padding: 0 !important;
}

.hero-form-container {
  padding: var(--space-3) !important; /* 24px vs excessive default */
  border-radius: 12px !important; /* Tighter radius */
}

.hero-form-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem) !important;
  margin-bottom: var(--space-2) !important; /* 16px */
  line-height: var(--line-height-tight) !important;
}

.hero-form-subtitle {
  font-size: var(--font-size-secondary) !important; /* 14-15px */
  line-height: var(--line-height-base) !important;
  margin-bottom: var(--space-2) !important; /* 16px */
}

.hero-form input,
.hero-form textarea {
  margin-bottom: var(--space-2) !important; /* 16px */
  font-size: 16px !important; /* iOS safe */
  padding: var(--space-1) var(--space-2) !important;
  border-radius: 8px !important;
}

.hero-submit-button {
  min-height: var(--touch-target-min) !important; /* 44px */
  padding: var(--space-1) var(--space-3) !important;
  font-size: var(--font-size-base) !important;
  border-radius: 8px !important;
  margin-top: var(--space-2) !important;
}

/* Services section - tighter spacing */
.services-section {
  padding: var(--space-5) 0 !important; /* 40px vs excessive default */
}

.services-header {
  margin-bottom: var(--space-4) !important; /* 32px */
}

.services-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  margin-bottom: var(--space-2) !important; /* 16px */
  line-height: var(--line-height-tight) !important;
}

.services-tag {
  font-size: var(--font-size-caption) !important; /* 13px */
  margin-bottom: var(--space-1) !important; /* 8px */
}

.services-hint {
  font-size: var(--font-size-secondary) !important;
  margin-top: var(--space-1) !important;
}

/* Service cards - more compact */
.services-grid {
  gap: var(--space-3) !important; /* 24px vs excessive default */
}

.service-item {
  height: auto !important; /* Remove fixed height */
  min-height: 280px !important; /* Increased for content */
}

.service-item-front {
  padding: var(--space-3) !important; /* 24px */
}

.service-item-back {
  padding: var(--space-1) var(--space-2) !important; /* 8px top/bottom, 16px sides */
  display: flex !important;
  align-items: center !important; /* Center content vertically */
}

.service-back-content {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
}

.service-back-title {
  font-size: clamp(1rem, 1.8vw, 1.25rem) !important; /* 16-20px */
  line-height: var(--line-height-tight) !important; /* 1.25 */
  margin: 0 0 var(--space-1) 0 !important; /* No top margin, 8px bottom */
  padding: 0 !important;
}

.service-title {
  font-size: clamp(1.125rem, 2vw, 1.375rem) !important; /* 18-22px */
  line-height: var(--line-height-tight) !important;
  margin-top: var(--space-2) !important;
}

.service-icon-wrapper {
  width: 48px !important; /* Smaller icon */
  height: 48px !important;
  margin-bottom: var(--space-2) !important;
}

.service-icon {
  width: 28px !important;
  height: 28px !important;
}

.service-description {
  font-size: 0.8125rem !important; /* 13px */
  line-height: 1.4 !important;
  margin: 0 0 var(--space-1) 0 !important; /* No top margin */
  padding: 0 !important;
  flex-grow: 1 !important;
}

.service-link {
  font-size: 0.8125rem !important; /* 13px */
  padding: var(--space-1) var(--space-2) !important;
  min-height: var(--touch-target-min) !important;
  margin-top: auto !important; /* Push to bottom */
  margin-bottom: 0 !important;
}

/* Portfolio section - tighter */
.portfolio-section {
  padding: var(--space-5) 0 !important;
}

.portfolio-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  margin-bottom: var(--space-2) !important;
  line-height: var(--line-height-tight) !important;
}

.portfolio-grid {
  gap: var(--space-3) !important;
  margin-top: var(--space-4) !important;
}

/* Testimonials - more compact */
.testimonials-section {
  padding: var(--space-5) 0 !important;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  margin-bottom: var(--space-2) !important;
  line-height: var(--line-height-tight) !important;
}

.testimonial-card {
  padding: var(--space-3) !important;
}

.testimonial-text {
  font-size: var(--font-size-base) !important;
  line-height: var(--line-height-base) !important;
  margin-bottom: var(--space-2) !important;
}

.testimonial-author {
  font-size: var(--font-size-secondary) !important;
}

/* Blog section - compact */
.hp-blog-section {
  padding: var(--space-5) 0 !important;
}

.hp-blog-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  margin-bottom: var(--space-2) !important;
  line-height: var(--line-height-tight) !important;
}

.hp-blog-grid {
  gap: var(--space-3) !important;
  margin-top: var(--space-4) !important;
}

.hp-blog-mag-card {
  padding: var(--space-2) !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  /* Even tighter on mobile per research */
  .hero-wrapper {
    padding: var(--space-3) 0 !important; /* 24px */
  }

  .hero-header {
    padding: 0 !important; /* Reset padding on mobile - centered text doesn't need left padding */
    margin-bottom: var(--space-2) !important; /* 16px */
  }

  .hero-title-main {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    line-height: 1.15 !important;
    margin-bottom: var(--space-1) !important; /* 8px */
  }

  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: var(--space-2) !important;
  }

  .services-section,
  .portfolio-section,
  .testimonials-section,
  .hp-blog-section {
    padding: var(--space-4) 0 !important; /* 32px on mobile */
  }

  .services-grid,
  .portfolio-grid,
  .hp-blog-grid {
    gap: var(--space-2) !important; /* 16px on mobile */
  }

  /* Stack hero on mobile for density */
  .hero-wrapper {
    grid-template-columns: 1fr !important;
    gap: var(--space-3) !important;
  }

  .hero-form {
    max-width: 100% !important;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-wrapper {
    padding: var(--space-4) 0 !important;
  }

  .services-section,
  .portfolio-section,
  .testimonials-section {
    padding: var(--space-5) 0 !important;
  }
}

/* Desktop - still compact but comfortable */
@media (min-width: 936px) {
  .hero-wrapper {
    padding: var(--space-6) 0 !important; /* 48px max */
  }

  .hero-form {
    margin-top: calc(var(--space-8) + 35px) !important; /* 99px - push down below navbar */
  }

  .hero-form-container {
    padding: var(--space-2) !important; /* 16px - smaller on desktop */
  }

  .hero-form-title {
    font-size: 1.375rem !important; /* 22px - smaller */
    margin-bottom: var(--space-1) !important; /* 8px */
  }

  .hero-form-subtitle {
    margin-bottom: var(--space-1) !important; /* 8px */
  }

  .hero-form input,
  .hero-form textarea {
    margin-bottom: var(--space-1) !important; /* 8px */
  }

  .hero-submit-button {
    margin-top: var(--space-1) !important; /* 8px */
  }

  /* Service cards - better desktop spacing */
  .service-item {
    min-height: 320px !important; /* Taller on desktop */
  }

  .service-item-back {
    padding: var(--space-3) !important; /* 24px all sides on desktop */
    align-items: flex-start !important; /* Top align instead of center */
  }

  .service-back-title {
    font-size: 1.25rem !important; /* 20px on desktop */
  }

  .service-description {
    font-size: 0.875rem !important; /* 14px on desktop */
    line-height: 1.5 !important; /* More comfortable on desktop */
  }

  .service-link {
    font-size: 0.875rem !important; /* 14px on desktop */
  }

  .services-section,
  .portfolio-section,
  .testimonials-section {
    padding: var(--space-6) 0 !important;
  }
}
