/* ============================================================
   mobile.css - Mobile-First Performance & Responsive Overrides
   Loaded after style.css to override with maximum specificity
   ============================================================ */

/* GLOBAL NAVBAR & BODY RESET (All Screen Sizes) */
body {
  padding-top: 66px !important;
}

#navbar, .navbar {
  background-color: #ffffff !important;
  box-shadow: 0 1px 6px rgba(63, 58, 100, 0.08) !important;
  border-bottom: 1px solid #eef2f6 !important;
  padding: 8px 0 !important;
}

.navbar .navbar-brand span.brand-site-title {
  color: #1e1b4b !important;
  font-weight: 700 !important;
}

.navbar .navbar-nav .nav-link {
  color: #4b5563 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 10px 14px !important;
  text-transform: capitalize !important;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: #20ad96 !important;
}

/* GLOBAL MOBILE BASE */
@media (max-width: 991.98px) {
  html { font-size: 15px; scroll-padding-top: 70px; }
  body { padding-top: 58px !important; overflow-x: hidden !important; }
  .section { padding-top: 50px !important; padding-bottom: 50px !important; }
  .container { padding-left: 16px !important; padding-right: 16px !important; }
  img { max-width: 100%; height: auto; }
}

/* NAVBAR MOBILE */
@media (max-width: 991.98px) {
  #navbar {
    background-color: #ffffff !important;
    padding: 8px 0 !important;
    box-shadow: 0 2px 10px rgba(63, 58, 100, 0.08) !important;
  }
  #navbar .navbar-brand span.brand-site-title { font-size: 1rem !important; }
  #navbar .navbar-toggler {
    padding: 4px 8px !important;
    border: 1px solid rgba(63, 58, 100, 0.2) !important;
    border-radius: 6px !important;
    font-size: 22px !important;
    color: #3f3a64 !important;
  }
  .navbar-collapse {
    position: fixed !important;
    top: 58px !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10) !important;
    z-index: 9999 !important;
    padding: 12px 0 20px !important;
    border-top: 1px solid #f0f0f0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .navbar .navbar-nav .nav-link {
    padding: 11px 20px !important;
    font-size: 14px !important;
    color: #3f3a64 !important;
    border-bottom: 1px solid #f5f5f5;
  }
  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .nav-link.active { color: #20ad96 !important; background: rgba(32,173,150,0.06) !important; }
  .header-menu .d-none.d-sm-block { display: none !important; }
}

/* HERO SECTION */
@media (max-width: 767.98px) {
  .hero-enhanced { padding-top: 75px !important; padding-bottom: 30px !important; }
  .hero-main-title { font-size: 1.85rem !important; line-height: 1.22 !important; letter-spacing: -0.01em !important; margin-bottom: 12px !important; }
  .hero-subtitle { font-size: 0.92rem !important; line-height: 1.55 !important; margin-bottom: 16px !important; }
  .hero-search-bar { padding: 4px 4px 4px 14px !important; border-radius: 40px !important; }
  .hero-search-input { font-size: 0.88rem !important; padding: 7px 4px !important; }
  .hero-search-btn { padding: 8px 16px !important; font-size: 0.82rem !important; }
  .hero-pill-badge { font-size: 11px !important; padding: 3px 10px !important; }
}

/* ARTICLE DETAIL PAGE */
@media (max-width: 767.98px) {
  .article-detail-title { font-size: 1.4rem !important; line-height: 1.3 !important; }
  .breadcrumb { font-size: 12px !important; flex-wrap: wrap !important; gap: 2px; }
  .col-lg-4.mt-5.mt-lg-0 { margin-top: 24px !important; }
  .article-content { font-size: 1rem !important; line-height: 1.75 !important; }
  .article-content h2 { font-size: 1.35rem !important; margin-top: 1.5rem !important; }
  .article-content h3 { font-size: 1.15rem !important; }
  .quick-answer-card { padding: 1rem 1.1rem !important; margin: 1rem 0 !important; border-radius: 8px !important; }
  .toc-container { padding: 1rem !important; font-size: 0.88rem !important; }
  .article-content img { max-width: 100% !important; height: auto !important; border-radius: 8px !important; }
  .article-content table { display: block !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; font-size: 0.88rem !important; }
  .blog-image img { height: 180px !important; object-fit: cover !important; }
}

