/* ==========================================================================
   VISHWADHARAM SECURITY SERVICES (VSS) - FULL UNIFIED RESPONSIVE STYLESHEET
   File: responsive.css
   ========================================================================== */

/* ==========================================================================
   1. FIXED HEADER & UNIFIED PADDING ALIGNMENT FOR ALL PAGES
   ========================================================================== */
#header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: var(--header-height, 80px) !important;
  z-index: 10000 !important;
  background: rgba(11, 28, 45, 0.96) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  transition: background 0.3s ease, box-shadow 0.3s ease !important;
}

#header.scrolled {
  background: rgba(11, 28, 45, 0.98) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Ensure Page Content Sits Nicely Below Fixed Header across Index, About, etc. */
.page-banner {
  padding-top: 140px !important;
  padding-bottom: 60px !important;
}

.hero {
  padding-top: 80px !important;
}

/* Perfect Horizontal Line Alignment across Index, About, Clients, Branches, etc. */
.nav-container,
.container,
.footer-container,
.footer-main,
.page-banner .container {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   2. FIXED RIGHT FLOATING SOCIAL MEDIA SIDEBAR
   ========================================================================== */
#vss-floating-sidebar {
  position: fixed !important;
  right: 0 !important;
  top: 35% !important;
  transform: translateY(-50%) !important;
  z-index: 9998 !important;
}

.vss-sidebar-inner {
  display: flex !important;
  flex-direction: column !important;
  background: #0e2238 !important;
  border-radius: 10px 0 0 10px !important;
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.3) !important;
  overflow: hidden !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-right: none !important;
}

.sidebar-item {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  transition: all 0.3s ease !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sidebar-item:last-child {
  border-bottom: none !important;
}

/* Tooltip on Hover */
.sidebar-item::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 55px;
  background: #0e2238;
  color: #d4af37;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid #d4af37;
}

.sidebar-item:hover::before {
  opacity: 1;
  visibility: visible;
  right: 52px;
}

/* ==========================================================================
   3. PERFECT VERTICAL LINE ALIGNMENT (WHATSAPP & UP-ARROW BUTTONS)
   ========================================================================== */
/* Up-Arrow Button (Bottom-most) */
#back-to-top {
  position: fixed !important;
  right: 20px !important; /* EXACT RIGHT MARGIN */
  bottom: 20px !important;
  width: 46px !important;
  height: 46px !important;
  background: #0b1c2d !important;
  border: 2px solid #d4af37 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9990 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
}

#back-to-top svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #d4af37 !important;
  fill: none !important;
  display: block !important;
}

#back-to-top:hover {
  background: #d4af37 !important;
}

#back-to-top:hover svg {
  stroke: #0b1c2d !important;
}

/* Floating WhatsApp Button (Straight Vertical Alignment Directly Above Up-Arrow) */
.floating-whatsapp-btn,
#whatsapp-btn {
  position: fixed !important;
  right: 20px !important; /* EXACT SAME RIGHT MARGIN FOR PERFECT VERTICAL LINE */
  bottom: 78px !important; /* STACKED STRAIGHT ABOVE UP-ARROW WITH 12PX GAP */
  width: 46px !important;  /* IDENTICAL CIRCLE SIZE */
  height: 46px !important; /* IDENTICAL CIRCLE SIZE */
  background-color: #25D366 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  z-index: 9991 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
}

.floating-whatsapp-btn svg,
#whatsapp-btn svg {
  width: 24px !important;
  height: 24px !important;
  fill: #ffffff !important;
  display: block !important;
}

.floating-whatsapp-btn:hover,
#whatsapp-btn:hover {
  transform: scale(1.1) !important;
  background-color: #20ba5a !important;
}

/* Hide Unwanted Floating Inquire Button */
.floating-inquire-btn {
  display: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   4. LARGE SCREEN / DESKTOP RESPONSIVE BREAKPOINTS (1200px - 992px)
   ========================================================================== */
@media (max-width: 1200px) {
  .services-grid,
  .services-page-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px !important;
  }

  .industries-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .branch-grid,
  .cert-gallery-grid,
  .cert-grid,
  .clients-page-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px !important;
  }

  .footer-grid-layout,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 40px !important;
  }
}

/* ==========================================================================
   5. TABLET RESPONSIVE BREAKPOINTS (991px - 769px)
   ========================================================================== */
