/* ============================================================
   Vishwanath Traders — HOMEPAGE responsive (same content reflow)
   Mobile version uses the SAME desktop content, just reflowed.
   Scoped to body#index-page so other pages stay unaffected.
   ============================================================ */

/* Re-enable the REAL hero + solutions sections that the shared
   style.css hides on small screens (homepage only). */
@media (max-width: 992px) {
  body#index-page .home-hero .hero-slider,
  body#index-page .home-hero .hero-content { display: block !important; }
  body#index-page .home-hero::before { display: block; }
  body#index-page .home-hero { min-height: 60vh; }
  body#index-page .dp-section { display: block !important; }

  /* Navbar → hamburger + drawer, hide desktop links */
  body#index-page .navbar .hamburger { display: flex; }
  /* Restore hamburger 3-bar icon (shared `.navbar *` rule zeroes all transforms) */
  body#index-page .navbar .hamburger span {
    position: absolute;
    left: 50%;
    margin-left: -11px;
    transform: translateY(0) !important;
  }
  body#index-page .navbar .hamburger span:nth-child(1) { transform: translateY(-7px) !important; }
  body#index-page .navbar .hamburger span:nth-child(2) { transform: translateY(0) !important; }
  body#index-page .navbar .hamburger span:nth-child(3) { transform: translateY(7px) !important; }
  body#index-page .navbar .hamburger.active span:nth-child(1) { transform: translateY(0) rotate(45deg) !important; }
  body#index-page .navbar .hamburger.active span:nth-child(2) { transform: translateY(0) !important; opacity: 0; }
  body#index-page .navbar .hamburger.active span:nth-child(3) { transform: translateY(0) rotate(-45deg) !important; }
  body#index-page .nav-center,
  body#index-page .nav-links { display: none; }
  body#index-page .navbar .cta-btn { display: none; }
  body#index-page .nav-right { gap: 4px; margin-left: auto; margin-right: 4px; }
  body#index-page .navbar { height: 60px; }
  body#index-page .nav-container { height: 60px; }
  /* Golden diagonal navbar accent — wider (same diagonal shape) on mobile */
  body#index-page .navbar::before {
    width: 47%;
    clip-path: polygon(0% 0%, 100% 0%, 88% 100%, 0% 100%);
  }
}

/* ======== Phone-size reflow (≤768px) ======== */
@media (max-width: 768px) {

  /* ---- Hero ---- */
  body#index-page .home-hero {
    height: auto;
    min-height: 60vh;
    display: flex;
    align-items: center;
  }
  body#index-page .home-hero .hero-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    height: auto;
    min-height: 0;
  }
  body#index-page .hero-content {
    position: relative;
    top: auto; left: auto; right: auto;
    padding: 56px 24px 64px;
    transform: none;
    max-width: 100%;
    width: 100%;
  }
  body#index-page .hero-pill { margin: 0 0 16px !important; }
  body#index-page .hero-heading { margin: 0 0 18px !important; }
  body#index-page .hero-subtext { margin: 0 0 26px !important; line-height: 1.7 !important; }
  body#index-page .hero-metrics { margin: 30px 0 34px !important; gap: 12px; }
  body#index-page .hero-cta { margin: 2px 0 0 !important; }
  body#index-page .hero-metrics .metric-card { padding: 14px 16px; }
  body#index-page .search-overlay { width: 520px; max-width: calc(100vw - 32px); }
  body#index-page .hero-heading {
    font-size: 28px !important;
    line-height: 36px !important;
  }
  body#index-page .hero-subtext {
    font-size: 15px !important;
    line-height: 22px !important;
    margin-bottom: 18px;
  }
  body#index-page .hero-metrics { flex-wrap: wrap; gap: 10px; margin: 14px 0 20px; }
  body#index-page .hero-metrics .metric-card { flex: 1 1 40%; min-width: 90px; }
  body#index-page .hero-cta { flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: center; }
  body#index-page .hero-cta .btn-primary,
  body#index-page .hero-cta .btn-secondary {
    width: auto;
    margin: 0;
    text-align: center;
    padding: 9px 18px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* ---- Our Display Solutions (dp-section) ---- */
  body#index-page .dp-section { padding: 48px 16px; }
  body#index-page .dp-title { font-size: 26px; line-height: 1.2; }
  body#index-page .dp-desc { font-size: 15px; line-height: 1.6; }
  body#index-page .dp-header { margin-bottom: 32px; }
  body#index-page .dp-grid { grid-template-columns: 1fr; gap: 16px; }
  body#index-page .dp-card-body { padding: 20px 20px 24px; }
  body#index-page .dp-card-body h3 { font-size: 20px; }
  body#index-page .dp-card-body p { font-size: 15px; margin-bottom: 14px; }
  body#index-page .dp-btn { font-size: 15px; }

  /* ---- Industries ---- */
  body#index-page .vt-industries-section { padding: 48px 16px; }
  body#index-page .vt-industry-block,
  body#index-page .vt-industry-block.vt-reverse {
    flex-direction: column;
    gap: 20px;
  }
  body#index-page .vt-industry-media,
  body#index-page .vt-industry-block.vt-reverse .vt-industry-media {
    width: 100%;
    max-width: 100%;
  }
  body#index-page .vt-industry-content { width: 100%; max-width: 100%; }
  body#index-page .vt-industry-content h3 { font-size: 22px !important; }
  body#index-page .vt-intro,
  body#index-page .vt-desc { font-size: 15px; line-height: 1.65; }

  /* ---- Trusted / carousel ---- */
  body#index-page .trusted-section { padding: 40px 16px !important; }
  body#index-page .carousel-title { font-size: 22px; }

  /* ---- Why Choose ---- */
  body#index-page .why-choose { padding: 48px 16px; }
  body#index-page .why-choose .section-title { font-size: 24px !important; }

  /* ---- Footer ---- */
  body#index-page .footer .footer-container {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px;
  }
  body#index-page .footer { padding: 40px 16px; }
}

