/* ==========================================================================
   PMA FZ LLC – Responsive rules
   Breakpoints follow Bootstrap 5: xl 1200, lg 992, md 768, sm 576
   ========================================================================== */

/* ---------- ≤ 1399px ---------- */
@media (max-width: 1399.98px) {
  .pma-menu .nav-link { padding: .5rem .7rem !important; font-size: .9rem; }
  .pma-menu .nav-link::after { left: .7rem; right: .7rem; }
}

/* ---------- ≤ 1199px ---------- */
@media (max-width: 1199.98px) {
  .pma-brand__text { display: none; }
  .pma-brand { margin-right: 1rem; }
  .pma-menu .nav-link { padding: .5rem .55rem !important; font-size: .87rem; }
  .pma-menu__cta { margin-left: .5rem; }
  .pma-topbar__tag { display: none; }
  .pma-topbar .container { justify-content: flex-end !important; }

  .pma-pillars { grid-template-columns: repeat(3, 1fr); }
  .pma-pillar:nth-child(4), .pma-pillar:nth-child(5) { grid-column: span 1; }
  .pma-tabs__nav { grid-template-columns: repeat(2, 1fr); }
  .pma-pane__intro, .pma-pane__list { padding: 2rem; }
}

/* ---------- ≤ 991px (tablet / mobile nav) ---------- */
@media (max-width: 991.98px) {
  :root { --pma-header-h: 72px; }
  .pma-section { padding: 84px 0; }
  /* Bootstrap g-5 (3rem) gutters exceed container padding on stacked layouts → horizontal overflow */
  .row.g-5 { --bs-gutter-x: 1.5rem; }

  /* Header / mobile menu */
  .pma-topbar { display: none; }
  .pma-header { background: rgba(15, 31, 24, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .pma-brand img { height: 44px; }
  .pma-brand__text { display: flex; }
  .pma-toggler { display: flex; }
  .pma-nav .navbar-collapse {
    margin: .75rem -12px -.75rem; padding: .5rem 12px 1.25rem;
    max-height: calc(100vh - var(--pma-header-h)); overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  .pma-header.is-scrolled .pma-nav .navbar-collapse { border-top-color: var(--pma-line); }
  .pma-menu { align-items: stretch !important; }
  .pma-menu .nav-link { padding: .85rem .25rem !important; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .07); display: flex; justify-content: space-between; align-items: center; }
  .pma-header.is-scrolled .pma-menu .nav-link { border-bottom-color: var(--pma-line); }
  .pma-menu .nav-link::after { display: none; }
  .pma-menu .nav-link.dropdown-toggle::after { display: inline-block; }
  .pma-dropdown { box-shadow: none; background: transparent; padding: .25rem 0 .5rem; margin: 0 !important; min-width: 0; }
  .pma-dropdown .dropdown-item { padding: .6rem .25rem; }
  .pma-dropdown .dropdown-item strong { color: #fff; }
  .pma-dropdown .dropdown-item small { color: rgba(255, 255, 255, .55); }
  .pma-dropdown .dropdown-item:hover, .pma-dropdown .dropdown-item:focus { background: rgba(255, 255, 255, .05); }
  .pma-header.is-scrolled .pma-dropdown .dropdown-item strong { color: var(--pma-ink); }
  .pma-header.is-scrolled .pma-dropdown .dropdown-item small { color: var(--pma-muted); }
  .pma-header.is-scrolled .pma-dropdown .dropdown-item:hover { background: var(--pma-cream); }
  .pma-menu__cta { margin: 1.25rem 0 0; }
  .pma-menu__cta .pma-btn { width: 100%; padding: .95rem 1.2rem; }

  /* Hero */
  .pma-hero { padding-top: calc(var(--pma-header-h) + 56px); }
  .pma-hero__visual { max-width: 620px; margin: 0 auto; padding-left: 30px; }
  .pma-highlights { grid-template-columns: repeat(2, 1fr); margin-top: 50px; }
  .pma-highlight:nth-child(2) { border-right: 0; }
  .pma-highlight:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .pma-highlight:nth-child(3) { padding-left: 0; }

  /* About */
  .pma-about__visual { max-width: 620px; margin: 0 auto; }

  /* Solutions */
  .pma-pane { grid-template-columns: 1fr; }
  .pma-pane__intro { border-right: 0; border-bottom: 1px solid var(--pma-line); }
  .pma-pane__img { aspect-ratio: 16 / 8; }

  /* C2C */
  .pma-c2c__visual { max-width: 620px; margin: 0 auto; }
  .pma-c2c__dims { margin-top: 64px; }
  .pma-c2c__dims-head { grid-template-columns: 1fr; gap: .75rem; }

  /* Bento */
  .pma-bento { grid-template-columns: repeat(2, 1fr); }
  .pma-bento__item--feature { grid-column: span 2; }
  .pma-bento__item--image { min-height: 240px; grid-row: auto; }

  /* Gallery */
  .pma-gallery { grid-template-rows: 180px 180px; margin-top: 60px; }

  /* Contact */
  .pma-contact__info, .pma-form { padding: 2.4rem; }
}

/* ---------- ≤ 767px ---------- */
@media (max-width: 767.98px) {
  .pma-section { padding: 72px 0; }
  .pma-section-head { margin-bottom: 2.5rem; }

  .pma-pillars { grid-template-columns: repeat(2, 1fr); }
  .pma-pillar:last-child { grid-column: span 2; }
  .pma-vm-card { padding: 2rem 1.6rem; }

  /* Solution tabs become a horizontally scrollable pill rail */
  .pma-tabs__nav {
    display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; gap: .6rem;
    margin: 0 -12px 1.25rem; padding: 0 12px .4rem; scrollbar-width: none;
  }
  .pma-tabs__nav::-webkit-scrollbar { display: none; }
  .pma-tabs__nav li { flex: 0 0 78%; scroll-snap-align: start; }
  .pma-tabs__content { border-radius: 20px; }
  .pma-pane__intro, .pma-pane__list { padding: 1.5rem; }

  .pma-curriculum__list { columns: 1; }
  .pma-curriculum, .pma-attractions { padding: 1.6rem; }

  .pma-bento { grid-template-columns: 1fr; }
  .pma-bento__item--feature, .pma-bento__item--green { grid-column: auto; }
  .pma-bento__item { padding: 1.7rem; }
  .pma-bento__item--image { padding: 0; min-height: 260px; }
  .pma-divisions { flex-direction: column; align-items: flex-start; gap: .9rem; }

  .pma-gallery { grid-template-columns: repeat(2, 1fr); grid-template-rows: 150px 150px 150px; gap: .75rem; }
  .pma-gallery__item--tall { grid-row: span 2; }
  .pma-gallery__item:nth-child(4) { grid-column: span 2; }

  .pma-footer { padding-top: 64px; }
  .pma-footer__bottom { flex-direction: column; margin-top: 44px; }
}

/* ---------- ≤ 575px (phones) ---------- */
@media (max-width: 575.98px) {
  body { font-size: .97rem; }
  .pma-section { padding: 64px 0; }
  .pma-brand { gap: .65rem; }
  .pma-brand img, .pma-header.is-scrolled .pma-brand img { height: 42px; }
  .pma-brand__text { padding-left: .65rem; }
  .pma-brand__text strong { font-size: .95rem; }
  .pma-brand__text small { font-size: .58rem; letter-spacing: .08em; }

  /* Hero */
  .pma-hero { padding-top: calc(var(--pma-header-h) + 40px); }
  .pma-hero__lead { font-size: 1rem; }
  .pma-hero__actions { flex-direction: column; }
  .pma-hero__actions .pma-btn { width: 100%; }
  .pma-hero__visual { padding: 0 0 56px 18px; }
  .pma-hero__img--main { border-radius: 20px; }
  .pma-hero__img--sub { width: 44%; border-width: 4px; border-radius: 16px; }
  .pma-hero__card--eclm { right: 0; bottom: 4px; max-width: 64%; padding: .65rem .8rem; }
  .pma-hero__card--eclm small { display: none; }
  .pma-hero__card-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .pma-hero__card--zoho { top: 12px; right: 12px; font-size: .74rem; padding: .45rem .75rem; }
  .pma-highlight { padding: 1.5rem .9rem 1.6rem; }
  .pma-highlight:nth-child(odd) { padding-left: 0; }
  .pma-highlight__num { font-size: 1.75rem; }
  .pma-highlight__label { font-size: .8rem; }

  .pma-marquee__track li { font-size: 1.15rem; padding: 0 1.6rem; }

  /* About */
  .pma-about__visual { padding: 0 24px 70px 0; }
  .pma-about__visual::before { display: none; }
  .pma-about__img--sub { width: 50%; border-width: 5px; }
  .pma-about__badge { left: 10px; bottom: 14px; max-width: 58%; padding: .65rem .8rem; gap: .55rem; }
  .pma-about__badge-icon { display: none; }
  .pma-about__badge strong { font-size: .8rem; }
  .pma-callout { flex-direction: column; gap: .8rem; padding: 1.2rem; }

  .pma-pillars { grid-template-columns: 1fr; }
  .pma-pillar:last-child { grid-column: auto; }

  .pma-tabs__nav li { flex-basis: 86%; }
  .pma-offer { gap: .9rem; }
  .pma-offer__icon { flex-basis: 40px; height: 40px; }
  .pma-pane__intro .pma-btn { width: 100%; }

  /* C2C */
  .pma-c2c__actions { flex-direction: column; }
  .pma-c2c__actions .pma-btn { width: 100%; }
  .pma-c2c__visual { padding-bottom: 96px; }
  .pma-c2c__img--a { width: 86%; }
  .pma-c2c__img--b { width: 56%; bottom: 70px; border-width: 4px; }
  .pma-doc-card { left: 0; right: 0; width: auto; }

  /* Contact */
  .pma-contact__wrap { border-radius: 20px; }
  .pma-contact__info, .pma-form { padding: 1.75rem 1.35rem; }
  .pma-form__foot .pma-btn { width: 100%; }

  .pma-totop { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

/* ---------- Large screens ---------- */
@media (min-width: 1400px) {
  .pma-section { padding: 124px 0; }
}
