/* ==========================================================================
   RESPONSIVE STYLES - MOBILE FIRST APPROACH
   ========================================================================== */

/* ==========================================================================
   BASE MOBILE STYLES (320px - 767px)
   Applied to all screen sizes, overridden by larger breakpoints
   ========================================================================== */

/* Container adjustments for mobile */
.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Typography adjustments for mobile */
h1 {
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.75rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.4;
}

h4 {
  font-size: 1.125rem;
  line-height: 1.4;
}

p {
  font-size: 1rem;
  line-height: 1.6;
}

/* ==========================================================================
   MOBILE NAVIGATION
   ========================================================================== */

/* Logo - Mobile */
.logo-icon img {
  height: 40px;
}

.logo-text img {
  height: 32px;
}

/* Hide desktop navigation, show mobile menu */
.nav-links {
  display: none;
}

/* Mobile menu button */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  min-width: 44px;
  min-height: 44px;
  z-index: 1001;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 20px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

/* Hamburger animation when menu is open */
.mobile-menu-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Mobile navigation overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-nav-overlay .nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease 0.1s, opacity 0.3s ease 0.1s;
}

.mobile-nav-overlay.active .nav-links {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-overlay .nav-links a {
  font-size: 1.5rem;
  padding: 1rem;
  color: var(--text-light);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-overlay .cta-button {
  margin-top: 2rem;
  padding: 1rem 2rem;
  min-height: 44px;
  font-size: 1.125rem;
}

/* ==========================================================================
   HERO SECTION - MOBILE
   ========================================================================== */

.hero {
  padding: 3rem 0;
  text-align: center;
}

.hero-content {
  max-width: 100%;
}

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

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

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-cta .button,
.hero-cta .cta-button {
  width: 100%;
  min-height: 44px;
  padding: 1rem;
  font-size: 1rem;
}

/* Hero stats - stack vertically on mobile */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

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

.stat-number {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

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

/* ==========================================================================
   GRID LAYOUTS - MOBILE (Single Column)
   ========================================================================== */

.grid,
.features-grid,
.use-cases-grid,
.benefits-grid,
.pricing-grid,
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.testimonials-grid {
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Vision & Mission - Mobile (1 column) */
.vision-mission-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.about-us-narrative {
  margin-bottom: 1.5rem;
}

/* Use Cases Narrative - Mobile */
.use-cases-narrative {
  padding: 1.5rem 0 1rem 0;
}

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

/* Use Case Section - Mobile */
.use-case {
  padding-top: 1.5rem;
}

/* Use Case Achievement - Mobile */
.use-case-achievement {
  padding: 1.5rem;
}

.use-case-achievement h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.use-case-achievement p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.about-us-narrative h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.about-us-narrative p {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.vision-card,
.mission-card,
.philosophy-card {
  padding: 1.5rem;
}

.vm-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.vision-card h3,
.mission-card h3,
.philosophy-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.vision-card p,
.mission-card p,
.philosophy-card p {
  font-size: 0.95rem;
}

.values-section {
  padding-top: 1.5rem;
}

.values-section > h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.value-icon {
  font-size: 2rem;
}

/* Feature cards */
.feature-card,
.use-case-card,
.benefit-card,
.testimonial-card,
.pricing-card,
.team-card {
  padding: 1.5rem;
}

/* ==========================================================================
   USE CASE SECTION - MOBILE
   ========================================================================== */

.use-case-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.use-case-image {
  width: 100%;
  height: auto;
  order: 1;
}

.use-case-content {
  order: 2;
}

.use-case-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.use-case-content ul {
  padding-left: 1.25rem;
}

.use-case-content li {
  margin-bottom: 0.75rem;
}

/* Features Grid - Mobile */
.features-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-item {
  padding: 1.5rem;
}

.feature-icon {
  font-size: 2.5rem;
}

/* Results Section - Mobile */
.use-case-results {
  padding: 2rem 1.5rem;
}

.use-case-results h3 {
  font-size: 1.5rem;
}

.results-table {
  font-size: 0.85rem;
}

.results-table thead th,
.results-table tbody td {
  padding: 0.75rem 0.5rem;
}

/* ==========================================================================
   PROCESS TIMELINE - MOBILE (Vertical)
   ========================================================================== */

.process-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 2rem;
}

/* Vertical line for mobile timeline */
.process-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.process-step {
  position: relative;
}

.step-number {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.125rem;
  z-index: 1;
}

.step-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.step-content p {
  font-size: 0.9375rem;
}

/* ==========================================================================
   CLIENTS SECTION - MOBILE
   ========================================================================== */

.clients-grid {
  grid-template-columns: 1fr;
  gap: 2rem;
}

.client-card {
  padding: 1.5rem;
}

.client-logo-link img {
  max-width: 160px;
  max-height: 60px;
}

/* ==========================================================================
   WHY GENESIS, PROCESS, INDUSTRIES - MOBILE
   ========================================================================== */

.why-content,
.process-content,
.industries-content {
  grid-template-columns: 1fr;
  gap: 2rem;
}

.why-text,
.process-text,
.industries-text {
  padding: 2rem;
}

.why-text h3,
.process-text h3,
.industries-text h3 {
  font-size: 1.5rem;
}

.why-text p,
.process-text p,
.industries-text p {
  font-size: 1rem;
}

.process-impact {
  padding: 1.5rem;
}

.process-impact h4 {
  font-size: 1.25rem;
}

.process-impact .timeline-text {
  font-size: 1rem;
}

.process-impact .highlight {
  padding: 0.2rem 0.5rem;
  font-size: 0.95rem;
}

.process-step {
  flex-direction: column;
  text-align: center;
  gap: 0.75rem;
  align-items: center;
}

.process-step-content {
  padding-top: 0;
}

.process-step-number {
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
}

/* ==========================================================================
   FORMS - MOBILE
   ========================================================================== */

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

.form-group {
  width: 100%;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  min-height: 44px;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

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

.form-submit {
  width: 100%;
  min-height: 44px;
  padding: 1rem;
  font-size: 1rem;
}

/* ==========================================================================
   FOOTER - MOBILE
   ========================================================================== */

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-column {
  width: 100%;
}

.footer-column h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  padding: 0.5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-bottom {
  flex-direction: column;
  text-align: center;
  gap: 1rem;
  padding-top: 1.5rem;
}

/* ==========================================================================
   TABLES - MOBILE
   ========================================================================== */

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

table {
  min-width: 600px;
  font-size: 0.875rem;
}

/* ==========================================================================
   UTILITY CLASSES - MOBILE
   ========================================================================== */

.hide-mobile {
  display: none;
}

.show-mobile {
  display: block;
}

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

/* ==========================================================================
   TABLET BREAKPOINT (768px - 1023px)
   ========================================================================== */

@media (min-width: 768px) {

  /* Container */
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 720px;
    margin: 0 auto;
  }

  /* Typography */
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Navigation - Show desktop nav, hide mobile menu */
  .mobile-menu-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
  }

  .mobile-nav-overlay {
    display: none;
  }

  /* Hero section */
  .hero {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.125rem;
  }

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

  .hero-cta .button,
  .hero-cta .cta-button {
    width: auto;
    padding: 1rem 2rem;
  }

  .hero-stats {
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
  }

  /* Grid layouts - 2 columns on tablet */
  .grid,
  .features-grid,
  .benefits-grid,
  .testimonials-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

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

  /* Vision & Mission - Tablet (2 columns) */
  .vision-mission-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .about-us-narrative {
    margin-bottom: 2rem;
  }

  .about-us-narrative h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .about-us-narrative p {
    font-size: 1.05rem;
  }

  /* Use Cases Narrative - Tablet */
  .use-cases-narrative {
    padding: 1.75rem 0 1.25rem 0;
  }

  .narrative-content p {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
  }

  /* Use Case Section - Tablet */
  .use-case {
    padding-top: 1.75rem;
  }

  /* Use Case Achievement - Tablet */
  .use-case-achievement {
    padding: 2rem;
  }

  .use-case-achievement h3 {
    font-size: 1.65rem;
    margin-bottom: 1.75rem;
  }

  .use-case-achievement p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }

  .vision-card,
  .mission-card,
  .philosophy-card {
    padding: 1.75rem;
  }

  .vm-icon {
    font-size: 2.75rem;
  }

  .vision-card h3,
  .mission-card h3,
  .philosophy-card h3 {
    font-size: 1.4rem;
  }

  .values-section {
    padding-top: 1.75rem;
  }

  .values-section > h3 {
    font-size: 1.65rem;
    margin-bottom: 1.75rem;
  }

  /* Features Grid - Tablet */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-item {
    padding: 2rem;
  }

  .feature-icon {
    font-size: 3rem;
  }

  /* Results Section - Tablet */
  .use-case-results {
    padding: 2.5rem;
  }

  .results-table {
    font-size: 0.9rem;
  }

  /* Use case section */
  .use-case-item {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .use-case-image {
    width: 50%;
    flex-shrink: 0;
  }

  .use-case-content {
    width: 50%;
  }

  /* Alternate layout for even items */
  .use-case-item:nth-child(even) .use-case-image {
    order: 2;
  }

  .use-case-item:nth-child(even) .use-case-content {
    order: 1;
  }

  /* Process timeline - Horizontal on tablet */
  .process-timeline {
    flex-direction: row;
    padding-left: 0;
    padding-top: 3rem;
    position: relative;
  }

  .process-timeline::before {
    left: 0;
    right: 0;
    top: 20px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .process-step {
    flex: 1;
  }

  .step-number {
    left: 50%;
    top: -2.5rem;
    transform: translateX(-50%);
  }

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

  /* Forms - 2 column layout for some fields */
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Clients Section - Tablet */
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  /* Why Genesis, Process, Industries - Keep stacked on tablet */
  .why-content,
  .process-content,
  .industries-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-group.full-width {
    grid-column: 1 / -1;
  }

  .form-submit {
    width: auto;
    min-width: 200px;
  }

  /* Footer - 2 columns */
  .footer-content {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .footer-column {
    width: calc(50% - 1rem);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  /* Utility classes */
  .hide-tablet {
    display: none;
  }

  .show-tablet {
    display: block;
  }

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

/* ==========================================================================
   DESKTOP BREAKPOINT (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {

  /* Container */
  .container {
    max-width: 1200px;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  /* Typography */
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  /* Hero section */
  .hero {
    padding: 6rem 0;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .hero-stats {
    gap: 4rem;
  }

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

  /* Grid layouts - 3-4 columns on desktop */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

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

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

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

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

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

  /* Vision & Mission - Desktop (3 columns) */
  .vision-mission-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  /* Use case section - larger on desktop */
  .use-case-item {
    gap: 3rem;
  }

  .use-case-image {
    width: 45%;
  }

  .use-case-content {
    width: 55%;
  }

  /* Why Genesis, Industries - Two column layout on desktop (text left, cards right) */
  .why-content,
  .industries-content {
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
  }

  /* Process - Two column layout on desktop (cards left, text right) */
  .process-content {
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
  }

  .why-text,
  .process-text,
  .industries-text {
    padding: 3rem;
  }

  .process-step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
  }

  .process-step-content {
    padding-top: 0.25rem;
  }

  /* Footer - 4 columns */
  .footer-content {
    flex-wrap: nowrap;
    gap: 3rem;
  }

  .footer-column {
    width: auto;
    flex: 1;
  }

  /* Utility classes */
  .hide-desktop {
    display: none;
  }

  .show-desktop {
    display: block;
  }

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

/* ==========================================================================
   LARGE DESKTOP BREAKPOINT (1440px+)
   ========================================================================== */

@media (min-width: 1440px) {

  .container {
    max-width: 1320px;
  }

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 3rem;
  }

  .hero h1 {
    font-size: 4rem;
  }

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

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

/* ==========================================================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ========================================================================== */

/* Ensure all interactive elements have adequate touch targets on mobile */
@media (max-width: 767px) {

  button,
  .button,
  .cta-button,
  a.button,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.5rem;
  }

  /* Increase tap target for links in navigation */
  nav a,
  .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Better spacing for form elements */
  input,
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

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

@media print {

  /* Hide navigation and interactive elements */
  nav,
  .mobile-menu-toggle,
  .mobile-nav-overlay,
  .cta-button,
  button {
    display: none;
  }

  /* Optimize for print */
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  /* Avoid page breaks inside elements */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  .feature-card,
  .use-case-card,
  .testimonial-card {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ========================================================================== */

@media (max-width: 767px) and (orientation: landscape) {

  .hero {
    padding: 2rem 0;
  }

  .mobile-nav-overlay {
    overflow-y: auto;
  }

  .process-timeline {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .process-step {
    width: 50%;
  }
}

/* ==========================================================================
   HIGH DPI / RETINA DISPLAYS
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {

  /* Add high-resolution styles here if needed */
  /* Example: higher quality images, sharper borders, etc. */

}

/* ==========================================================================
   REDUCED MOTION PREFERENCE
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mobile-nav-overlay,
  .mobile-nav-overlay .nav-links,
  .hamburger span {
    transition: none;
  }
}
