/* ============================================================
   AHALYA INVESTMENT LLC — RESPONSIVE STYLESHEET
   Mobile-first approach: base = mobile, then scale up
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   BREAKPOINTS:
   xs:  < 480px   (small phones)
   sm:  480–767px (large phones)
   md:  768–1023px (tablets)
   lg:  1024–1279px (small laptops)
   xl:  1280–1439px (standard desktops)
   2xl: ≥ 1440px   (wide screens)
   ══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   TOUCH DEVICE ENHANCEMENTS
   ══════════════════════════════════════════════════════════ */

/* Make sure tap highlights look good */
a, button, [role="button"] {
  -webkit-tap-highlight-color: rgba(14, 165, 233, 0.15);
}

/* Project cards — always show overlay on touch devices */
@media (hover: none) {
  .project-card-overlay {
    opacity: 1;
  }
  .gallery-item-overlay,
  .gallery-zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  .team-social {
    opacity: 1;
    transform: translateY(0);
  }
  /* Disable translateX hover on why-features on touch */
  .why-feature:hover {
    transform: none;
  }
}

/* ══════════════════════════════════════════════════════════
   LARGE DESKTOP — 1440px+
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1440px) {
  :root {
    --section-py: 7rem;
  }
  .hero-title {
    font-size: 5.5rem;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════
   STANDARD DESKTOP — up to 1279px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1279px) {
  :root {
    --container-max: 1100px;
    --section-py: 5.5rem;
  }
  .footer-main {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  }
  .about-badge-card { right: -1rem; }
  .about-award-card { left: -1rem; }
  .why-exp-badge { left: -1rem; }
}

/* ══════════════════════════════════════════════════════════
   LAPTOP — up to 1023px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  :root {
    --section-py: 4.5rem;
    --header-h: 70px;
  }

  /* Navigation */
  .header-top-bar { display: none; }
  .nav-menu { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  /* Hero */
  .hero-stats {
    flex-wrap: wrap;
  }
  .hero-stat-item {
    flex: 1 1 calc(50% - 0.5rem);
  }
  .hero-stat-item:last-child {
    border-right: 1px solid rgba(255,255,255,0.12);
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .stat-card:nth-child(2) { border-right: none; }
  .stat-card:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.08); }
  .stat-card:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.08); border-right: none; }

  /* About */
  .about-snap-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-badge-card { bottom: -1rem; right: 1rem; }
  .about-award-card { left: 1rem; }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Why Us */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .why-image-wrap { max-width: 600px; margin: 0 auto; }

  /* Industries — reduce from 9 cols to 5 */
  .industries-scroll {
    grid-template-columns: repeat(5, 1fr);
  }

  /* Footer */
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer-brand { grid-column: 1 / -1; }

  /* FAQ */
  .faq-grid {
    grid-template-columns: 1fr;
  }

  /* About Grid */
  .about-main-img img { height: 380px; }
  .why-main-img img { height: 420px; }

  /* Timeline */
  .timeline::before { left: 1.5rem; }
  .timeline-item {
    padding-right: 0;
    padding-left: 4.5rem;
    justify-content: flex-start;
  }
  .timeline-item:nth-child(even) {
    padding-left: 4.5rem;
  }
  .timeline-dot { left: 1.5rem; }
  .timeline-card { max-width: 100%; }

  /* Contact CTA */
  .cta-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  .cta-banner-actions { justify-content: center; }

  /* Swiper nav buttons smaller */
  .swiper-button-next,
  .swiper-button-prev {
    width: 40px !important;
    height: 40px !important;
  }
}

