/* ==========================================================================
   Lubcom Tech Solutions - Complete Mobile-First Responsive Stylesheet
   Fully Responsive for All Phones, Tablets, Laptops & Desktops
   ========================================================================== */

/* 1. Large Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .hero-title {
    font-size: 2.2rem;
  }

  .systems-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  /* Full Screen Slide-in Mobile Menu at 1024px */
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 12px;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease-in-out, visibility 0.25s ease-in-out;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
    border-top: 2px solid var(--border);
  }

  .nav-menu.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1rem;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
    color: var(--brand-black);
  }

  .nav-link.active {
    border-bottom: 2px solid var(--brand-red);
    color: var(--brand-blue);
  }

  .mobile-only-action {
    display: block;
    width: 100%;
    margin-top: 8px;
  }

  .mobile-nav-toggle {
    display: block;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--brand-black);
  }

  .nav-actions .btn-quote {
    display: none;
  }
}

/* 2. Tablets & Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
  .announcement-inner {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .announcement-left, .announcement-right {
    justify-content: center;
    gap: 12px;
  }

  .main-header {
    position: sticky;
    top: 0;
  }

  .nav-wrapper {
    height: 68px;
  }

  .site-logo-img {
    height: 38px;
    max-width: 180px;
  }

  .floating-wa-btn {
    bottom: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .floating-chat-btn {
    bottom: 14px;
    right: 14px;
    height: 32px;
    padding: 0 10px;
    font-size: 0.74rem;
    gap: 5px;
  }

  .chat-widget-box {
    bottom: 52px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    height: 420px;
  }

  /* Hero Mobile */
  .hero-section {
    padding: 40px 0 45px;
  }

  .hero-title {
    font-size: 1.95rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  /* Stats Grid 2-columns on tablets */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-card,
  .stat-item {
    padding: 18px 16px;
    gap: 14px;
  }

  .stat-icon-wrapper {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }

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

  /* Services Grid 1-column on mobile */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .programs-grid {
    grid-template-columns: 1fr;
  }

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

  /* Vertical Stepper on mobile */
  .tracker-stepper {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }

  .tracker-stepper::before {
    top: 0;
    bottom: 0;
    left: 20px;
    right: auto;
    width: 2px;
    height: 100%;
  }

  .step-item {
    flex-direction: row;
    gap: 14px;
    text-align: left;
  }

  .step-icon {
    width: 40px;
    height: 40px;
  }

  /* Footer Centered on Mobile Devices */
  .main-footer {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-col .brand-logo {
    display: inline-flex;
    justify-content: center;
    margin: 0 auto 14px;
  }

  .footer-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
  }

  .footer-col-title {
    text-align: center;
    margin: 0 auto 14px;
    display: inline-block;
  }

  .footer-links {
    align-items: center;
    text-align: center;
    padding: 0;
    width: 100%;
  }

  .footer-link {
    justify-content: center;
    text-align: center;
  }

  .footer-contact-item {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  #footerNewsletterForm {
    justify-content: center;
    max-width: 320px;
    margin: 0 auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 75px;
    flex-wrap: wrap;
  }

  .footer-copyright-text {
    white-space: normal;
    text-align: center;
  }

  .footer-visitor-box {
    margin: 0 auto;
    justify-content: center;
  }

  /* Callout banners & sub-grids */
  .section div[style*="grid-template-columns: 1.2fr 0.8fr"],
  .section div[style*="grid-template-columns: 1.15fr 0.85fr"],
  .section div[style*="grid-template-columns: 1fr 1.15fr"],
  .section div[style*="grid-template-columns: 1.15fr 1fr"],
  .section div[style*="grid-template-columns: 1fr 1.2fr"],
  .section div[style*="grid-template-columns: 1fr 1.1fr"],
  .section div[style*="grid-template-columns: 1fr 1fr"],
  .section div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Form grids on mobile */
  form div[style*="grid-template-columns: 1fr 1fr"],
  form div[style*="grid-template-columns: 1.2fr 0.8fr"],
  form div[style*="grid-template-columns: 1fr 1fr 1fr"],
  form div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .section div[style*="padding:36px"],
  .section div[style*="padding: 36px"],
  .section div[style*="padding:32px"],
  .section div[style*="padding: 32px"],
  .section div[style*="padding:28px"],
  .section div[style*="padding: 28px"] {
    padding: 20px 16px !important;
  }

  /* Universal table & container scrolling */
  .table-responsive,
  .budget-table-wrapper,
  div[style*="overflow-x:auto"],
  div[style*="overflow-x: auto"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
  }

  .activities-container,
  .tracker-box,
  .system-card,
  .service-card,
  .program-card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* 3. Small Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .announcement-bar {
    padding: 6px 0;
    font-size: 0.76rem;
  }

  .announcement-link {
    font-size: 0.76rem;
  }

  .badge-social-enterprise {
    font-size: 0.7rem;
    padding: 2px 7px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .tracker-input-group {
    flex-direction: column;
  }

  .tracker-input-group .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .system-card-preview {
    height: 160px;
  }

  .system-card-body {
    padding: 16px;
  }

  .system-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .system-card-footer .btn {
    width: 100%;
  }

  .modal-content {
    margin: 10px;
    max-width: calc(100vw - 20px);
    max-height: 95vh;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  /* Force single column for option checkboxes on small phones */
  div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}
