/* ==========================================================================
   MAST H.R — GLOBAL MULTI-DEVICE RESPONSIVE STYLESHEET (v2.0)
   Loaded AFTER masthr.css and page {% block extra_css %} in base.html.
   Covers:
   - Ultra-compact / Foldable cover displays (280px – 374px)
   - Standard & Large Mobile phones (375px – 575px)
   - Phablets & Mobile Landscape (576px – 767px / max-height: 520px)
   - Tablets Portrait & Landscape (768px – 1024px)
   - Laptops & Compact Desktops (1025px – 1399px)
   - Desktops & Large PCs (1400px – 1920px+)
   - 4K / Ultra-wide monitors (2560px – 3840px)
   - Notched devices (safe-area-inset-*), Touch (@media hover: none)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. UNIVERSAL OVERFLOW GUARDS, FLUID MEDIA & SAFE-AREA FOUNDATION
   -------------------------------------------------------------------------- */
html {
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  overflow-x: clip;
  min-width: 0;
  max-width: 100%;
  position: relative;
}

@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

main {
  min-width: 0;
  width: 100%;
}

img,
svg,
video,
canvas,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Prevent long email addresses, passport/visa IDs, or URLs from blowing layouts */
main p,
main li,
.card-body,
.mast-footer a,
.mast-footer p,
.text-break-safe,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Guarantee interactive clickability of desktop language buttons & portal logins */
.navbar-nav-spacer,
.navbar-nav-spacer > * {
  pointer-events: auto !important;
}

