/* ==========================================================================
   BRS INFOTECH SYSTEM - MOBILE & RESPONSIVE STYLES
   Prioritizing: Compact, Fast, Zero Overflow, 2-Column Products, Hamburger
   ========================================================================== */

/* --------------------------------------------------------------------------
   TABLET & INTERMEDIATE BREAKPOINTS (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --max-width: 960px;
  }

  .section {
    padding-top: 76px;
    padding-bottom: 76px;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
  }

  .hero-title {
    font-size: 2.7rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

/* --------------------------------------------------------------------------
   MOBILE BREAKPOINTS (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Global Body & Section adjustments */
  body {
    font-size: 0.9rem;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .section {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 1.55rem;
    line-height: 1.22;
  }

  .section-description {
    font-size: 0.88rem;
  }

  /* Header & Mobile Hamburger Menu */
  .header {
    height: var(--header-height);
  }

  .logo-title {
    font-size: 1.15rem;
  }

  .logo-icon-box,
  .logo-image-box {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .logo-icon-box svg {
    width: 18px;
    height: 18px;
  }

  .header-cta-group .btn-quote,
  .header-cta-group .btn-quote-nav,
  .header-cta-group .nav-phone-badge {
    display: none; /* In mobile view, hide header buttons and show them inside drawer */
  }

  /* Hamburger Toggle Button */
  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: var(--primary-tint);
    border: 1px solid rgba(215, 16, 36, 0.2);
    cursor: pointer;
    z-index: 1100;
    transition: all var(--transition-fast);
  }

  .mobile-nav-toggle span {
    display: block;
    width: 20px;
    height: 2.2px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
  }

  /* Hamburger Active Animation */
  .mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile Side Navigation Backdrop Overlay */
  .nav-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
    z-index: 1150;
  }

  .nav-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Navigation Drawer (Draws from Right Side) */
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: 310px;
    max-width: 84vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.28);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    border: none;
    border-left: 1px solid rgba(215, 16, 36, 0.15);
  }

  .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  /* Drawer Header Inside Menu */
  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-top-left-radius: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .drawer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .drawer-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 1.5px solid var(--primary);
  }

  .drawer-brand-text {
    display: flex;
    flex-direction: column;
  }

  .drawer-logo-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
  }

  .drawer-logo-title .text-accent {
    color: var(--primary);
  }

  .drawer-logo-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
  }

  .drawer-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .drawer-close-btn:hover,
  .drawer-close-btn:active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.08);
  }

  /* Drawer Nav Link List */
  .drawer-nav-list {
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    gap: 6px;
    flex: 1;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.98rem;
    font-weight: 600;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .nav-link-icon {
    display: inline-block !important;
    color: var(--primary);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
  }

  .nav-link:hover,
  .nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white) !important;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--primary-glow);
    transform: translateX(4px);
  }

  .nav-link:hover .nav-link-icon,
  .nav-link.active .nav-link-icon {
    color: #ffffff !important;
    transform: scale(1.1);
  }

  .mobile-menu-cta {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    padding: 16px 14px 24px;
    border-top: 1px solid var(--border-light);
    background: #f8fafc;
  }

  .mobile-menu-cta .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .btn-whatsapp-drawer {
    background-color: #25D366;
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  }

  .btn-whatsapp-drawer:hover {
    background-color: #1eb956;
  }

  .mobile-call-btn {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
  }

  /* Hero Section (Stacked Vertically, Compact) */
  .hero-section {
    padding-top: calc(var(--header-height) + 28px);
    padding-bottom: 32px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-content {
    max-width: 100%;
    text-align: left;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    margin-bottom: 12px;
    display: inline-flex;
  }

  .hero-title {
    font-size: 1.65rem;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 8px;
  }

  .hero-description {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }

  .hero-actions .btn {
    flex: 1 1 120px;
    padding: 10px 14px;
    font-size: 0.82rem;
  }

  .btn-replay-hero {
    display: none !important;
  }

  /* 3D Hero Key Features on Mobile - Hidden on mobile view */
  .hero-features-bar {
    display: none !important;
  }

  /* Hero Trust Chips on Mobile */
  /* Hero Trust Chips on Mobile (Strict 2 Per Row Grid Layout) */
  .hero-trust-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 10px;
    margin-top: 14px;
    width: 100%;
  }

  .hero-trust-chip {
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 99px;
    gap: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .trust-check-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  /* 3D Hero Scene on Mobile (Seamless Merged Stage) */
  .hero-visual-container {
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  .visual {
    height: 480px;
    overflow: visible;
  }

  .l1 {
    left: 4%;
    top: 4%;
    padding: 6px 10px;
    font-size: 10px;
    z-index: 10;
  }

  .l2 {
    right: 4%;
    bottom: 18%;
    padding: 6px 10px;
    font-size: 10px;
    z-index: 10;
  }

  .l1 b, .l2 b {
    font-size: 10px;
  }

  .status {
    bottom: 12px;
    width: calc(100% - 32px);
    max-width: 270px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(215, 16, 36, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    z-index: 20;
  }

  .status p {
    font-size: 9px;
    letter-spacing: 1.2px;
  }

  .status small {
    font-size: 8px;
    margin-top: 3px;
  }

  /* Stats Section: 2x2 Compact Grid */
  .stats-section {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-item {
    padding: 12px 14px;
    gap: 12px;
  }

  .stat-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .stat-icon-wrapper svg {
    width: 22px;
    height: 22px;
  }

  .stat-number {
    font-size: 1.55rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  /* About Section: 1 Column */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-features-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 24px;
  }

  .about-feature-card {
    padding: 12px 14px;
  }

  /* Founder Message: 1 Column */
  .founder-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 20px;
    text-align: center;
  }

  .founder-avatar-box {
    max-width: 180px;
    margin: 0 auto;
  }

  .founder-quote-mark {
    font-size: 2.8rem;
    margin-bottom: 4px;
  }

  .founder-quote-text {
    font-size: 1.05rem;
    line-height: 1.65;
  }

  .founder-author-box {
    justify-content: center;
  }

  /* Services: Compact Cards */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-card {
    padding: 24px 20px;
  }

  .service-icon-box {
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
  }

  .service-title {
    font-size: 1.18rem;
    margin-bottom: 8px;
  }

  .service-desc {
    font-size: 0.9rem;
    margin-bottom: 14px;
  }

  /* ------------------------------------------------------------------------
     PRODUCTS SECTION: 2-COLUMN COMPACT MOBILE GRID (Requirement #10 & #26)
     ------------------------------------------------------------------------ */
  .products-filter-bar {
    gap: 8px;
    margin-bottom: 28px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card {
    border-radius: var(--radius-sm);
  }

  .product-cat-tag {
    top: 6px;
    left: 6px;
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  .product-info {
    padding: 12px 10px;
  }

  .product-name {
    font-size: 0.92rem;
    margin-bottom: 4px;
    line-height: 1.25;
  }

  .product-desc {
    font-size: 0.76rem;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-enquire-btn {
    padding: 8px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .product-enquire-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Why Choose Us */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .why-card {
    padding: 20px 16px;
    gap: 14px;
  }

  /* Mission & Vision */
  .mission-vision-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mission-card,
  .vision-card {
    padding: 28px 20px;
  }

  .mv-title {
    font-size: 1.45rem;
  }

  .mv-text {
    font-size: 0.95rem;
  }

  /* Testimonials: Compact Marquee */
  .testimonial-card {
    width: 290px;
    padding: 20px 18px;
  }

  .testimonial-quote {
    font-size: 0.88rem;
    margin-bottom: 14px;
  }

  /* Contact & Enquiry Form */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .enquiry-form-card {
    padding: 26px 18px;
    border-radius: var(--radius-md);
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .enquiry-form-title {
    font-size: 1.45rem;
  }

  .form-actions {
    flex-direction: column;
    gap: 12px;
  }

  .form-actions .btn {
    width: 100%;
    padding: 13px;
  }

  .whatsapp-direct-card {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .whatsapp-direct-card .btn {
    width: 100%;
  }

  /* Footer */
  .footer {
    padding-top: 50px;
    padding-bottom: 24px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 40px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Floating WhatsApp Button for Easy Thumb Reach */
  .floating-whatsapp-btn {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }

  .back-to-top-btn {
    bottom: 84px;
    right: 22px;
    width: 44px;
    height: 44px;
  }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE SCREENS (320px - 390px)
   -------------------------------------------------------------------------- */
@media (max-width: 390px) {
  .hero-title {
    font-size: 1.45rem;
  }

  .visual {
    height: 420px;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
  }

  .stat-item {
    flex-direction: column;
    text-align: center;
    padding: 10px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .products-grid {
    gap: 8px;
  }

  .product-info {
    padding: 10px 8px;
  }

  .product-name {
    font-size: 0.85rem;
  }

  .product-enquire-btn {
    font-size: 0.72rem;
    padding: 6px 4px;
  }

  .testimonial-card {
    width: 260px;
    padding: 16px;
  }
}

/* ==========================================================================
   BRS SECURITY SHIELD MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .shield-section {
    padding: 50px 0;
  }

  .shield-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .shield-title {
    font-size: 1.65rem;
  }

  .shield-subtitle {
    font-size: 1.15rem;
  }

  .shield-intro {
    font-size: 0.95rem;
  }

  .shield-feature-item {
    padding: 12px 14px;
    gap: 12px;
  }

  .shield-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .shield-feature-text h3 {
    font-size: 0.98rem;
  }

  .shield-feature-text p {
    font-size: 0.82rem;
  }

  .shield-tagline {
    font-size: 1.1rem;
  }

  .shield-actions {
    flex-direction: column;
    width: 100%;
  }

  .shield-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .shield-visual {
    height: 480px;
  }

  .shield-label.l1 { left: 2%; top: 6%; }
  .shield-label.l2 { right: 1%; bottom: 4%; padding: 5px 8px; border-radius: 6px; }
  .shield-label.l2 b { font-size: 9px; margin-bottom: 1px; }
  .shield-label.l2 small { font-size: 7px; }
}
