/* ==========================================================================
   BizLaunchTech — Responsive / Media Query Styles
   Mobile & tablet breakpoints. Loaded AFTER style.css so these
   overrides take priority. Do not add non-media-query rules here —
   base/global styles belong in style.css.
   ========================================================================== */


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  /* Text first, laptop image second on tablet/mobile (was previously reversed) */

  .includes-grid,
  .whyus-grid,
  .services-grid,
  .portfolio-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .whyus-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid,
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-card {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .industries-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonial-track {
    grid-template-columns: repeat(3, minmax(320px, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.open {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 20px;
  }

  .main-nav ul li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .header-actions .btn-sm {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 70px 0;
  }

  .section-sub {
    margin-bottom: 34px;
  }
}

@media (max-width: 700px) {
  .includes-grid,
  .whyus-grid,
  .services-grid,
  .portfolio-grid,
  .pricing-grid,
  .process-grid,
  .step-grid,
  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .whyus-grid.four-col {
    grid-template-columns: 1fr;
  }

  .stats-card {
    grid-template-columns: 1fr 1fr;
    padding: 32px 20px;
  }

  .stat-number {
    font-size: 32px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .quote-form-card {
    padding: 24px;
  }

  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-track {
    grid-template-columns: 100%;
  }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px;
  }

  .hero {
    padding: 50px 0 60px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .cta-banner .hero-buttons.center {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }

  h1 {
    font-size: 32px !important;
  }

  .section-title {
    font-size: 26px !important;
  }
}

/* Respect reduced-motion preference — pause the hero laptop's float/tilt animation */
@media (prefers-reduced-motion: reduce) {
  .hero-media img {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
@media (max-width: 860px) {
  .main-nav.open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-parent {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav .dropdown-menu {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav .dropdown-menu::before {
    display: none;
  }

  /* hover/focus must not open it on touch; only the tapped .open state does */
  .main-nav .nav-dropdown:hover > .dropdown-menu,
  .main-nav .nav-dropdown:focus-within > .dropdown-menu {
    transform: none;
    max-height: 0;
  }

  .main-nav .nav-dropdown.open > .dropdown-menu {
    transform: none;
    max-height: 300px;
  }

  .main-nav .dropdown-menu a {
    padding: 14px 0;
    border-radius: 0;
    white-space: normal;
  }

  .main-nav .dropdown-menu a:hover {
    background: none;
  }
}

/* ==========================================================================
   Mobile & tablet menu — floating, rounded, brand-blue panel
   (desktop nav is untouched; this only applies at <= 860px)
   ========================================================================== */
@media (max-width: 860px) {
  .main-nav {
    top: 84px;
    left: 16px;
    right: 16px;
    background: #0052CC;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0, 82, 204, 0.35), 0 4px 12px rgba(13, 20, 32, 0.12);
    /* closed state: fully hidden, slightly shrunk, pops in when opened */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.96);
    transform-origin: top right;
    transition: max-height 0.3s ease, opacity 0.25s ease,
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.25s;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .main-nav ul {
    padding: 12px 16px 14px;
  }

  .main-nav a,
  .nav-parent {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .main-nav a:hover,
  .nav-parent:hover,
  .nav-dropdown.open > .nav-parent {
    color: #fff;
  }

  /* active page: soft white pill instead of blue text (blue on blue is invisible) */
  .main-nav a.active {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding-left: 14px;
    padding-right: 14px;
    border-bottom-color: transparent;
  }

  .main-nav a:not(.active):hover {
    padding-left: 8px;
  }

  .main-nav ul > li:last-child > a,
  .main-nav ul > li:last-child > .nav-parent {
    border-bottom: 0;
  }

  /* Grow submenu sits on a slightly deeper tint */
  .main-nav .nav-dropdown.open > .dropdown-menu {
    background: rgba(0, 0, 0, 0.14);
    border-radius: 14px;
    padding: 4px 14px;
    margin: 4px 0 8px;
  }

  .main-nav .dropdown-menu a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-weight: 500;
  }

  .main-nav .dropdown-menu li:last-child a {
    border-bottom: 0;
  }
}
