/* ============================================================
   Shree Atharva Enterprises — responsive.css
   Mobile-first performance & animation optimizations
   ============================================================ */

/* ──────────────────────────────────────────────────────────
   1. GLOBAL MOBILE PERFORMANCE BASE
   Applies to all devices ≤ 768px
   Reduces paint, compositing cost, and animation overhead
────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Disable heavy backdrop blur on header — GPU expensive */
  #site-header.scrolled {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.98) !important;
  }

  /* Shorten all transition durations site-wide for snappier feel */
  *,
  *::before,
  *::after {
    transition-duration: 0.18s !important;
  }

  /* Disable smooth scroll — prevents jank on low-end devices */
  html {
    scroll-behavior: auto;
  }


  /* Hero video: keep full-cover video on mobile */
  .hero-video-wrap {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .hero-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  /* Hero: reduce background scale animation */
  .hero-slide {
    transform: scale(1) !important;          /* no zoom-in effect */
    transition: opacity 0.7s ease !important; /* only fade, no scale */
  }
  .hero-slide.active {
    transform: scale(1) !important;
  }

  /* Hero content: tighter padding */
  .hero-content {
    padding: 120px 18px 70px !important;
  }

  .hero-title {
    font-size: clamp(26px, 7vw, 40px);
    margin-bottom: 24px;
  }

  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: .14em;
  }

  /* Disable hero button lift on mobile (keep tap feel simple) */
  .btn-red:hover,
  .btn-contact:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  /* Cards: show desc always (no hover needed on touch) */
  .card-desc {
    max-height: 200px !important;
    opacity: 1 !important;
  }

  /* Cards: remove lift animation */
  .card:hover {
    transform: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08) !important;
  }
  .card:hover .card-img-wrap img {
    transform: none !important;  /* disable zoom on card image */
  }

  /* Solutions slider: disable image pan effect */
  .sol-img-wrap img {
    width: 100% !important;
    transform: none !important;
    transition: none !important;
  }
  .sol-card:hover .sol-img-wrap img {
    transform: none !important;
  }

  /* Solutions: show label always, no translateY */
  .sol-label {
    transform: none !important;
    transition: none !important;
  }
  .sol-card:hover .sol-label {
    transform: none !important;
  }

  /* Disable why-flow-body slide on hover */
  .why-flow-item:hover .why-flow-body {
    transform: none !important;
    box-shadow: 0 20px 50px rgba(17, 24, 38, .06) !important;
  }

  /* Disable backdrop blur on cards (was on why-flow-body) */
  .why-flow-body {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Disable fade-in entrance animation — use static state */
  .fade-in,
  .fade-in.animate,
  .fade-in.animate.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Footer: stack single column */
  .sa-footer-top {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    padding: 32px 18px 24px !important;
  }

  .sa-footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px 18px 22px !important;
    gap: 12px !important;
  }

  /* WhatsApp & BTT buttons — prevent overlap */
  #whatsapp-btn {
    bottom: 76px;
    right: 16px;
  }
  #btt {
    bottom: 22px;
    right: 16px;
  }

  /* Remove hover lift on social icons */
  .co-social a:hover {
    transform: none !important;
  }
  .ft-social a:hover {
    transform: none !important;
  }
}


/* ──────────────────────────────────────────────────────────
   2. TABLET (481px – 768px) — layout fixes
────────────────────────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 768px) {

  /* Cards: 2-column grid */
  .cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px !important;
    padding: 0 18px !important;
  }

  .card {
    height: auto !important;
  }

  .card-body {
    height: auto !important;
  }

  /* About: single column */
  .about-inner {
    grid-template-columns: 1fr !important;
    padding: 0 18px !important;
    gap: 28px !important;
  }

  .about-image-box {
    height: 300px !important;
  }

  /* Why choose: single column */
  .why-choose-inner {
    grid-template-columns: 1fr !important;
    padding: 0 18px !important;
    gap: 28px !important;
  }

  .why-choose-intro {
    position: static !important;
  }

  /* Solutions slider */
  .sol-slider-wrap {
    padding: 0 46px !important;
  }

  .sol-slider-track .sol-card {
    flex: 0 0 calc((100% - 20px) / 2) !important;
  }

  /* Header reduced padding */
  .header-wrap {
    padding: 0 18px !important;
  }

  /* HSN table font tweak */
  .hsn-table {
    font-size: 13px;
  }
}