/* CATEGORY & HUB PAGES */
@media (max-width: 767.98px) {
  h1.display-6 { font-size: 1.5rem !important; line-height: 1.3 !important; }
  .d-flex.flex-wrap.gap-2.mt-4.pt-2.border-top {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px !important;
    scrollbar-width: none;
  }
  .d-flex.flex-wrap.gap-2.mt-4.pt-2.border-top::-webkit-scrollbar { display: none; }
  .d-flex.flex-wrap.gap-2.mt-4.pt-2.border-top .btn { white-space: nowrap !important; flex-shrink: 0; }
  .col-lg-4.col-md-6 { margin-top: 16px !important; padding-top: 0 !important; }
}

/* HOME PAGE */
#faq .col-lg-6 img {
  max-height: 320px !important;
  max-width: 100% !important;
  width: auto !important;
  object-fit: contain !important;
}

@media (max-width: 991.98px) {
  #faq .col-lg-6.text-center { display: none !important; }
}

@media (max-width: 767.98px) {
  #categories .service-box { text-align: center !important; padding: 20px 16px !important; }
  #categories .service-box i.f-36 { font-size: 28px !important; }
  #trending .blog-image img { height: 190px !important; }
  #faq .card-header { margin-left: 16px !important; }
  #faq .card-body { margin-left: 28px !important; }
}

/* NEWSLETTER CTA */
@media (max-width: 767.98px) {
  .cta-2 { padding-top: 40px !important; padding-bottom: 40px !important; }
  .cta-2 h2 { font-size: 1.5rem !important; line-height: 1.3 !important; }
  .cta-2 .cta-title { font-size: 14px !important; }
  .cta-2 .subscribe-form .input-group {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 4px !important;
  }
  .cta-2 .subscribe-form .input-group .form-control {
    width: 100% !important;
    border-radius: 30px !important;
    padding: 12px 20px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
  }
  .cta-2 .subscribe-form .input-group button#subscribebtn {
    width: 100% !important;
    border-radius: 30px !important;
    padding: 12px 24px !important;
  }
}

/* FOOTER */
@media (max-width: 767.98px) {
  .footer.py-5 { padding-top: 36px !important; padding-bottom: 20px !important; }
  .footer .col-lg-6, .footer .col-lg-3 { margin-bottom: 24px !important; }
  .footer h5 { font-size: 1rem !important; margin-bottom: 10px !important; }
  .footer .social-icon i.f-30 { font-size: 24px !important; }
  .bg-light.pb-4 { padding-top: 12px !important; padding-bottom: 20px !important; }
}

/* COOKIE BANNER */
@media (max-width: 575.98px) {
  #cookie-consent-banner {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    max-width: calc(100% - 24px) !important;
    padding: 16px !important;
  }
}

/* BACK TO TOP */
@media (max-width: 767.98px) {
  #back-to-top { bottom: 16px !important; right: 16px !important; width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 18px !important; }
}

/* GENERAL UTILITY */
@media (max-width: 767.98px) {
  .row { --bs-gutter-x: 14px; }
  .btn { min-height: 42px; padding: 10px 22px !important; font-size: 12px !important; }
  .btn-sm { min-height: 36px; padding: 7px 16px !important; font-size: 12px !important; }
  h2 { font-size: 1.45rem !important; }
  h3 { font-size: 1.2rem !important; }
  h5 { font-size: 1rem !important; }
  .heading h2 { font-size: 1.4rem !important; }
  .heading p { font-size: 0.9rem !important; }
  .card { border-radius: 8px !important; }
  .pagination .page-link { padding: 6px 10px !important; font-size: 13px !important; }
}

/* DISABLE HEAVY ANIMATIONS ON MOBILE (performance) */
@media (max-width: 767.98px) {
  .hero-sub, .hero-heading { animation: none !important; opacity: 1 !important; transform: none !important; }
  .blog-image img:hover,
  .cta-image .bg-img img:hover,
  .sec-image .bg-img img:hover { transform: none !important; }
}

/* VERY SMALL SCREENS (375px and below) */
@media (max-width: 375px) {
  html { font-size: 14px; }
  .hero-main-title { font-size: 1.6rem !important; }
  .container { padding-left: 12px !important; padding-right: 12px !important; }
  #navbar .navbar-brand span.brand-site-title { font-size: 0.9rem !important; }
}
