.animate-up,
.animate-left,
.animate-right,
.animate-fade,
.hero-slide,
.industry-bg-wrapper img,
.logo-marquee-track,
.modal-content-box {
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

/* Fixes touch delays and tap highlights on mobile */
* {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* 
 * 1. LARGE LAPTOPS & SMALL DESKTOPS (Max 1200px)
 */
@media screen and (max-width: 1200px) {
  :root {
    --app-padding: 3rem;
  }

  /* Process Section - Reduce gap */
  .process-grid {
    gap: 3rem;
  }

  /* Services - Tweak overlapping ratios */
  /* Fix overlapping service cards for medium screens */
  .s-content.glass-card {
    grid-column: 5 / 13;
    padding: 2.5rem;
  }

  .service-showcase.reverse .s-content.glass-card {
    grid-column: 1 / 9;
  }
}

/* 
 * 2. TABLETS & IPADS (Max 992px)
 */
@media screen and (max-width: 992px) {

  :root {
    --app-padding: 2.5rem;
  }

  /* Reduce vertical padding on sections */
  section {
    padding: 6rem var(--app-padding);
  }

  .section-hero {
    padding-top: 8rem;
  }

  /* Stack Grids */
  .hero-grid,
  .editorial-grid,
  .proprietor-grid,
  .process-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-grid {
    text-align: center;
  }

  .hero-actions,
  .trust-metrics {
    justify-content: center;
  }

  .animate-up {
    text-align: left;
  }


  .trust-metrics {
    grid-template-rows: auto;
    /* background-color: aliceblue; */
  }

  /* About Section - Stack */
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .ed-text {
    order: -1;
    /* Puts text above the image on mobile */
  }

  /* Proprietor Section - Stack */
  .proprietor-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .proprietor-visual {
    max-width: 600px;
    margin: 0 auto;
    padding-left: 0;
  }

  /* Expertise (Bento Grid) - 2 Columns */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-item.span-2 {
    grid-column: span 2;
  }

  /* Process Section - Remove Sticky, Stack Layout */
  .process-grid {
    grid-template-columns: 1fr;
  }

  /* Process Timeline adjustments */
  .process-sticky {
    position: relative;
    top: 0;
    text-align: center;
    margin-bottom: 2rem;
  }

  /* Why Choose - 2 Columns */
  .why-card {
    grid-column: span 3;
  }

  .why-card.wide {
    grid-column: span 3;
    /* Forces them to be same width as top row */
  }

  /* Contact Section - Stack */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* 
 * 3. MOBILE PHONES & SMALL TABLETS (Max 768px)
 */
@media screen and (max-width: 768px) {
  :root {
    --app-padding: 1.5rem;
  }

  section {
    padding: 4rem var(--app-padding);
  }

  /* --- Navigation (Mobile Drawer) --- */
  .nav-menu {
    display: none;
  }

  .nav-cta .btn {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    gap: 1.5rem;
  }

  .nav-menu.mobile-open a {
    font-size: 1.1rem;
    color: var(--bg-dark);
    padding: 0.5rem 0;
  }

  /* Brand Logo Size */
  .brand-logo-img {
    height: 28px;
  }

  .brand-text {
    display: none;
  }

  /* Hide tagline to save space */

  /* --- Hero Visual --- */
  .hero-slider,
  .cover-img {
    height: 350px;
  }

  .glass-panel {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1rem;
  }

  /* --- Proprietor Section --- */
  .proprietor-img {
    height: 400px;
  }

  .experience-badge {
    left: 0;
    bottom: -2rem;
    width: calc(100% - 2rem);
    margin: 0 1rem;
    justify-content: center;
    padding: 1rem;
  }

  .proprietor-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .proprietor-actions .btn {
    width: 100%;
  }

  /* --- Services (Vertical Stack with Vertical Overlap) --- */
  .service-showcase,
  .service-showcase.reverse {
    display: flex;
    flex-direction: column;
  }

  .s-visual,
  .service-showcase.reverse .s-visual {
    width: 100%;
    border-radius: var(--radius-lg);
  }

  .s-visual img {
    height: 280px;
  }

  .s-content.glass-card,
  .service-showcase.reverse .s-content.glass-card {
    width: 92%;
    margin: -3rem auto 0;
    /* Creates vertical overlap over the image */
    padding: 1.5rem;
    position: relative;
    z-index: 2;
  }

  /* --- Process Timeline Mobile --- */
  .process-timeline-container {
    padding-left: 2rem;
  }

  .step-indicator {
    left: -2rem;
  }

  .step-dot {
    width: 12px;
    height: 12px;
    transform: translateX(-5px);
  }

  .step-content {
    padding: 1.5rem;
  }

  /* --- Expertise & Why Choose (1 Column) --- */
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-item.span-2 {
    grid-column: span 1;
  }

  .mission-cards,
  .form-row {
    grid-template-columns: 1fr;
  }

  .trust-metrics {
    flex-direction: column;
    gap: 1rem;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-card,
  .why-card.wide {
    grid-column: span 1;
    min-height: auto;
    padding: 1.5rem;
  }

  /* Always show Why Choose desc on mobile (no hover needed) */
  .why-bg {
    height: 100%;
  }

  .why-icon {
    color: var(--bg-dark);
    background: var(--accent);
  }

  .why-title {
    color: var(--text-light);
  }

  .why-desc {
    opacity: 1;
    transform: translateY(0);
  }

  .why-num {
    color: rgba(255, 255, 255, 0.1);
  }

  /* --- Industries (2 Columns for Square Cards) --- */
  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .industry-card {
    padding: 1rem 0.5rem;
  }

  .industry-card svg {
    width: 24px;
    height: 24px;
  }

  .industry-card span {
    font-size: 0.75rem;
  }

  /* --- Knowledge Scroller --- */
  .horizontal-scroller {
    gap: 1rem;
    scroll-padding-left: var(--app-padding);
    padding-right: var(--app-padding);
  }

  .news-card {
    width: 80vw;
    max-width: 320px;
    scroll-snap-align: center;
  }

  .news-img {
    height: 180px;
  }

  .news-img {
    height: 180px;
  }

  .news-content {
    padding: 1.25rem;
  }

  .scroll-btn {
    display: none;
  }

  /* --- Testimonials Scroller --- */
  .testi-card {
    width: 85vw;
    max-width: 320px;
    padding: 2rem;
    scroll-snap-align: center;
  }

  .t-btn {
    display: none;
  }

  .scroller-controls {
    gap: 1rem;
  }

  /* --- Contact Form --- */
  .app-form {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-text h2 {
    font-size: 2rem;
  }

  .testi-card {
    width: 85vw;
    max-width: 320px;
    padding: 2rem;
    scroll-snap-align: center;
  }

  .t-btn {
    display: none;
  }

  /* --- Footer --- */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .f-links {
    flex-direction: column;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
  }
}

/* 
 * 4. SMALL MOBILE PHONES (Max 480px)
 */
@media screen and (max-width: 480px) {

  /* Adjust Typography for tiny screens */
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .trust-metrics {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-actions,
  .hero-actions .btn,
  .proprietor-actions,
  .proprietor-actions .btn {
    flex-direction: column;
    width: 100%;
  }

  .mission-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .proprietor-img {
    height: 350px;
  }

  /* Ensure the sticky WhatsApp button doesn't block content */
  .whatsapp-sticky {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
  }

  .whatsapp-sticky svg {
    width: 26px;
    height: 26px;
  }

  /* Modal Popups Adjustment */
  .modal-content-box {
    padding: 1.5rem 1rem;
  }

  .modal-header h3 {
    font-size: 1.4rem;
  }

  .modal-text-card {
    padding: 1rem;
  }

}