/* ──────────────────────────────────────────────────────────
   3. SMALL MOBILE (≤ 480px) — maximum simplification
────────────────────────────────────────────────────────── */
@media (max-width: 480px) {

  /* Header */
  .header-wrap {
    padding: 0 14px !important;
    height: 64px !important;
  }

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

  .logo-sudhanshu,
  .logo-associates {
    font-size: 19px !important;
  }

  .btn-contact {
    padding: 10px 16px !important;
    font-size: 12px !important;
  }

  /* Hero */
  .hero {
    min-height: 520px !important;
  }

  .hero-content {
    padding: 100px 14px 60px !important;
  }

  .hero-title {
    font-size: clamp(22px, 8vw, 34px) !important;
    line-height: 1.15 !important;
    margin-bottom: 18px !important;
  }

  .hero-eyebrow {
    font-size: 10px !important;
    letter-spacing: .1em !important;
    margin-bottom: 12px !important;
  }

  .hero-btns {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .btn-red {
    padding: 12px 22px !important;
    font-size: 12px !important;
  }

  /* Cards: single column */
  .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 14px !important;
  }

  .card {
    height: auto !important;
    border-radius: 10px !important;
  }

  .card .card-img-wrap {
    height: 200px !important;
  }

  .card-body {
    height: auto !important;
    padding: 14px 14px 14px !important;
  }

  /* About */
  .about-section {
    padding: 48px 0 60px !important;
  }

  .about-inner {
    grid-template-columns: 1fr !important;
    padding: 0 14px !important;
    gap: 24px !important;
  }

  .about-image-box {
    height: 240px !important;
    border-radius: 0 0 18px 18px !important;
  }

  /* Tabs */
  .tab-btn {
    padding: 9px 12px !important;
    font-size: 10px !important;
  }

  /* Solutions section */
  .sol-section {
    padding: 50px 0 30px !important;
  }

  .sol-header {
    padding: 0 14px 28px !important;
  }

  .sol-slider-wrap {
    padding: 0 38px !important;
  }

  .sol-slider-track .sol-card {
    flex: 0 0 100% !important;
  }

  .sol-btn {
    width: 34px !important;
    height: 34px !important;
  }

  .sol-card {
    height: 220px !important;
  }

  .sol-label {
    font-size: 17px !important;
  }

  /* Why choose */
  .why-choose-section {
    padding: 52px 0 48px !important;
  }

  .why-choose-inner {
    grid-template-columns: 1fr !important;
    padding: 0 14px !important;
    gap: 24px !important;
  }

  .why-choose-intro {
    position: static !important;
  }

  .why-flow::before {
    left: 24px !important;
  }

  .why-flow-item {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .why-flow-count {
    width: 52px !important;
    height: 52px !important;
    font-size: 13px !important;
  }

  .why-flow-body {
    padding: 18px 16px !important;
    border-radius: 16px !important;
  }

  .why-flow-body h3 {
    font-size: 16px !important;
  }

  .why-flow-body p {
    font-size: 14px !important;
    line-height: 1.75 !important;
  }

  .why-intro-text {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }

  /* HSN table */
  .hsn-section {
    padding: 28px 0 60px !important;
  }

  .hsn-table-wrap {
    border-radius: 8px !important;
  }

  .hsn-table {
    font-size: 12px !important;
  }

  .hsn-table td,
  .hsn-table th {
    padding: 12px 10px !important;
  }

  .hsn-code {
    font-size: 12px !important;
  }

  /* Footer */
  .sa-footer-top {
    grid-template-columns: 1fr !important;
    padding: 28px 14px 20px !important;
    gap: 18px !important;
  }

  .sa-brand-main {
    font-size: 22px !important;
  }

  .sa-footer-bottom {
    padding: 14px 14px 20px !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .sa-footer-bottom-nav {
    gap: 12px !important;
    font-size: 13px !important;
  }

  /* Fix WhatsApp + BTT overlap with smaller screens */
  #whatsapp-btn {
    width: 40px !important;
    height: 40px !important;
    bottom: 70px !important;
    right: 14px !important;
  }

  #btt {
    width: 40px !important;
    height: 40px !important;
    bottom: 18px !important;
    right: 14px !important;
    font-size: 17px !important;
  }

  /* Eyebrow — tighter */
  .eyebrow {
    font-size: 10px !important;
    letter-spacing: .14em !important;
  }

  .sec-title {
    font-size: clamp(18px, 5.5vw, 26px) !important;
  }

  /* Contact overlay */
  .co-inner {
    padding: 60px 14px 32px !important;
  }

  .co-nav a {
    font-size: 20px !important;
    padding: 9px 0 !important;
  }

  .co-title {
    font-size: 20px !important;
  }

  /* Nav link underlines — hide on mobile */
  .nav-link::after {
    display: none !important;
  }
}


