/* ==========================
   TABLET (max-width: 1024px)
========================== */
@media (max-width: 1024px) {

  /* Layout adjustments */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-box {
    height: 240px;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* ==========================
     PROFESSIONAL MOBILE / TAB NAV
  ========================== */

  .menu-toggle {
    display: block;
    font-size: 22px;
    color: #2563eb;
    cursor: pointer;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);

    /* FIX 1: height increased so mobile-contact shows */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav.active {
    max-height: 650px; /* 🔑 was 420px */
  }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .nav li {
    width: 100%;
    border-bottom: 1px solid #e2e8f0;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 16px 22px 16px 36px; /* 🔑 space for active bar */
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
    text-align: left;
    text-decoration: none;
  }

  .nav a:hover {
    background: #f8fafc;
  }
}

/* ==========================
   MOBILE (max-width: 768px)
========================== */
@media (max-width: 768px) {

  .hero {
    padding: 60px 0;
  }

  .hero-content h1 {
    font-size: 30px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .primary-btn {
    padding: 12px 22px;
  }

  .intro {
    padding: 40px 0;
  }

  .services-preview {
    padding: 60px 0;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .why-us {
    padding: 60px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }


  .footer {
    padding: 50px 0 25px;
  }
}

/* ==========================
   SMALL MOBILE (max-width: 480px)
========================== */
@media (max-width: 480px) {

  .logo h2 {
    font-size: 20px;
  }

  .hero-content h1 {
    font-size: 26px;
  }

  .hero-box {
    height: 200px;
  }

  .service-card {
    padding: 24px;
  }

  .why-box h3 {
    font-size: 16px;
  }

  .footer p {
    font-size: 13px;
  }
}

.menu-toggle {
  line-height: 1;
  user-select: none;
}

/* ==========================
   ACTIVE MOBILE NAV ITEM (FINAL – SINGLE SOURCE)
========================== */
@media (max-width: 1024px) {

  .nav a.active {
    position: relative;
    font-weight: 600;
    color: #2563eb;
    background: #f8fafc;
  }

  .nav a.active::before {
    content: '';
    position: absolute;
    left: 16px;               /* 🔑 visible inside */
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #2563eb;
    border-radius: 4px;
  }
}

/* =====================
   SOFTWARE WE USE (RESPONSIVE FIX)
===================== */
.software-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .software-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .software-grid {
    grid-template-columns: 1fr;
  }

  .software-card {
    padding: 28px 22px;
  }
}

/* =====================
   PAGE HERO ALIGNMENT FIX
===================== */
@media (max-width: 1200px) {
  .page-hero {
    padding: 60px 0;
  }

  .page-hero h1 {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 50px 0;
  }

  .page-hero h1 {
    font-size: 28px;
  }

  .page-hero p {
    font-size: 15px;
  }
}

/* ==========================
   MOBILE / TAB NAV CONTACT (FINAL)
========================== */
@media (max-width: 1024px) {

  /* hide desktop contact */
  .header-contact {
    display: none !important;
  }

  /* show mobile nav contact */
  .mobile-contact {
    display: block;
    padding: 20px 22px;
    border-top: 1px solid #e2e8f0;
    margin-top: 12px;
  }

  .mobile-contact span,
  .mobile-contact a {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #0f172a;
    text-decoration: none;
  }

  .mobile-contact .cta-btn {
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }
}

/* Mobile & Tablet Header Fix */
/* @media (max-width: 1024px) {

    .header-flex {
        flex-wrap: wrap;
    }

    .header-contact {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    .header-contact span,
    .header-contact a {
        font-size: 14px;
    }

    .cta-btn {
        display: inline-block;
        padding: 10px 14px;
        font-size: 14px;
    }
} */


@media (max-width: 1024px) {
  .nav ul {
    padding-top: 10px;
  }
}

.mobile-company-name {
  display: none;
}

/* ==========================
   MOBILE / TABLET HEADER LAYOUT
========================== */
.mobile-company-name {
  display: none;
}

@media (max-width: 1024px) {

  .header-flex {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  /* Logo - LEFT */
  .logo {
    justify-self: start;
  }

  /* Company Name - CENTER */
  .mobile-company-name {
    display: block;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.4px;
    white-space: nowrap;
  }

  /* Menu Toggle - RIGHT */
  .menu-toggle {
    justify-self: end;
    font-size: 22px;
  }
}
@media (max-width: 480px) {
  .mobile-company-name {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  .parallax {
    background-attachment: scroll;
  }
}
@media (max-width: 768px) {

  .hero-text,
  .hero-content {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding-right: 16px;
    padding-left: 16px;
    box-sizing: border-box;
  }

}
@media (max-width: 768px) {

  /* Reset hero text positioning */
  .hero-text,
  .hero-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
    height: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

}
/* =========================
   FINAL MOBILE HERO FIX
========================= */
@media (max-width: 768px) {

  /* HERO CONTAINER */
  .hero-slider,
  .page-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 0;
  }

  /* TEXT WRAPPER – HARD RESET */
  .hero-text,
  .hero-content {
    position: absolute !important;
    inset: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;

    transform: none !important;
    top: auto !important;
    left: auto !important;

    text-align: center !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
  }

  /* HEADING */
  .hero-text h1,
  .hero-content h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    margin: 0 0 12px 0 !important;
  }

  /* PARAGRAPH */
  .hero-text p,
  .hero-content p {
    font-size: 14px !important;
    line-height: 1.4 !important;
    max-width: 90% !important;
    margin: 0 !important;
  }

}