/* ══════════════════════════════════════════════════════════
   TABLET — up to 767px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  :root {
    --section-py: 4rem;
    --header-h: 65px;
  }

  /* Base */
  body { font-size: 15px; }

  /* Nav Logo */
  .nav-logo img { height: 48px; }

  /* Hero */
  #hero {
    min-height: 100svh;
    padding-top: calc(var(--header-h) + 1rem);
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-badge { font-size: 0.7rem; padding: 0.4rem 1rem; }
  .hero-desc { max-width: 100%; }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-stat-item {
    flex: 1 1 calc(50% - 0.5rem);
    padding: 1rem 1.25rem;
    text-align: center;
  }
  .hero-stat-item:first-child { border-radius: var(--radius-lg) 0 0 0; }
  .hero-stat-item:nth-child(2) { border-radius: 0 var(--radius-lg) 0 0; border-right: 1px solid rgba(255,255,255,0.12); }
  .hero-stat-item:nth-child(3) { border-radius: 0 0 0 var(--radius-lg); border-top: 1px solid rgba(255,255,255,0.12); border-right: none; }
  .hero-stat-item:last-child { border-radius: 0 0 var(--radius-lg) 0; border-top: 1px solid rgba(255,255,255,0.12); }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 2rem 1.5rem; }
  .stat-number { font-size: 2.5rem; }

  /* About */
  .about-features { grid-template-columns: 1fr; }
  .about-badge-card { position: static; margin: 1.5rem 0 0; display: inline-flex; animation: none; }
  .about-award-card { display: none; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Industries */
  .industries-scroll {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  /* Projects */
  .project-card { height: 320px; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3.5rem 0 2rem;
  }
  .footer-brand { grid-column: auto; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  .footer-legal {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Gallery */
  .gallery-grid { columns: 2 160px; }

  /* Buttons */
  .btn { padding: 0.75rem 1.75rem; font-size: 0.9rem; }
  .btn-lg { padding: 0.9rem 2rem; font-size: var(--text-base); }

  /* Section */
  .section-title { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .section-header { margin-bottom: 2.5rem; }

  /* Floating buttons */
  .floating-buttons { bottom: 1.25rem; right: 1.25rem; }
  .floating-btn { width: 48px; height: 48px; font-size: 1.2rem; }

  /* Back to top */
  #back-to-top { bottom: 1.25rem; left: 1.25rem; width: 42px; height: 42px; }

  /* Grid 2,3,4 collapse */
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  /* Map */
  .map-wrap { height: 300px; }

  /* Page hero */
  .page-hero { min-height: 280px; padding-top: calc(var(--header-h) + 2rem); padding-bottom: 2rem; }
  .page-hero-title { font-size: clamp(1.75rem, 7vw, 3rem); }

  /* CTA Banner */
  .cta-banner-actions { flex-direction: column; width: 100%; }
  .cta-banner-actions .btn { width: 100%; text-align: center; }

  /* Timeline */
  .timeline::before { left: 1rem; }
  .timeline-item,
  .timeline-item:nth-child(even) { padding-left: 3.5rem; }
  .timeline-dot { left: 1rem; }

  /* Team */
  .team-img { height: 280px; }

  /* Why Us section */
  .why-grid { gap: 2.5rem; }
  .why-feature {
    padding: 1.25rem;
  }

  /* Section badges in center headers */
  .section-header.center {
    padding: 0 0.5rem;
  }

  /* Swiper nav hidden on small screens */
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }

  /* About section certs */
  .about-certs {
    justify-content: center;
  }

  /* Inline flex buttons wrap */
  div[style*="display:flex"][style*="gap:1rem"],
  div[style*="display: flex"][style*="gap: 1rem"] {
    flex-wrap: wrap;
  }

  /* Blog — collapse two-column layout (sidebar below) */
  #blog-posts-grid {
    grid-template-columns: 1fr !important;
  }

  /* Loading screen */
  .loader-content {
    padding: 2rem 2.5rem;
  }
  .loader-bar-wrap { width: 220px; }
}

/* ══════════════════════════════════════════════════════════
   SMALL PHONE — up to 479px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 479px) {
  :root {
    --section-py: 3rem;
    --header-h: 60px;
  }

  .container,
  .container-wide {
    padding: 0 1rem;
  }

  /* Hero */
  .hero-title { font-size: 2.1rem; line-height: 1.1; }
  .hero-typed-wrap { font-size: 1.35rem; min-height: 2.2rem; }
  .hero-desc { font-size: var(--text-sm); }
  .hero-stats { flex-direction: column; }
  .hero-stat-item {
    flex: 1 1 auto;
    width: 100%;
    border-radius: 0 !important;
    border-right: 1px solid rgba(255,255,255,0.12) !important;
    border-top: none;
  }
  .hero-stat-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; border-right: 1px solid rgba(255,255,255,0.12) !important; }
  .hero-stat-item:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important; }

  /* Actions */
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .stat-card:last-child { border-bottom: none; }

  /* Industries */
  .industries-scroll { grid-template-columns: repeat(2, 1fr); }

  /* Gallery */
  .gallery-grid { columns: 2 130px; }
  .gallery-filters { gap: 0.5rem; }
  .filter-btn { padding: 0.4rem 1rem; font-size: 0.75rem; }

  /* Footer */
  .footer-social a { width: 36px; height: 36px; }
  .footer-main { padding: 2.5rem 0 2rem; }

  /* Hero badge */
  .hero-badge { font-size: 0.65rem; padding: 0.35rem 0.9rem; }

  /* Modal / lightbox adjustments */
  .thankyou-card,
  .error-page { padding: 2.5rem 1.25rem; }

  /* Nav toggle */
  .nav-toggle { width: 38px; height: 38px; }

  /* Section titles */
  .section-title { font-size: clamp(1.5rem, 7vw, 2rem); }

  /* Service cards */
  .service-card { padding: 2rem 1.5rem; }

  /* Page hero */
  .page-hero { min-height: 240px; }
  .page-hero-title { font-size: clamp(1.5rem, 8vw, 2.5rem); }

  /* CTA banner buttons */
  .cta-banner-actions { gap: 0.75rem; }

  /* Why us features */
  .why-feature { padding: 1rem; gap: 1rem; }
  .why-feature-icon { width: 44px; height: 44px; font-size: 1.1rem; }

  /* About main image */
  .about-main-img img { height: 280px; }

  /* FAQ */
  .faq-question { padding: 1.25rem; }
  .faq-answer-inner { padding: 0 1.25rem 1.25rem; }

  /* Industry cards text */
  .industry-name { font-size: 0.65rem; }
  .industry-icon { font-size: 1.6rem; }

  /* Testimonials padding */
  .testimonial-card { padding: 1.75rem 1.25rem; }

  /* Mobile menu font size */
  .mobile-nav-link { font-size: var(--text-lg); }
  .mobile-menu-inner { padding: 1.5rem 1.25rem; }

  /* Buttons full width in hero */
  .btn-lg { padding: 0.85rem 1.75rem; font-size: 0.95rem; }
  .btn-xl { padding: 1rem 2rem; font-size: var(--text-base); }

  /* Stats section */
  .stat-card { padding: 1.75rem 1rem; }
  .stat-number { font-size: 2.25rem; }
  .stat-icon { width: 50px; height: 50px; font-size: 1.25rem; }

  /* Contact CTA */
  #cta-banner { padding: 3.5rem 0; }

  /* Clients marquee */
  .clients-track { gap: 2rem; }
  .client-logo-item { font-size: 0.95rem !important; }

  /* Project cards */
  .project-card { height: 280px; }

  /* Footer legal links */
  .footer-legal { gap: 1rem; }

  /* Timeline */
  .timeline-item,
  .timeline-item:nth-child(even) { padding-left: 3rem; }
  .timeline-card { padding: 1.25rem; }

  /* Thank you page */
  .thankyou-title { font-size: var(--text-3xl); }
  .thankyou-check { width: 70px; height: 70px; font-size: 2rem; }
}

