/* Responsive CSS */

/* ==========================================================================
   Large Devices & Tablets Landscape (max-width: 992px)
   ========================================================================== */
@media (max-width: 992px) {
  /* Header & Navigation Mobile Menu Setup */
  .hamburger {
    display: flex;
    z-index: 1001; /* Keep above the sliding menu */
    position: relative;
  }
  
  /* Menu slide in from right */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: clamp(250px, 80vw, 350px);
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li a {
    color: var(--primary) !important;
    font-size: 1.25rem;
    padding: 10px;
    display: block;
  }

  .nav-actions {
    display: none; /* Hide top buttons on mobile menu for cleaner look, or move them inside nav-links */
  }

  /* Hamburger active state */
  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--primary); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--primary); }
  
  /* Hero Section */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    margin-top: 40px;
  }

  .hero-text {
    order: 1; /* Text on top */
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image-wrapper {
    order: 2; /* Image below */
    max-width: 600px;
    margin: 0 auto;
  }

  /* Grids - Tablet */
  .services-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ==========================================================================
   Tablets Portrait (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Grids - Tablet Portrait */
  .features-grid,
  .blog-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Split sections to 1 column */
  .about-split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Process Timeline */
  .process-timeline {
    flex-direction: column;
    gap: 40px;
  }

  .process-timeline::before,
  .process-line-active {
    display: none; /* Hide horizontal lines on mobile */
  }

  .process-step {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 20px;
  }

  .process-icon {
    margin: 0;
  }
}

/* ==========================================================================
   Mobile Devices (max-width: 576px)
   ========================================================================== */
@media (max-width: 576px) {
  /* All Grids to 1 column */
  .services-grid,
  .team-grid,
  .features-grid,
  .blog-grid,
  .gallery-grid,
  .stats-grid,
  .footer-top {
    grid-template-columns: 1fr;
  }

  /* Contact Form Adjustments */
  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Testimonials */
  .testimonial-card {
    padding: 20px;
  }
  
  /* Remove flex direction override on leadership card to let it stack */
  .director-card, .team-card {
    flex-direction: column !important;
  }
}

/* ==========================================================================
   Small Mobile Devices (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  /* Buttons stack vertically and take full width */
  .btn,
  .hero-buttons .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .hero-buttons {
    flex-direction: column;
  }
}
