/* ==========================================================================
   MS CHANDRAGUPT CONSTRUCTION — RESPONSIVE STYLESHEET
   Flawless adaptability across 1440px, 1200px, 1024px, 768px, 480px, 360px
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAPTOP & SMALL DESKTOP (max-width: 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  :root {
    --container-max: 1120px;
  }
  
  .hero-heading {
    font-size: 46px;
  }
  
  .hero-script-tag {
    font-size: 34px;
  }
  
  .services-grid,
  .projects-grid {
    gap: 18px;
  }
  
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 0.9fr 0.9fr;
    gap: 30px;
  }
}

/* --------------------------------------------------------------------------
   2. TABLET LANDSCAPE & MEDIUM SCREENS (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --header-height: 76px;
  }
  
  /* Navigation switch to Hamburger */
  .nav-menu,
  .header-actions .btn-quote-header {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 560px;
  }
  
  .hero-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }
  
  .hero-text-wrap {
    max-width: 100%;
  }
  
  .hero-heading {
    font-size: 42px;
  }
  
  .hero-badges-architectural {
    width: 100%;
    text-align: left;
    padding-right: 0;
  }
  
  .hero-script-tag {
    align-items: flex-start;
    flex-direction: row;
    gap: 20px;
    font-size: 30px;
  }
  
  .hero-script-tag span:nth-child(2),
  .hero-script-tag span:nth-child(3) {
    margin-right: 0;
  }
  
  /* Stats Card: 2x2 Grid */
  .stats-card-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px 30px;
    padding: 26px 28px;
  }
  
  .stat-item:nth-child(2)::after {
    display: none;
  }
  
  .stat-item:not(:last-child)::after {
    right: 0;
  }
  
  /* About Section Stack */
  .about-layout {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .about-quote-box {
    grid-column: 1 / -1;
    border-radius: var(--radius-md);
    padding: 28px 24px;
  }
  
  /* Services & Projects Grid: 2 Columns */
  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .project-img-box {
    aspect-ratio: 16 / 10;
    min-height: 200px;
  }
  
  /* Why Choose Us */
  .why-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .why-img-box {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    aspect-ratio: 16 / 11;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;
  }

  /* Subpage Fluid Grids (Tablet) */
  .subpage-split,
  .subpage-split.subpage-split-reverse {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .grid-4-col {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .contact-layout-split,
  .quote-layout-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* --------------------------------------------------------------------------
   3. TABLET PORTRAIT (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  /* Hide Custom Cursor on Touch Devices */
  .custom-cursor,
  .custom-cursor-follower {
    display: none !important;
  }
  
  /* Top Bar */
  .top-bar {
    font-size: 11.5px;
  }
  
  .top-bar .container {
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Logo text */
  .brand-title {
    font-size: 15px;
  }
  
  .brand-subtitle {
    font-size: 10px;
    letter-spacing: 1.4px;
  }
  
  .brand-emblem {
    height: 40px;
  }
  
  /* Hero */
  .hero-section {
    min-height: auto;
    padding: 30px 0 50px;
  }
  
  .hero-content {
    padding: 50px 0 70px;
  }
  
  .hero-heading {
    font-size: 34px;
    line-height: 1.15;
  }
  
  .hero-desc {
    font-size: 15px;
    margin-bottom: 26px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-script-tag {
    flex-direction: column;
    gap: 4px;
    font-size: 26px;
  }
  
  /* Statistics overlapping section */
  .statistics-section {
    margin-top: -35px;
  }
  
  .stats-card-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px 18px;
    gap: 20px 16px;
  }
  
  .stat-item {
    gap: 12px;
  }
  
  .stat-item::after {
    display: none !important;
  }
  
  .stat-icon-wrap {
    width: 44px;
    height: 44px;
  }
  
  .stat-icon-wrap svg {
    width: 22px;
    height: 22px;
  }
  
  .stat-counter {
    font-size: 28px;
  }
  
  .stat-suffix {
    font-size: 20px;
  }
  
  .stat-label {
    font-size: 12px;
  }
  
  /* Section Headers */
  .section-title {
    font-size: 28px;
  }
  
  .section-desc {
    font-size: 14.5px;
  }
  
  /* About Layout */
  .about-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .about-img-box {
    max-width: 440px;
    margin: 0 auto;
    aspect-ratio: 4/4;
  }
  
  .about-features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Section Top Bars */
  .services-top-bar,
  .projects-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  
  /* Why Reasons Grid */
  .why-reasons-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* CTA */
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  
  .cta-heading {
    font-size: 30px;
  }
  
  .btn-cta-contact {
    width: 100%;
    justify-content: center;
  }
  
  /* Modal */
  .project-modal-container {
    max-width: 95vw;
  }
  
  .modal-img-wrap {
    height: 240px;
  }
  
  .modal-body {
    padding: 24px 20px;
  }
  
  .modal-title {
    font-size: 21px;
  }
  
  .modal-meta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .modal-highlights-list {
    grid-template-columns: 1fr;
  }
  
  /* Lightbox buttons */
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-btn {
    width: 40px;
    height: 40px;
  }

  /* Subpage Fluid Grids & Global Overflow Protection (Mobile & Tablet Portrait) */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
  }

  .container,
  .container-wide {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .subpage-split,
  .subpage-split.subpage-split-reverse {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .subpage-split.subpage-split-reverse > div:first-child {
    order: 2;
  }
  .subpage-split.subpage-split-reverse > div:last-child {
    order: 1;
  }

  .grid-2-col,
  .grid-3-col,
  .grid-4-col {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .contact-layout-split,
  .quote-layout-split {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .responsive-img-box {
    aspect-ratio: 16 / 10;
    max-height: 290px;
  }

  /* WhatsApp & Back-to-Top Mobile Stacking */
  .whatsapp-float {
    bottom: 20px;
    right: 18px;
    padding: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  }
  .whatsapp-label {
    display: none;
  }
  .whatsapp-pulse {
    border-radius: 50%;
  }
  .back-to-top {
    bottom: 80px;
    right: 21px;
    width: 44px;
    height: 44px;
  }
}

/* --------------------------------------------------------------------------
   4. MOBILE SMALL (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --header-height: 66px;
  }
  
  .container,
  .container-wide {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .top-bar-item:nth-child(2) {
    display: none; /* Hide hours to fit screen cleanly */
  }
  
  .brand-title {
    font-size: 13.5px;
  }
  
  .brand-subtitle {
    font-size: 9px;
  }
  
  .brand-emblem {
    height: 36px;
  }
  
  .hero-heading {
    font-size: 29px;
  }
  
  .hero-desc {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .stats-card-container {
    grid-template-columns: 1fr 1fr;
    padding: 16px 12px;
    gap: 16px 10px;
  }
  
  .stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .stat-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }
  
  .stat-icon-wrap svg {
    width: 18px;
    height: 18px;
  }
  
  .stat-counter {
    font-size: 24px;
  }
  
  .stat-suffix {
    font-size: 18px;
  }
  
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile Responsive Image Boxes */
  .project-img-box {
    aspect-ratio: 16 / 10;
    min-height: 200px;
    height: auto;
    width: 100%;
  }

  .project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
  }

  .photo-img-wrap {
    aspect-ratio: 16 / 11;
    min-height: 210px;
    height: auto;
    width: 100%;
  }

  .media-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
  }

  .why-img-box {
    aspect-ratio: 16 / 11;
    max-height: 320px;
    width: 100%;
  }

  .why-img {
    object-position: center 15%;
  }

  .hero-slide-media {
    object-position: center center;
  }

  .team-card-img-wrap {
    aspect-ratio: 4 / 3;
    max-height: 280px;
    width: 100%;
  }

  .equipment-card-img-wrap {
    aspect-ratio: 16 / 10;
    max-height: 260px;
    width: 100%;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .page-hero-title {
    font-size: 30px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Hero Slider Controls & Field Media Mobile Adjustments */
  .hero-slide-badge {
    top: 14px;
    right: 14px;
    font-size: 9.5px;
    padding: 5px 10px;
  }

  .hero-slider-controls {
    padding: 10px 0 14px;
  }

  .hero-slide-label {
    display: none; /* Keep controls bar compact on mobile */
  }

  .hero-dot {
    width: 28px;
    height: 4px;
  }

  .hero-dot.active {
    width: 38px;
  }

  .media-tabs-nav {
    flex-direction: column;
    gap: 8px;
    border-radius: var(--radius-md);
    padding: 6px;
    margin: 24px 0 20px;
  }

  .media-tab-btn {
    width: 100%;
    padding: 11px 16px;
    font-size: 13px;
  }

  .subfilter-pill {
    padding: 6px 14px;
    font-size: 11.5px;
  }

  .gallery-photos-grid,
  .gallery-videos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .video-modal-backdrop {
    padding: 12px;
  }

  .video-modal-details {
    padding: 18px 16px 20px;
  }

  .video-modal-title {
    font-size: 17px;
  }

  .video-modal-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 22px;
  }

  .team-card-img-wrap {
    aspect-ratio: 16 / 11;
  }

  .equipment-card-img-wrap {
    aspect-ratio: 16 / 10;
  }
}