/* ══════════════════════════════════════════════════════════
   EXTRA SMALL — up to 359px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 359px) {
  .container,
  .container-wide {
    padding: 0 0.875rem;
  }

  .hero-title { font-size: 1.85rem; }
  .hero-typed-wrap { font-size: 1.2rem; }

  .btn { padding: 0.7rem 1.25rem; font-size: 0.875rem; }
  .btn-lg { padding: 0.8rem 1.5rem; font-size: 0.9rem; }

  .industries-scroll { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .industry-card { padding: 1rem 0.6rem; min-width: unset; }

  .nav-logo img { height: 40px; }
  .nav-toggle { width: 34px; height: 34px; }

  .footer-legal { flex-direction: column; align-items: center; gap: 0.5rem; }
}

/* ══════════════════════════════════════════════════════════
   LANDSCAPE PHONES — short viewports
   ══════════════════════════════════════════════════════════ */
@media (max-height: 600px) and (orientation: landscape) {
  #hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 1.5rem);
    padding-bottom: 2rem;

  .hero-title { font-size: clamp(1.6rem, 5vw, 2.5rem); margin-bottom: 0.75rem; }
  .hero-desc { margin-bottom: 1.5rem; }
  .hero-actions { margin-bottom: 1.5rem; }
  .hero-stats { display: none; }
}

/* ══════════════════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════════════════ */
@media print {
  #header,
  #footer,
  .floating-buttons,
  #back-to-top,
  #scroll-progress,
  #loading-screen {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
  .section { padding: 2rem 0; }
  .container { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-slider,
  .clients-track {
    animation: none;
  }
}

/* ══════════════════════════════════════════════════════════
   HIGH-DPI / RETINA
   ══════════════════════════════════════════════════════════ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .nav-logo img { image-rendering: -webkit-optimize-contrast; }
}