@media (max-width: 420px) {
  body#index-page .footer .footer-container { grid-template-columns: 1fr !important; }
}

/* ---- Footer cleanup (all screens <= 992px) ----
   Shared CSS turns footer headings into collapsed accordions (chevron +
   max-height:0). On homepage mobile we keep everything expanded and clean. */
@media (max-width: 992px) {
  body#index-page .footer h3,
  body#index-page .footer h4 {
    font-size: 15px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: default !important;
    display: block !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    color: #E6C369 !important;
  }
  body#index-page .footer h3::after,
  body#index-page .footer h4::after { content: none !important; }
  body#index-page .footer .footer-col ul {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body#index-page .footer .footer-col ul li { font-size: 14px !important; margin-bottom: 9px !important; }
  body#index-page .footer .footer-col p:not(.legal):not(.tagline) {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
  }
  body#index-page .footer .footer-col { flex-direction: column; gap: 4px; }
  body#index-page .footer .footer-col > h4 { margin-top: 22px !important; }
  body#index-page .footer .footer-col:first-child h3 {
    font-size: 22px !important;
    text-transform: none;
    color: #FFFFFF !important;
    margin-bottom: 10px !important;
  }
  body#index-page .footer .footer-col:first-child p { font-size: 14px !important; line-height: 1.65 !important; }
  body#index-page .footer .footer-social { margin-top: 14px; }
  body#index-page .footer .footer-bottom { margin-top: 32px; }
}

/* ============================================================
   Samsung-style mobile NAVIGATION DRAWER (homepage only)
   Full-height drawer sliding in from the RIGHT, with a header,
   search box, organized grouped nav, and a contact footer.
   ============================================================ */