/* Safe-area support for iPhone / notched devices in portrait & landscape */
.main-navbar {
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

.mast-footer {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

.mast-mobile-offcanvas {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* --------------------------------------------------------------------------
   2. SUPPORT UTILITIES FOR EXISTING TEMPLATE MARKUP
   -------------------------------------------------------------------------- */
.max-w-\[1480px\] {
  max-width: 1480px;
  width: 100%;
}

.max-w-900 { max-width: 900px; width: 100%; }
.max-w-850 { max-width: 850px; width: 100%; }
.max-w-750 { max-width: 750px; width: 100%; }
.max-w-700 { max-width: 700px; width: 100%; }
.max-w-650 { max-width: 650px; width: 100%; }
.max-w-600 { max-width: 600px; width: 100%; }
.max-w-500 { max-width: 500px; width: 100%; }
.max-w-300 { max-width: 300px; width: 100%; }

.text-white-75 { color: rgba(255, 255, 255, 0.78) !important; }
.shadow-xs { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important; }

.gap-2\.5 { gap: 0.625rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.p-3\.5 { padding: 0.875rem !important; }

.bg-white\/95 {
  background-color: rgba(255, 255, 255, 0.95) !important;
}

.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.border-emerald-200 {
  border-color: #a7f3d0 !important;
}

.border-white\/20 {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.bg-emerald-500 {
  background-color: #10b981 !important;
}

.text-slate-700 {
  color: #334155 !important;
}

.text-slate-400 {
  color: #94a3b8 !important;
}

.text-xs {
  font-size: 0.75rem !important;
  line-height: 1.25;
}

.text-\[11px\] {
  font-size: 11px !important;
  line-height: 1.3;
}

.w-2 {
  width: 0.5rem !important;
  flex-shrink: 0;
}

.h-2 {
  height: 0.5rem !important;
  flex-shrink: 0;
}

.rounded-full {
  border-radius: 9999px !important;
}

.px-3\.5 {
  padding-left: 0.875rem !important;
  padding-right: 0.875rem !important;
}

.py-1\.5 {
  padding-top: 0.375rem !important;
  padding-bottom: 0.375rem !important;
}

.p-2\.5 {
  padding: 0.625rem !important;
}

@keyframes mastPulseSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.animate-pulse {
  animation: mastPulseSoft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --------------------------------------------------------------------------
   3. GLOBAL BUTTON, DROPDOWN & CARD GUARDRAILS
   -------------------------------------------------------------------------- */
.nav-dropdown-menu {
  max-width: calc(100vw - 24px);
}

.btn {
  max-width: 100%;
}

.row > * {
  min-width: 0;
}

main section {
  overflow-x: clip;
}

.top-countries-3d-wrapper {
  overflow: hidden;
  max-width: 100%;
}

.top-countries-3d-floor-glow {
  max-width: 100%;
}

@keyframes mastWhatsappPulseContained {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.24);
    opacity: 0;
  }
}

.whatsapp-pulse-ring {
  inset: -1px !important;
  animation: mastWhatsappPulseContained 2.4s ease-out infinite !important;
}

.whatsapp-pulse-ring-inner {
  inset: 0 !important;
  animation: mastWhatsappPulseContained 2.4s 0.45s ease-out infinite !important;
}

.floating-whatsapp-widget {
  z-index: 1030;
}

.floating-back-to-top {
  z-index: 1029;
}

div[style*="var(--navy-dark)"],
div[style*="#000E4A"],
.cinematic-page-header {
  overflow-x: clip;
}

.office-map-frame,
.office-map-frame iframe {
  min-height: 400px;
}

/* --------------------------------------------------------------------------
   4. LARGE DESKTOPS, 1080P & 4K MONITORS (>= 1400px, >= 1920px & >= 2560px)
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .hero-full-space-inner.container-fluid {
    max-width: 1480px;
  }

  .main-navbar .container {
    max-width: 1400px;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 1460px;
  }

  .main-navbar .container {
    max-width: 1460px;
  }

  .hero-full-space-inner.container-fluid {
    max-width: 1540px;
  }
}

@media (min-width: 2560px) {
  .container {
    max-width: 1560px !important;
  }

  .hero-full-space-inner.container-fluid {
    max-width: 1680px !important;
  }

  .main-navbar .container {
    max-width: 1600px !important;
  }
}

/* --------------------------------------------------------------------------
   5. LAPTOPS & COMPACT DESKTOPS (992px – 1399.98px)
      Ensures the top navbar capsule & dropdowns fit 1024px/1180px/1280px
      screens cleanly without squeezing or wrapping.
   -------------------------------------------------------------------------- */
@media (max-width: 1399.98px) and (min-width: 992px) {
  .main-navbar .container {
    max-width: 100% !important;
    padding-left: clamp(12px, 2vw, 24px) !important;
    padding-right: clamp(12px, 2vw, 24px) !important;
  }

  .navbar-brand-wrapper {
    gap: 10px;
    flex-shrink: 0;
  }

  .navbar-agency-title {
    font-size: 17px;
  }

  .nav-capsule-wrapper {
    padding: 4px 6px;
  }

  .nav-capsule-wrapper .nav-link-custom {
    padding: 6px 11px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .navbar-nav-spacer {
    gap: 6px !important;
    flex-shrink: 0;
    min-width: auto;
  }

  .nav-portal-login,
  .nav-portal-pill {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .main-navbar {
    padding: 10px 0 !important;
  }

  .main-navbar .container {
    padding-left: clamp(8px, 1.5vw, 16px) !important;
    padding-right: clamp(8px, 1.5vw, 16px) !important;
    gap: 4px;
  }

  .navbar-brand-wrapper {
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
  }

  .navbar-brand-logo {
    height: 42px;
    width: auto;
  }

  .navbar-agency-title {
    font-size: 15.5px;
  }

  .navbar-slogan-small {
    font-size: 7.8px;
    letter-spacing: 0.5px;
  }

  .nav-capsule-wrapper {
    padding: 3px 5px;
    gap: 0;
  }

  .nav-capsule-wrapper .nav-link-custom {
    padding: 5px 8px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  .navbar-nav-spacer {
    padding: 2px 3px;
    gap: 4px !important;
    min-width: 0;
    flex-shrink: 0;
  }

  .mast-lang-switch {
    height: 34px;
    padding: 2px;
  }

  .mast-lang-switch .lang-btn {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .mast-lang-switch .lang-btn[data-lang="bn"] {
    font-size: 12px;
    padding: 0 9px;
  }

  .nav-portal-login,
  .nav-portal-pill {
    padding: 5px 10px;
    font-size: 11.5px;
  }
}

@media (max-width: 1099.98px) and (min-width: 992px) {
  .navbar-slogan-small {
    display: none !important;
  }

  .navbar-agency-title {
    font-size: 14.5px;
  }

  .navbar-brand-logo {
    height: 38px;
  }

  .nav-capsule-wrapper .nav-link-custom {
    padding: 5px 6px;
    font-size: 11px;
  }

  .nav-portal-login,
  .nav-portal-pill {
    padding: 5px 8px;
    font-size: 11px;
  }

  html.bengali-font-active .nav-capsule-wrapper .nav-link-custom,
  html[lang="bn"] .nav-capsule-wrapper .nav-link-custom {
    padding: 4px 5px !important;
    font-size: 10.5px !important;
  }
}

/* --------------------------------------------------------------------------
   6. TABLETS & SMALLER (<= 991.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  /* Guarantee immediate visibility and zero sideways slide-offset on touch devices */
  body.js-motion-active .motion-fade-up,
  body.js-motion-active .motion-zoom-in,
  body.js-motion-active .motion-slide-right,
  body.js-motion-active .motion-slide-left {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  /* Unstick sidebars, filter panels, and forms on mobile and tablet so they don't block viewport scrolling */
  .sticky-top,
  .vacancies-sidebar-card.sticky-top,
  .vacancies-sidebar-card.sticky-lg-top,
  .apply-form-card.sticky-top,
  .apply-form-card.sticky-lg-top,
  .counsel-white-info-box.sticky-top,
  .counsel-white-info-box.sticky-lg-top {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }

  .vacancies-3d-stage {
    height: auto;
    min-height: 0;
  }

  .vacancies-3d-stage .job-card {
    height: auto;
    min-height: 360px;
  }

  .executive-partner-card {
    width: min(340px, 82vw);
    min-width: min(340px, 82vw);
    height: auto;
  }

  .top-countries-section,
  .analytics-counters-section,
  .trust-showcase-section,
  .route-abroad-section,
  .news-bulletins-section,
  .global-reputation-section,
  .client-testimonials-section,
  .home-testimonials-section,
  .office-contact-section {
    padding-top: 30px !important;
    padding-bottom: 26px !important;
  }

  .why-choose-ref-section {
    padding-top: 20px !important;
    padding-bottom: 14px !important;
  }

  /* Ensure dropdowns or popovers inside cards cannot clip awkwardly */
  .mast-hero-slider-wrapper {
    min-height: 460px;
  }

  .office-map-frame,
  .office-map-frame iframe {
    min-height: 320px;
  }

  /* Relax overly wide g-5 gutters on tablet/mobile so negative row margin never exceeds container padding */
  .row.g-5 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.75rem;
  }

  .about-subnav-scroll,
  .bmet-nav-pills-scroll {
    max-width: 100%;
    min-width: 0;
  }

  .about-subnav-pills {
    flex-wrap: wrap;
    border-radius: 18px !important;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px !important;
  }
}

/* --------------------------------------------------------------------------
   6.5 DESKTOPS & TABLETS (>= 768px) - CONTACT SECTION MATCHED HEIGHTS
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .office-contact-section .h-md-100 {
    height: 100% !important;
  }

  .exact-contact-card.h-md-100 {
    height: 100% !important;
  }

  .exact-contact-card .contact-card-inner-row {
    height: 100% !important;
    align-items: center !important;
  }

  .exact-contact-card .exact-contact-image-col {
    height: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   7. MOBILE PHONES & PHABLETS (<= 767.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  div[style*="var(--navy-dark)"]::before,
  div[style*="#000E4A"]::before,
  .cinematic-page-header::before {
    width: min(100%, 420px) !important;
  }

  .sky-ambient-orb {
    max-width: 72vw !important;
    max-height: 72vw !important;
  }

  .clients-hero-glow {
    width: min(88vw, 380px) !important;
    height: min(88vw, 380px) !important;
    right: -20px !important;
  }

  /* Prevent automatic zoom-on-focus in iOS Safari for form inputs */
  input,
  select,
  textarea,
  input.form-control,
  select.form-select,
  textarea.form-control,
  .sidebar-form-control {
    font-size: 16px !important;
  }

  .floating-whatsapp-widget {
    bottom: max(14px, env(safe-area-inset-bottom));
    right: max(14px, env(safe-area-inset-right));
    width: 48px;
    height: 48px;
  }

  .floating-back-to-top {
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 58px);
    right: max(17px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
  }

  .executive-partner-card {
    width: min(295px, 84vw);
    min-width: min(295px, 84vw);
    height: auto;
    padding: 20px;
  }

  .partners-marquee-track {
    gap: 16px;
  }

  .top-countries-section,
  .analytics-counters-section,
  .trust-showcase-section,
  .route-abroad-section,
  .news-bulletins-section,
  .global-reputation-section,
  .client-testimonials-section,
  .home-testimonials-section,
  .office-contact-section {
    padding-top: 26px !important;
    padding-bottom: 22px !important;
  }

  .why-choose-ref-section {
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }

  .vacancies-3d-stage .job-card {
    min-height: 320px;
  }

  .modal-dialog {
    margin: 0.5rem auto !important;
    max-width: min(640px, calc(100vw - 20px)) !important;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Ensure filter/pagination groups wrap gracefully on narrow viewports */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .badge {
    white-space: normal;
    max-width: 100%;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: break-word;
  }

  /* Breadcrumb capsules fluid wrap */
  .counsel-breadcrumb-capsule,
  .vacancies-breadcrumb-capsule,
  .job-detail-breadcrumb,
  .mast-breadcrumb-pill {
    flex-wrap: wrap !important;
    max-width: 100%;
  }

  /* Exact Contact Card responsive layout fixes: prevent vertical clipping */
  .exact-contact-card {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    border-radius: 24px !important;
    overflow: hidden !important;
  }

  .exact-contact-card > .row,
  .exact-contact-card .contact-card-inner-row,
  .exact-contact-card .row.g-0 {
    height: auto !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .exact-contact-card .exact-contact-form-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    padding: 22px 18px 14px !important;
  }

  .exact-contact-card .exact-contact-image-col {
    height: auto !important;
    min-height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    padding: 4px 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Contact illustration scaling on mobile */
  .support-agent-img,
  .exact-contact-card img {
    max-height: 200px !important;
    width: auto !important;
    max-width: 82% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* Body text comfortable left alignment (avoids typographic rivers from justify) */
  .human-leadership-card .text-secondary,
  .md-full-statement,
  .section-desc-lead,
  .mv-quote-text,
  .mv-point-text,
  .mv-goal-lead,
  main [style*="text-align: justify"],
  main [style*="text-align:justify"] {
    text-align: left !important;
    text-justify: auto !important;
  }

  /* Inside horizontally scrolling tables, status badges and row buttons stay on one line */
  .table .badge,
  .table .btn {
    white-space: nowrap;
  }

  /* Centered testimonial quotes: justify in a narrow column leaves wide word gaps */
  .client-quote-text {
    text-align: center !important;
  }

  /* Phone field in the apply form keeps 16px so iOS does not zoom on focus */
  .phone-input-group .phone-input-field {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------------------------------
   8. STANDARD PORTRAIT MOBILE PHONES (<= 575.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .main-navbar {
    padding: 8px 0 !important;
  }

  .navbar-brand-wrapper {
    max-width: calc(100% - 138px) !important;
    min-width: 0 !important;
  }

  .navbar-brand-text {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .navbar-agency-title {
    font-size: 15px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .navbar-brand-logo {
    height: 36px !important;
  }

  .navbar-slogan-small {
    display: none !important;
  }

  .mast-hero-slider-wrapper {
    min-height: 400px;
  }

  .mast-footer {
    padding-top: 40px;
  }

  .mast-footer-cta-pill {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .btn-lg {
    font-size: 0.96rem;
    padding: 0.68rem 1.15rem;
    white-space: normal;
  }

  .top-countries-section,
  .analytics-counters-section,
  .trust-showcase-section,
  .route-abroad-section,
  .news-bulletins-section,
  .global-reputation-section,
  .client-testimonials-section,
  .home-testimonials-section,
  .office-contact-section {
    padding-top: 22px !important;
    padding-bottom: 18px !important;
  }

  .why-choose-ref-section {
    padding-top: 14px !important;
    padding-bottom: 10px !important;
  }

  .office-map-frame,
  .office-map-frame iframe {
    min-height: 260px;
  }

  main .global-reputation-section .leaf-card {
    width: 168px !important;
    min-width: 168px !important;
    height: 118px !important;
  }

  main .stats-arch-showcase .stat-arch-card {
    padding: 24px 12px 20px !important;
    min-height: 132px !important;
  }

  .stat-glass-card-teal {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 14px 12px !important;
    gap: 10px !important;
  }

  .stat-glass-icon-sky {
    width: 42px !important;
    height: 42px !important;
    font-size: 19px !important;
  }

  .stat-glass-number-white {
    font-size: clamp(1.25rem, 5.5vw, 1.65rem) !important;
  }

  .bmet-fee-table-card,
  .table-responsive {
    max-width: 100%;
    min-width: 0;
  }

  .bmet-fee-table thead th,
  .bmet-fee-table tbody td {
    padding: 0.65rem 0.7rem !important;
    font-size: 0.82rem !important;
  }

  .reputation-trust-col {
    padding: 8px 4px;
  }

  .reputation-trust-title {
    font-size: 12px !important;
  }

  .reputation-trust-subtitle {
    font-size: 10px !important;
  }

  .exact-contact-card .exact-contact-form-col {
    padding: 20px 16px 12px !important;
  }

  .exact-contact-card .exact-contact-image-col {
    padding: 2px 14px 18px !important;
  }

  .exact-contact-card .support-agent-img,
  .exact-contact-card img {
    max-height: 180px !important;
  }
}

/* --------------------------------------------------------------------------
   9. ULTRA-COMPACT & FOLDABLE COVER DISPLAYS (<= 374.98px: 280px – 374px)
   -------------------------------------------------------------------------- */
@media (max-width: 374.98px) {
  .container,
  .container-fluid,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .exact-contact-card .exact-contact-form-col {
    padding: 16px 12px 10px !important;
  }

  .exact-contact-card .exact-contact-form-col h3 {
    font-size: 21px !important;
  }

  .exact-contact-card .exact-contact-image-col {
    padding: 0 10px 14px !important;
  }

  .exact-contact-card .support-agent-img,
  .exact-contact-card img {
    max-height: 155px !important;
  }

  .exact-pill-input {
    padding: 8px 14px !important;
    font-size: 12.5px !important;
  }

  .exact-pill-textarea {
    padding: 9px 14px !important;
    font-size: 12.5px !important;
    min-height: 70px !important;
  }

  .navbar-brand-wrapper {
    max-width: calc(100% - 126px) !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  .navbar-brand-logo {
    height: 30px !important;
  }

  .navbar-brand-text {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .navbar-agency-title {
    font-size: 13.5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .btn-nav-mobile-toggle {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 17px !important;
    padding: 0 !important;
  }

  .mast-lang-switch-sm {
    height: 30px !important;
    padding: 2px !important;
    gap: 1.5px !important;
  }

  .mast-lang-switch-sm .lang-btn {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    min-width: 28px !important;
    padding: 0 7px !important;
    font-size: 10.5px !important;
  }

  .mast-lang-switch-sm .lang-btn[data-lang="bn"] {
    font-size: 11px !important;
    padding: 0 7px !important;
  }

  .stat-arch-number {
    font-size: clamp(19px, 5.5vw, 22px) !important;
  }

  .stat-arch-label {
    font-size: 10.5px !important;
  }

  .executive-partner-card {
    width: min(252px, 84vw);
    min-width: min(252px, 84vw);
    padding: 16px;
  }

  /* Compact Testimonials card on ultra-narrow phones */
  .client-card-item {
    flex: 0 0 min(265px, 84vw) !important;
    width: min(265px, 84vw) !important;
    height: auto !important;
    min-height: 310px !important;
    padding: 18px 14px 16px !important;
  }

  .client-quote-text {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
  }

  .client-author-wrap {
    margin-top: 10px !important;
    padding-top: 10px !important;
  }

  /* 3D cylinder adjustments for Galaxy Fold (280px - 340px) */
  .top-countries-3d-wrapper {
    height: 195px !important;
  }

  .top-countries-3d-inner {
    --translateZ: 96px !important;
    --w: 64px !important;
    --h: 96px !important;
  }

  main .global-reputation-section .leaf-card {
    width: 140px !important;
    min-width: 140px !important;
    height: 104px !important;
  }

  main .stats-arch-showcase .stat-arch-card {
    padding: 18px 8px 16px !important;
    min-height: 114px !important;
  }

  .construction-banner-title {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem) !important;
  }

  .construction-btn-pill {
    padding: 8px 16px !important;
    font-size: 12px !important;
    width: 100% !important;
  }

  .floating-whatsapp-widget {
    width: 42px;
    height: 42px;
    font-size: 20px;
    bottom: max(10px, env(safe-area-inset-bottom));
    right: max(12px, env(safe-area-inset-right));
  }

  .floating-back-to-top {
    width: 36px;
    height: 36px;
    font-size: 18px;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 50px);
    right: max(14px, env(safe-area-inset-right));
  }

  h1,
  .display-1,
  .display-2,
  .display-3,
  .display-4 {
    overflow-wrap: break-word;
  }

  .navbar-toggler {
    padding: 4px 6px;
  }

  .modal-dialog {
    max-width: calc(100vw - 12px) !important;
    margin: 0.35rem auto !important;
  }

  .mast-mobile-offcanvas {
    width: min(320px, 94vw) !important;
    max-width: 94vw !important;
  }

  .mobile-quick-action-btn {
    padding: 8px 8px !important;
    font-size: 11px !important;
  }
}

/* --------------------------------------------------------------------------
   10. MICRO & COVER DISPLAYS (<= 320px: Galaxy Z Fold Cover, Small Smart Screens)
   -------------------------------------------------------------------------- */
@media (max-width: 320px) {
  .navbar-brand-wrapper {
    max-width: calc(100% - 110px) !important;
    gap: 4px !important;
  }

  .navbar-brand-logo {
    height: 26px !important;
  }

  .navbar-agency-title {
    font-size: 12px !important;
  }

  .mast-lang-switch-sm {
    height: 26px !important;
    padding: 1.5px !important;
    gap: 1px !important;
  }

  .mast-lang-switch-sm .lang-btn {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    min-width: 24px !important;
    padding: 0 5px !important;
    font-size: 9.5px !important;
  }

  .mast-lang-switch-sm .lang-btn[data-lang="bn"] {
    font-size: 10px !important;
    padding: 0 5px !important;
  }

  .btn-nav-mobile-toggle {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 15px !important;
  }

  .top-countries-3d-wrapper {
    height: 175px !important;
  }

  .top-countries-3d-inner {
    --translateZ: 82px !important;
    --w: 56px !important;
    --h: 86px !important;
  }

  .stat-arch-number {
    font-size: 18px !important;
  }

  .stat-arch-label {
    font-size: 9.5px !important;
  }

  .stat-glass-number-white {
    font-size: 1.15rem !important;
  }

  .exact-contact-card img {
    max-height: 180px !important;
  }
}

/* --------------------------------------------------------------------------
   11. MOBILE LANDSCAPE VIEWPORTS (short height devices in horizontal mode)
   -------------------------------------------------------------------------- */
@media (max-height: 520px) and (orientation: landscape) {
  .mast-hero-slider-wrapper {
    min-height: 330px;
  }

  .modal-dialog {
    max-height: 94vh !important;
    margin: 0.5rem auto !important;
  }

  .modal-dialog-scrollable .modal-content {
    max-height: 90vh !important;
  }

  .floating-whatsapp-widget {
    width: 44px;
    height: 44px;
    bottom: 10px;
    right: 12px;
  }

  .floating-back-to-top {
    width: 38px;
    height: 38px;
    bottom: 60px;
    right: 15px;
  }

  .mast-mobile-offcanvas {
    max-height: 100vh !important;
  }

  .mast-mobile-offcanvas .offcanvas-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 32px !important;
  }
}

/* --------------------------------------------------------------------------
   12. TOUCH & POINTER SAFEGUARDS
   -------------------------------------------------------------------------- */
@media (hover: none), (pointer: coarse) {
  .floating-whatsapp-tooltip {
    display: none !important;
  }

  .executive-partner-card:hover {
    transform: none;
  }

  /* Minimum 44px tap targets for mobile interactive controls */
  .btn-nav-mobile-toggle,
  .mobile-nav-link,
  .mobile-accordion-btn,
  .mobile-subnav-item {
    min-height: 42px;
  }

  /* Segmented language pill buttons must strictly respect container height */
  .mast-lang-switch .lang-btn,
  .mast-lang-switch-sm .lang-btn {
    min-height: 0 !important;
    max-height: 100% !important;
    height: 100% !important;
  }

  .btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   13. REDUCED MOTION ACCESSIBILITY
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animate-pulse {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   14. HEADING HIERARCHY CONSISTENCY LAYER (design.md §4.1 type scale)
   Every page used its own H1/H2 sizes (H2: 30–45px desktop, 19–32px phone;
   H1: 30–54px desktop, 22–40px phone; two H1s rendered at weight 300).
   One fluid scale for page titles and section titles, on every page:
     Page title H1 (inner pages) : 32px phone → 44px desktop, 800, lh 1.15
     Section title H2            : 24px phone → 32px desktop, 800, lh 1.25
   Only size / weight / line-height are set, so colour, font family (incl.
   Hind Siliguri in Bangla mode), alignment and spacing stay per page.
   Excluded: home hero banner, news article title, and H2s used as small
   card/toolbar headings (leader name, results bar, FAQ wrappers, .h3–.h6).
   -------------------------------------------------------------------------- */
main h1:not(.construction-banner-title):not(.article-title-heading) {
  font-size: clamp(32px, 2.2vw + 12px, 44px) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

main h2:not(.leader-name):not(.listing-results-title):not(.contact-section-title):not(.accordion-header):not(.h3):not(.h4):not(.h5):not(.h6):not(.country-title):not([class*="text-base"]):not([class*="text-2xl"]) {
  font-size: clamp(24px, 1.6vw + 9px, 32px) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

/* Bangla glyphs carry tall vowel signs; give headings a little more leading */
html.bengali-font-active main h1:not(.construction-banner-title):not(.article-title-heading) {
  line-height: 1.3 !important;
}

html.bengali-font-active main h2:not(.leader-name):not(.listing-results-title):not(.contact-section-title):not(.accordion-header):not(.h3):not(.h4):not(.h5):not(.h6):not(.country-title):not([class*="text-base"]):not([class*="text-2xl"]) {
  line-height: 1.4 !important;
}

/* --------------------------------------------------------------------------
   15. ICON + HEADING LINES (incl. headings inside CMS rich text)
   A heading that starts with an icon keeps wrapped lines aligned with its
   text instead of running back under the icon. Same layout as .icon-line.
   -------------------------------------------------------------------------- */
main :is(h2, h3, h4, h5, h6):not(.text-center):not(.d-flex):not(.d-inline-flex):has(> i.bi:first-child) {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
}

main :is(h2, h3, h4, h5, h6):not(.text-center):not(.d-flex):not(.d-inline-flex):has(> i.bi:first-child) > i.bi:first-child {
  flex-shrink: 0;
  margin-right: 0 !important;
}