@media (max-width: 991px) {
  /* Mobile Navigation Controls */
  .hamburger {
    display: flex !important;
  }

  .nav-menu {
    display: none !important;
  }

  .nav-mobile {
    display: flex !important;
    position: fixed !important;
    top: var(--header-height, 80px) !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(11, 28, 45, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    padding: 20px 24px 30px !important;
    flex-direction: column !important;
    gap: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-10px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    z-index: 999 !important;
  }

  .nav-mobile.open {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: all !important;
  }

  /* Two Column to Single Column Conversions */
  .about-grid,
  .about-intro-grid,
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .about-intro-img img {
    height: 380px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .mvv-grid,
  .why-grid,
  .statutory-summary-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .hq-details-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}

/* ==========================================================================
   6. MOBILE LANDSCAPE & PORTRAIT RESPONSIVE BREAKPOINTS (768px - 481px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 68px;
  }

  #header {
    height: 68px !important;
  }

  .page-banner {
    padding-top: 110px !important;
    padding-bottom: 40px !important;
  }

  .hero {
    min-height: 500px !important;
    padding-top: 80px !important;
  }

  .hero-title {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
  }

  .hero-sub {
    font-size: 0.92rem !important;
    margin-bottom: 24px !important;
  }

  .hero-buttons,
  .cta-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline,
  .cta-buttons .btn-primary,
  .cta-buttons .btn-outline {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Full Single Column Layout for Cards */
  .services-grid,
  .services-page-grid,
  .branch-grid,
  .cert-gallery-grid,
  .cert-grid,
  .why-grid,
  .mvv-grid,
  .clients-page-grid {
    grid-template-columns: 1fr !important;
  }

  .industries-grid,
  .industries-page-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  /* Mobile Vertical Line Alignment for Action Buttons */
  #back-to-top {
    right: 16px !important;
    bottom: 16px !important;
    width: 42px !important;
    height: 42px !important;
  }

  .floating-whatsapp-btn,
  #whatsapp-btn {
    right: 16px !important; /* EXACT SAME RIGHT ALIGNMENT ON MOBILE */
    bottom: 68px !important; /* PERFECT VERTICAL STACK WITH 10px GAP */
    width: 42px !important;
    height: 42px !important;
  }

  .floating-whatsapp-btn svg,
  #whatsapp-btn svg {
    width: 22px !important;
    height: 22px !important;
  }

  /* Social Media Sidebar Mobile Optimization */
  #vss-floating-sidebar {
    top: 25% !important;
  }

  .sidebar-item {
    width: 38px !important;
    height: 38px !important;
  }

  .sidebar-item svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Reset Mobile Card Constraints */
  .service-card-short,
  .service-card-desc,
  .features-list,
  .service-card-icon-row {
    min-height: auto !important;
  }

  .client-page-card {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
  }

  .client-logo-box {
    margin: 0 auto !important;
  }

  /* Footer Layout Mobile */
  .footer-grid-layout,
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   7. SMALL MOBILE DEVICES (480px & BELOW)
   ========================================================================== */
@media (max-width: 480px) {
  .logo-text .brand-name {
    font-size: 0.85rem !important;
  }

  .logo-text .brand-sub {
    display: none !important;
  }

  .section {
    padding: 50px 0 !important;
  }

  .section-title {
    font-size: 1.5rem !important;
  }

  .industries-grid,
  .industries-page-grid,
  .statutory-summary-grid,
  .about-stats {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Live Chat Modal Adaptability */
  #vss-chat-box {
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    bottom: 75px !important;
  }
}
/* ========================================================= */
/* SVG ICON SIZING FIX (PREVENT GIANT OVERFLOW ICONS)       */
/* ========================================================= */

/* General SVG Safety Limit */
svg {
  max-width: 100%;
}

/* Fix Giant Phone Icon at Page Bottom */
.contact-icon svg,
.footer-contact-icon svg,
.footer-contact-item svg,
.btn-call svg,
.sidebar-item svg,
.chat-btn svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  display: inline-block !important;
}

/* Fix Branch Location Pin Icons Sizing */
.pin-icon,
.branch-pin-wrapper svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  fill: #d4af37 !important;
  display: block !important;
}

/* Fix Header Shield Logo Sizing */
.logo-shield {
  width: 42px !important;
  height: 48px !important;
}

/* Fix Action Buttons Icon Sizing */
#back-to-top svg {
  width: 18px !important;
  height: 18px !important;
}

.floating-whatsapp-btn svg,
#whatsapp-btn svg {
  width: 24px !important;
  height: 24px !important;
}
/* =========================================================
   INDEX + ABOUT MOBILE HEADER FIX
   ========================================================= */

@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
  }

  #header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    height: 68px !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;

    z-index: 999999 !important;
  }

  #header,
  #header * {
    box-sizing: border-box;
  }

  .nav-container {
    height: 68px !important;
  }
}
/* =========================================================
   CAREERS FORM - MOBILE SUBMIT BUTTON FIX
   ========================================================= */

@media (max-width: 768px) {

  .career-modal {
    padding: 10px !important;
    align-items: center !important;
  }

  .career-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 22px 14px 20px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
  }

  .career-modal-card .btn-submit {
    width: 100% !important;
    display: block !important;
    min-height: 48px !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }
}