@media (max-width: 992px) {

  /* Full-screen panel (Samsung gnb__menu-wrap pattern) */
  body#index-page .mobile-menu-sheet {
    position: fixed !important;
    top: 0 !important;
    left: auto !important;
    right: 0 !important;
    width: min(360px, 88vw) !important;
    max-width: none !important;
    max-height: 100vh !important;
    height: 100vh !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.6, 0, 0.4, 1) !important;
    border-radius: 0 !important;
    box-shadow: -6px 0 30px rgba(0,0,0,0.18) !important;
    display: flex !important;
    flex-direction: column;
    pointer-events: auto;
    opacity: 1;
    z-index: 2000 !important;
  }
  body#index-page .mobile-menu-sheet.active {
    transform: translateX(0) !important;
    opacity: 1;
  }

  /* Header: logo + brand + close */
  body#index-page .mobile-menu-sheet .menu-header {
    background: #0F3334;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 0;
    flex: 0 0 auto;
  }
  body#index-page .mobile-menu-sheet .menu-header img { height: 30px; }
  body#index-page .mobile-menu-sheet .menu-header .menu-header-brand {
    font-family: 'CalSans', sans-serif;
    font-size: 15px;
    color: #FFFFFF;
    flex: 1;
  }
  body#index-page .mobile-menu-sheet .menu-close {
    position: static;
    margin-left: auto;
    color: #FFFFFF;
    font-size: 26px;
    opacity: 0.9;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
  }

  /* Search box below header */
  body#index-page .mobile-menu-sheet .menu-search {
    flex: 0 0 auto;
    position: relative;
    padding: 10px 16px;
    border-bottom: 1px solid #EAECEF;
    background: #FFFFFF;
  }
  body#index-page .mobile-menu-sheet .menu-search i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 14px;
    pointer-events: none;
  }
  body#index-page .mobile-menu-sheet .menu-search-input {
    width: 100%;
    padding: 10px 30px 10px 34px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #111827;
    background: #F9FAFB;
    outline: none;
  }
  body#index-page .mobile-menu-sheet .menu-search-input:focus {
    border-color: #0F3334;
    background: #FFFFFF;
  }
  body#index-page .mobile-menu-sheet .menu-search-results {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 100%;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    z-index: 5;
    max-height: 220px;
    overflow-y: auto;
    display: none;
  }
  body#index-page .mobile-menu-sheet .menu-search-results.open { display: block; }
  body#index-page .mobile-menu-sheet .menu-search-results a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
  }
  body#index-page .mobile-menu-sheet .menu-search-results a:active,
  body#index-page .mobile-menu-sheet .menu-search-results a:hover { background: #F3F4F6; }

  /* Scrollable nav list */
  body#index-page .mobile-menu-sheet .menu-list {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    list-style: none;
    padding: 6px 0;
    margin: 0;
  }
  body#index-page .mobile-menu-sheet .menu-list li.menu-label {
    font-family: 'CalSans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 20px 6px;
  }
  body#index-page .mobile-menu-sheet .menu-list li:first-child.menu-label { padding-top: 10px; }
  body#index-page .mobile-menu-sheet .menu-list li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    color: #111827;
    text-decoration: none;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    border-bottom: none;
    transition: background 0.15s;
  }
  body#index-page .mobile-menu-sheet .menu-list li a:active,
  body#index-page .mobile-menu-sheet .menu-list li a:hover { background: #F3F6F5; }
  body#index-page .mobile-menu-sheet .menu-list li a i {
    width: 20px;
    text-align: center;
    color: #0F3334;
    font-size: 15px;
  }

  /* Contact footer (sticky bottom) */
  body#index-page .mobile-menu-sheet .menu-footer {
    flex: 0 0 auto;
    border-top: 1px solid #EAECEF;
    padding: 14px 20px 20px;
    background: #FFFFFF;
  }
  body#index-page .mobile-menu-sheet .menu-footer .menu-footer-q {
    margin: 0 0 8px;
    font-size: 13px;
    color: #9CA3AF;
    font-family: 'Inter', sans-serif;
  }
  body#index-page .mobile-menu-sheet .menu-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
  }
  body#index-page .mobile-menu-sheet .menu-footer .menu-call-btn {
    background: #0F3334;
    color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    justify-content: center;
    margin-bottom: 8px;
  }
  body#index-page .mobile-menu-sheet .menu-footer .menu-contact-link {
    color: #0F3334;
    font-size: 14px;
    justify-content: center;
    padding: 4px;
  }
  body#index-page .mobile-menu-sheet .menu-footer .menu-call-btn i { color: #EBC569; }

  /* Backdrop */
  body#index-page .mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
  }
  body#index-page .mobile-menu-overlay.active { display: block !important; }
}
