/* ==========================================================================
   MG GLASS (OPC) PVT. LTD. - Responsive Stylesheet
   Strict responsiveness for all screens from 320px up to 4K displays
   ========================================================================== */

/* Universal Safeguard against horizontal scroll on mobile */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* Large Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .nav-menu {
    display: none; /* Handled by mobile drawer */
  }

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

  .mobile-toggle {
    display: flex;
  }

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

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

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

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

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .client-logos-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .facility-card,
  .facility-card.reverse {
    grid-template-columns: 1fr;
  }

  .facility-media {
    min-height: 280px;
  }

  .facility-card.reverse .facility-media {
    order: 1;
  }

  .facility-card.reverse .facility-info {
    order: 2;
  }

  .presence-wrap {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

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

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

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

/* Tablets & Large Phones (max-width: 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 68px;
  }

  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 100% !important;
  }

  .section {
    padding: 2.2rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 1.55rem !important;
    line-height: 1.22 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  .page-banner {
    padding: calc(var(--header-height) + 2rem) 0 2.5rem;
  }

  .page-banner-title {
    font-size: 1.65rem !important;
    word-break: break-word !important;
  }

  .page-banner-desc {
    font-size: 0.92rem;
  }

  .top-bar {
    padding: 0.35rem 0;
    font-size: 0.72rem;
  }

  .top-bar-inner {
    justify-content: center;
    text-align: center;
  }

  .top-bar-contact {
    justify-content: center;
    gap: 0.35rem;
    flex-direction: column;
    align-items: center;
  }

  .top-bar-item {
    font-size: 0.74rem;
    justify-content: center;
  }

  .top-bar-badge {
    display: none; /* Hide badge on mobile to prevent stretching */
  }

  .navbar {
    height: var(--header-height);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .brand-logo {
    gap: 0.5rem;
  }

  .brand-logo img {
    height: 38px !important;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-tagline {
    display: none;
  }

  .mobile-toggle {
    display: flex !important;
  }

  .hero {
    height: 100vh;
    min-height: 500px;
    padding: 0;
  }

  .hero-title {
    font-size: 1.8rem !important;
    line-height: 1.16 !important;
    word-break: break-word !important;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding-top: 1.5rem;
  }

  .stat-item {
    text-align: center;
  }

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

  .stat-label {
    font-size: 0.72rem;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pillar-card {
    padding: 1.5rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .value-card {
    padding: 1.75rem 1.25rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .gallery-item {
    height: 160px;
  }

  .client-logos-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.75rem;
  }

  .client-logo-card {
    height: 80px;
    padding: 0.5rem;
  }

  .client-logo-card img {
    max-height: 42px;
  }

  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 40px !important;
    padding-right: 0 !important;
    text-align: left !important;
    margin-bottom: 1.75rem;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-dot {
    left: 5px !important;
    right: auto !important;
  }

  .timeline-box {
    padding: 1.25rem 1rem;
  }

  .facility-card {
    margin-bottom: 1.75rem;
  }

  .facility-info {
    padding: 1.75rem 1.25rem;
  }

  .facility-title {
    font-size: 1.4rem;
  }

  .facility-points {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .state-badges-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .landmark-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .sectors-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .machinery-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .mission-vision-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .about-overview-wrap {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .bespoke-wrap {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .qa-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .logistics-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .office-card {
    padding: 1.25rem;
  }

  .form-card {
    padding: 1.5rem 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .cta-banner {
    padding: 2.25rem 1.25rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .floating-actions {
    bottom: 1rem;
    right: 1rem;
  }

  .floating-btn {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
}

/* Small Phones (max-width: 480px) */
@media (max-width: 480px) {
  .client-logos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

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

  .gallery-item {
    height: 180px;
  }

  .product-body {
    padding: 1.25rem 1rem;
  }

  .product-footer {
    flex-direction: column;
  }

  .product-footer .btn {
    width: 100%;
  }

  .filter-tabs {
    gap: 0.4rem;
  }

  .filter-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
  }
}
