/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */

/* Breakpoint 1: Desktop to Tablet (max-width: 991px) */
@media screen and (max-width: 991px) {
  /* Header & Navigation Drawer */
  .navbar-toggler {
    display: block;
  }

  .nav-menu-wrapper {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-color);
    box-shadow: 10px 0 20px rgba(0,0,0,0.05);
    border-right: 1px solid var(--border-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 24px;
    gap: 24px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
  }

  .nav-menu-wrapper.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: auto;
    gap: 15px;
  }

  .nav-item {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: auto;
  }

  .nav-link {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    justify-content: space-between;
  }

  /* Mobile Dropdown styles for services */
  .dropdown-toggle .mega-menu {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    border: none;
    background-color: var(--bg-alt);
    padding: 15px;
    border-radius: 6px;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    margin-top: 5px;
  }

  .dropdown-toggle.open .mega-menu {
    display: block;
  }

  .mega-menu-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mega-column h3 {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .mega-column ul {
    padding-left: 10px;
  }

  .mega-column ul li {
    margin-bottom: 6px;
  }

  .header-action {
    margin-left: 0;
    width: 100%;
    margin-top: 15px;
  }

  .quote-btn {
    width: 100%;
    justify-content: center;
  }

  /* Hamburger Toggle Animation */
  .navbar-toggler.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  
  .navbar-toggler.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .navbar-toggler.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* General Grid Layouts */
  .col-md-3 { width: 50%; }
  .col-md-4 { width: 50%; }
  .col-md-6 { width: 50%; }
  .col-md-7 { width: 100%; }
  .col-md-8 { width: 100%; }
  .col-md-9 { width: 100%; }

  /* We Offer Panel Mobile */
  .we-offerpanel .row {
    flex-direction: column;
    gap: 30px;
  }
  .tbaingbox {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 20px;
  }
  .tbaingbox .nav-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tbaingbox .nav-tabs a.active::after {
    display: none;
  }
  .tab-contantpanel {
    padding-left: 0;
  }

  /* Strategy process steps collapse on tablet */
  .strategy-stepbox {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  .strategy-stepbox::before {
    display: none; /* Hide top line on small screens */
  }

  /* Stats Panel */
  .company-tastimonialbox {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Testimonials */
  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer grid on tablet */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 35px 20px;
  }
}

/* Breakpoint 2: Tablet to Mobile (max-width: 767px) */
@media screen and (max-width: 767px) {
  .col-md-3, .col-md-4, .col-md-6 {
    width: 100%;
  }

  .panel-space {
    padding: 60px 0;
  }

  .comn-toptitle {
    font-size: 30px;
  }

  .bannr-title {
    font-size: 34px;
  }

  /* Strategy bottom box vector */
  .strategy-bottombox {
    flex-direction: column;
    text-align: center;
  }

  /* Core left panel */
  .our-coreleftbox {
    padding-right: 0;
    margin-bottom: 30px;
  }

  .project-slider {
    grid-template-columns: 1fr;
  }

  /* Testimonials */
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  /* Footer layout */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile footer accordion interaction */
  .footer-col-title {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center; /* Center header text */
    align-items: center;
    position: relative; /* Support absolute positioning of icon */
    text-align: center;
    padding-right: 30px;
    padding-left: 30px;
  }

  .footer-col-title::after {
    content: "\f067";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: var(--primary);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .footer-col-title.collapsed-active::after {
    content: "\f068";
  }

  .footer-links, .footer-contact-info {
    display: none;
    margin-bottom: 15px;
    padding-left: 0;
    text-align: center; /* Center list links text */
  }

  .footer-links.show, .footer-contact-info.show {
    display: block;
  }

  .footer-contact-info li {
    justify-content: center; /* Center icons + text in list items */
  }
}

/* Breakpoint 3: Small Mobile (max-width: 575px) */
@media screen and (max-width: 575px) {
  .container {
    padding: 0 16px;
  }

  .bannr-title {
    font-size: 28px;
  }

  .company-tastimonialbox {
    grid-template-columns: 1fr;
  }

  .works-list {
    grid-template-columns: 1fr;
  }

  .strategy-stepbox {
    grid-template-columns: 1fr;
  }

  .footer-bottom-flex {
    flex-direction: column;
    text-align: center;
  }
}