/* ──────────────────────────────────────────────────────────
   4. prefers-reduced-motion — FULL animation disable
   Respects user OS accessibility setting
────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-slide {
    transform: none !important;
    transition: opacity 0.4s ease !important;
  }

  .fade-in,
  .fade-in.animate,
  .fade-in.animate.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .why-flow-body {
    transition: none !important;
  }

  .sol-label,
  .sol-desc-line,
  .sol-img-wrap img {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}


/* ──────────────────────────────────────────────────────────
   5. PERFORMANCE — will-change management
   Only apply to essential animated elements
   Remove will-change from static mobile elements
────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Remove will-change from slider track on mobile (avoid layer bloat) */
  .sol-slider-track {
    will-change: auto !important;
  }

  /* Remove will-change from hero slides on mobile */
  .hero-slide {
    will-change: auto !important;
  }

  /* Contact overlay — simpler transition */
  .contact-overlay {
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
  }

  /* Dropdown transition simplified */
  .dropdown-content {
    transition: opacity 0.15s ease, transform 0.15s ease !important;
  }

  /* Tab animation simplified */
  .tab-pane.active {
    animation: none !important;
  }

  /* Blog date-badge — disable move animation */
  .blog-card:hover .date-badge {
    top: 14px !important;
    bottom: auto !important;
  }
}


/* ============================================================
   FINAL RESPONSIVE FIX — no desktop design changes
   ============================================================ */

img, video, iframe {
  max-width: 100%;
}

.burger {
  display: none;
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .header-wrap {
    height: 72px !important;
    padding: 0 22px !important;
  }

  .site-nav,
  .header-right {
    display: none !important;
  }

  .burger {
    display: inline-flex !important;
    margin-left: auto;
    border: 1px solid rgba(31,59,143,.25);
    border-radius: 10px;
    background: #fff;
  }

  .burger span {
    background: #1f3b8f !important;
  }

  .logo-link {
    min-width: 0;
    margin-right: 12px !important;
  }

  .logo-text,
  .logo-sudhanshu {
    color: #1f3b8f !important;
    font-size: clamp(18px, 4.2vw, 25px) !important;
    white-space: normal !important;
    line-height: 1.05 !important;
    letter-spacing: -0.4px !important;
  }

  .nav-logo {
    width: auto !important;
    max-width: 48px !important;
    height: 44px !important;
    object-fit: contain !important;
    flex-shrink: 0;
  }

  #site-header,
  #site-header.scrolled,
  #site-header.force-white-header {
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 2px 18px rgba(0,0,0,.08) !important;
    transform: none !important;
  }

  .contact-overlay {
    background: #1f3b8f !important;
  }

  .co-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    min-height: 100vh !important;
    padding: 76px 22px 34px !important;
  }

  .co-divider,
  .co-img-wrap {
    display: none !important;
  }

  .co-nav {
    padding: 0 !important;
  }

  .co-nav a {
    font-size: clamp(22px, 8vw, 34px) !important;
    padding: 12px 0 !important;
    color: #fff !important;
  }

  .co-contact {
    padding: 28px 0 0 !important;
  }

  .co-contact-body {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .co-close {
    top: 22px !important;
    right: 22px !important;
    color: #fff !important;
  }

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

  .about-inner,
  .why-choose-inner {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .cards-section,
  .about-section,
  .sol-section,
  .why-choose-section,
  .hsn-section {
    overflow: hidden;
  }

  .hero {
    min-height: 560px !important;
  }

  .hero-content {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .tab-nav,
  .sa-footer-bottom-nav {
    flex-wrap: wrap !important;
  }

  .sol-slider-wrap {
    max-width: 100% !important;
  }

  .sol-slider-viewport {
    overflow: hidden !important;
  }

  .hsn-table-wrap {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .header-wrap {
    height: 64px !important;
    padding: 0 12px !important;
  }

  .logo-link {
    gap: 8px !important;
  }

  .nav-logo {
    max-width: 38px !important;
    height: 36px !important;
  }

  .logo-text,
  .logo-sudhanshu {
    font-size: 18px !important;
    max-width: calc(100vw - 92px) !important;
  }

  .burger {
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0;
  }

  .burger span {
    width: 21px !important;
  }

  .cards-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-title br {
    display: none;
  }

  .about-image-box {
    max-width: 100% !important;
  }
}
