/* ============================================================
   SARDAR INSURANCE - RESPONSIVE OVERRIDES
   Loaded after brand.css. Keep layout fixes here.
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

.btn,
.nav-link,
.footer-links a,
.plan-list a,
.plan-option-link {
  overflow-wrap: anywhere;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.forms-table,
.coverage-table {
  min-width: 680px;
}

.sticky-cta,
.sticky-right-cta {
  align-self: start;
}

@media (max-width: 1199.98px) {
  .navbar-brand-custom .nav-link {
    font-size: 0.8rem;
    padding: 0.95rem 0.55rem !important;
    gap: 0.35rem;
  }

  .brand-logo-img {
    width: 132px;
  }

  .hero-section {
    min-height: auto;
    padding: 4.5rem 0;
  }

  .mega-menu .dropdown-menu {
    max-height: calc(100vh - 92px);
    overflow-y: auto;
  }

  .mega-menu .insurer-logo-card {
    min-height: 118px;
  }

  .sticky-cta-bar .nav-link {
    padding: 0.9rem 0.55rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 991.98px) {
  .top-bar .d-flex {
    row-gap: 0.35rem;
  }

  .navbar-brand-custom {
    padding: 0.35rem 0;
  }

  .navbar-brand-custom .navbar-collapse {
    margin-top: 0.6rem;
    padding: 0.6rem 0 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .navbar-brand-custom .navbar-nav {
    align-items: stretch !important;
    gap: 0.15rem !important;
  }

  .navbar-brand-custom .nav-link {
    padding: 0.72rem 0.85rem !important;
    border-radius: 8px;
  }

  .navbar-brand-custom .nav-link::after {
    display: none;
  }

  .navbar-brand-custom .nav-link:hover,
  .navbar-brand-custom .nav-link.active {
    background: rgba(255,255,255,0.08);
  }

  .mega-menu {
    position: relative !important;
  }

  .mega-menu .dropdown-menu {
    position: static !important;
    width: 100%;
    max-height: 70vh;
    margin-top: 0.35rem;
    padding: 1rem !important;
    border-radius: 10px;
    border-top-width: 2px;
    box-shadow: none;
  }

  #megaTabs {
    flex-direction: row !important;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
  }

  .mega-menu-tab {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    min-height: 42px;
    text-align: center;
  }

  .mega-menu .insurer-logo-card {
    min-height: 104px;
    padding: 0.85rem 0.5rem;
  }

  .mega-menu .insurer-logo-card .insurer-name,
  .insurer-logo-card .insurer-name {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .plan-option-link {
    min-height: 74px;
  }

  .hero-section,
  .about-hero,
  .contact-hero,
  .plan-hero,
  .achievement-hero,
  .category-hero,
  .plan-detail-hero,
  .legal-hero {
    padding: 3.5rem 0;
  }

  .plan-hero {
    padding-bottom: 0;
  }

  .plan-hero-body {
    padding: 2.5rem 0 3rem;
  }

  .hero-title,
  .text-hero-about,
  .text-hero-page,
  .plan-hero-title {
    font-size: clamp(1.8rem, 6vw, 2.45rem) !important;
  }

  .hero-subtitle {
    max-width: none;
    font-size: 0.95rem;
  }

  .hero-float-card {
    margin-bottom: 0.65rem;
  }

  .category-hero-icon {
    width: 112px;
    height: 112px;
    margin: 1.5rem auto 0;
    font-size: 3rem;
  }

  .lead-form-wrapper,
  .form-card,
  .contact-info-box,
  .section-card,
  .cta-card,
  .sip-calc-wrapper {
    padding: 1.6rem;
  }

  .sticky-cta,
  .sticky-right-cta {
    position: static;
  }

  .footer-main {
    padding: 3rem 0 1.5rem;
  }
}

@media (max-width: 767.98px) {
  body {
    font-size: 0.94rem;
  }

  .container {
    --bs-gutter-x: 1.25rem;
  }

  .top-bar {
    font-size: 0.72rem;
    text-align: center;
  }

  .top-bar .container > .d-flex {
    justify-content: center !important;
  }

  .brand-logo-img {
    width: 124px;
  }

  .navbar-toggler {
    padding: 0.35rem 0.5rem;
  }

  .hero-section,
  .about-hero,
  .contact-hero,
  .achievement-hero,
  .category-hero,
  .plan-detail-hero,
  .legal-hero {
    padding: 3rem 0;
  }

  .section-py-80,
  .section-py-70,
  .section-py-60,
  .py-5 {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
  }

  .section-title {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .section-badge,
  .hero-badge,
  .category-badge,
  .achievement-badge {
    white-space: normal;
    line-height: 1.35;
  }

  .hero-stats {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
  }

  .stat-item .stat-num,
  .achievement-stat-number,
  .sip-result-amount {
    font-size: 1.45rem;
  }

  .hero-float-card,
  .why-card,
  .achievement-stat,
  .achievement-image-body,
  .feature-item,
  .exclusion-item,
  .contact-info-item {
    align-items: flex-start !important;
  }

  .service-card,
  .plan-card-header,
  .testimonial-card,
  .why-card,
  .category-card,
  .value-card,
  .team-card,
  .contact-card,
  .section-card,
  .cta-card,
  .sip-calc-wrapper,
  .lead-form-wrapper {
    border-radius: 12px;
  }

  .service-card,
  .testimonial-card,
  .why-card,
  .category-card,
  .value-card,
  .contact-card {
    padding: 1.25rem;
  }

  .testimonial-slide {
    flex-basis: calc((100% - 1.5rem) / 2);
  }

  .plan-card-header {
    padding: 1.25rem;
  }

  .section-card-title {
    font-size: 1.12rem;
  }

  .stat-counter {
    padding: 1.35rem 0.75rem;
  }

  .stat-counter .num {
    font-size: 2rem;
  }

  .timeline {
    padding-left: 1.55rem;
  }

  .timeline-dot {
    left: -2.05rem;
  }

  .achievement-section-heading {
    align-items: flex-start;
  }

  .achievement-image-body {
    padding: 1.1rem;
  }

  .map-frame iframe {
    min-height: 300px;
  }

  .toc-card {
    padding: 1.2rem;
  }

  .legal-content h2 {
    font-size: 1.16rem;
  }

  .footer-main .row {
    row-gap: 1.6rem;
  }

  .footer-bottom .d-flex,
  .footer-main .d-flex.flex-wrap.justify-content-between {
    justify-content: center !important;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .testimonial-slide {
    flex-basis: 100%;
  }

  .container {
    --bs-gutter-x: 1rem;
  }

  .container > .row,
  .container-fluid > .row {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .top-bar .d-flex,
  .top-bar .gap-3 {
    gap: 0.45rem !important;
  }

  .navbar-brand-custom .nav-link {
    font-size: 0.8rem;
    padding: 0.65rem 0.75rem !important;
  }

  .brand-logo-img {
    width: 112px;
  }

  .mega-menu .dropdown-menu {
    max-height: 68vh;
    padding: 0.85rem !important;
  }

  .mega-menu-tab {
    flex-basis: 100%;
    min-height: 38px;
    font-size: 0.72rem !important;
  }

  .mega-menu .row,
  #healthPlansList .row,
  #motorPlansList .row {
    --bs-gutter-x: 0.65rem;
    --bs-gutter-y: 0.65rem;
  }

  .mega-menu .insurer-logo-card {
    min-height: 96px;
  }

  .plan-option-link {
    padding: 0.65rem !important;
  }

  .plan-option-link .text-3xl {
    font-size: 1.2rem;
  }

  .hero-section,
  .about-hero,
  .contact-hero,
  .achievement-hero,
  .category-hero,
  .plan-detail-hero,
  .legal-hero {
    padding: 2.5rem 0;
  }

  .hero-title,
  .text-hero-about,
  .text-hero-page,
  .plan-hero-title {
    font-size: clamp(1.55rem, 9vw, 2rem) !important;
  }

  .hero-subtitle,
  .text-lead,
  .text-lead-sm {
    font-size: 0.88rem;
  }

  .hero-section .btn,
  .about-hero .btn,
  .contact-hero .btn,
  .plan-hero .btn,
  .lead-form-wrapper .btn,
  .form-card .btn,
  .cta-card .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-float-card {
    padding: 0.95rem;
  }

  .hero-float-icon,
  .why-icon,
  .contact-info-icon,
  .feature-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .service-icon,
  .category-card-icon,
  .value-icon,
  .contact-icon-wrap {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }

  .plan-card-icon {
    width: 48px;
    height: 48px;
  }

  .lead-form-wrapper,
  .form-card,
  .contact-info-box,
  .section-card,
  .cta-card,
  .sip-calc-wrapper {
    padding: 1.2rem;
  }

  .form-control,
  .form-select {
    min-height: 44px;
    font-size: 0.86rem;
  }

  .input-group .form-control,
  .input-group .btn,
  .input-group .input-group-text {
    min-height: 44px;
  }

  .forms-table {
    min-width: 620px;
  }

  .coverage-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
  }

  .forms-table th,
  .forms-table td,
  .coverage-table th,
  .coverage-table td {
    padding: 0.7rem 0.75rem;
    font-size: 0.8rem;
  }

  .eligibility-row {
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .eligibility-row .badge {
    max-width: 58%;
    white-space: normal;
    line-height: 1.35;
    text-align: right;
  }

  .category-card p {
    min-height: 0;
  }

  .category-hero-icon {
    width: 92px;
    height: 92px;
    font-size: 2.4rem;
  }

  .achievement-stat {
    padding: 1rem;
  }

  .achievement-stat i {
    font-size: 1.5rem;
  }

  .achievement-image-body {
    flex-direction: column;
    gap: 0.75rem;
  }

  .team-avatar {
    width: 76px;
    height: 76px;
    font-size: 1.65rem;
  }

  .cert-badge,
  .feature-chip,
  .doc-chip {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .legal-content p,
.legal-content li {
    font-size: 0.86rem;
    line-height: 1.7;
  }

  .whatsapp-fab {
    right: 16px !important;
    bottom: 16px !important;
    width: 52px !important;
    height: 52px !important;
  }
}

@media (max-width: 380px) {
  .container {
    --bs-gutter-x: 0.85rem;
  }

  .brand-logo-img {
    width: 104px;
  }

  .hero-title,
  .text-hero-about,
  .text-hero-page,
  .plan-hero-title {
    font-size: 1.45rem !important;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .btn-brand,
  .btn-accent,
  .btn-outline-brand,
  .btn-outline-white {
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 0.84rem;
  }

  .service-card,
  .testimonial-card,
  .why-card,
  .category-card,
  .value-card,
  .contact-card,
  .lead-form-wrapper,
  .form-card,
  .section-card,
  .cta-card,
  .sip-calc-wrapper {
    padding: 1rem;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .mega-menu .dropdown-menu {
    max-height: 76vh;
  }

  .hero-section,
  .about-hero,
  .contact-hero,
  .achievement-hero,
  .category-hero,
  .plan-detail-hero,
  .legal-hero {
    padding: 2rem 0;
  }
}
