/* ============================================================
   MINISTRY OF FINANCE LEBANON
   Responsive Stylesheet
   ============================================================ */

/* ── Large Desktop (1400px+) ── */
@media (min-width: 1400px) {
  .mof-eservices__grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

/* ── Desktop / Laptop (max 1280px) ── */
@media (max-width: 1280px) {
  :root { --mof-container: 100%; }
  .mof-container { padding: 0 32px; }

  .mof-hero__layout {
    grid-template-columns: 1fr 300px;
    gap: 40px;
  }
  .mof-eservices__grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .mof-footer__grid {
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1.2fr;
    gap: 32px;
  }
}

/* ── Tablet Landscape (max 1024px) ── */
@media (max-width: 1024px) {
  .mof-container { padding: 0 24px; }

  /* Announcement bar */
  .mof-announcement-bar__text { display: none; }
  .mof-announcement-bar__alert { display: none; }

  /* Header */
  .mof-header__nav { display: none; }
  .mof-hamburger { display: flex; }
  .mof-btn-eservices { display: none; }
  /* Space-between restores brand-left / actions-right now that the flex:1 nav is gone */
  .mof-header__inner { height: 68px; justify-content: space-between; }

  /* Hero */
  .mof-hero {
    padding: 60px 0 100px;
  }
  .mof-hero__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .mof-hero__content { max-width: 100%; }
  .mof-minister-panel {
    max-width: 480px;
    margin: 0 auto;
  }

  /* eServices */
  .mof-eservices__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Statistics */
  .mof-statistics__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mof-stat-item:nth-child(2)::after { display: none; }
  .mof-stat-item:nth-child(1),
  .mof-stat-item:nth-child(2) {
    border-bottom: 1px solid rgba(255,255,255,.1);
  }

  /* Useful links — 2 per row on tablet/mobile (flex layout) */
  .mof-useful-link-card { flex-basis: calc(50% - 8px); }

  /* Connect */
  .mof-connect__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
  }
  .mof-connect__grid > :first-child {
    grid-column: 1 / -1;
  }

  /* Footer */
  .mof-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
  .mof-footer__grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ── Tablet Portrait (max 768px) ── */
@media (max-width: 768px) {
  .mof-container { padding: 0 20px; }

  /* Sections */
  .mof-eservices,
  .mof-publications,
  .mof-useful-links,
  .mof-connect { padding: 56px 0; }
  .mof-statistics { padding: 48px 0; }

  /* Section header */
  .mof-section-header { flex-direction: column; align-items: flex-start; }
  .mof-section-title { font-size: 24px; }

  /* Hero */
  .mof-hero { padding: 48px 0 80px; }
  .mof-hero__heading { font-size: 30px; }
  .mof-hero__subtitle { font-size: 15px; }
  .mof-hero__search-btn { padding: 0 18px; font-size: 13px; }
  .mof-hero__quick-tags { gap: 6px; }

  /* eServices */
  .mof-eservices__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .mof-eservice-card { padding: 20px 12px 18px; }
  .mof-eservice-card__icon { width: 48px; height: 48px; }
  .mof-eservice-card__title { font-size: 12px; }

  /* Publications */
  .mof-pub-row { flex-wrap: wrap; gap: 10px; padding: 16px 16px; }
  .mof-pub-row:hover { padding: 16px 20px; }
  .mof-pub-row__date { min-width: auto; }
  .mof-pub-row__content { width: 100%; }
  .mof-pub-row__badges { display: none; }

  /* Statistics */
  .mof-statistics__grid {
    grid-template-columns: repeat(2, 1fr);
  }


  /* Connect */
  .mof-connect__grid { grid-template-columns: 1fr; }

  /* Social grid */
  .mof-social-grid { grid-template-columns: repeat(3, 1fr); }

  /* Footer */
  .mof-footer__main { padding: 48px 0 36px; }
  .mof-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .mof-footer__grid > :first-child { grid-column: 1 / -1; }
  .mof-footer__sub-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .mof-footer__sub-links { gap: 12px; }
}

/* ── Mobile (max 576px) ── */
@media (max-width: 576px) {
  /* Announcement bar */
  .mof-announcement-bar__contact { gap: 10px; }
  .mof-announcement-bar__contact a span { display: none; }

  /* Header */
  .mof-header__brand-ar { display: none; }
  .mof-header__inner { height: 60px; }
  .mof-header__brand-en { font-size: 13px; }
  .mof-header__logo { height: 44px; width: auto; max-width: 150px; }

  /* Hero */
  .mof-hero { padding: 36px 0 60px; }
  .mof-hero__heading { font-size: 26px; }
  .mof-hero__subtitle { font-size: 14px; margin-bottom: 28px; }
  .mof-hero__search { flex-wrap: wrap; border-radius: var(--mof-radius-md); padding: 10px; }
  .mof-hero__search-icon { display: none; }
  .mof-hero__search-input { width: 100%; height: 44px; }
  .mof-hero__search-btn { width: 100%; height: 44px; border-radius: var(--mof-radius); }

  /* eServices */
  .mof-eservices__grid { grid-template-columns: repeat(2, 1fr); }

  /* Publications */
  .mof-pub-row__actions { display: none; }
  .mof-pub-row__content { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Statistics */
  .mof-stat-item { padding: 24px 16px; }
  .mof-stat-item__number { font-size: 32px; }

  /* Useful links */
  .mof-useful-links__grid { gap: 10px; }
  .mof-useful-link-card { padding: 14px 14px; gap: 10px; }
  .mof-useful-link-card__domain { display: none; }

  /* Social */
  .mof-social-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .mof-footer__grid { grid-template-columns: 1fr; }
  .mof-footer__sub-links { flex-direction: column; gap: 8px; }
  .mof-footer__sub-divider { display: none; }
}

/* ── Small mobile (max 380px) ── */
@media (max-width: 380px) {
  .mof-eservices__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mof-useful-link-card { flex-basis: 100%; }
  .mof-hero__quick-tags { display: none; }
}

/* ============================================================
   PART 2 — INNER PAGES
   ============================================================ */

/* ── Desktop / Laptop (max 1280px) — Part 2 ── */
@media (max-width: 1280px) {
  .mof-page-layout__grid { gap: 40px; }
  .mof-document-grid { grid-template-columns: repeat(3, 1fr); }
  .mof-news-grid { grid-template-columns: repeat(3, 1fr); }
  .mof-values-grid { grid-template-columns: repeat(3, 1fr); }
  .mof-sitemap__grid { columns: 3; }
}

/* ── Tablet Landscape (max 1024px) — Part 2 ── */
@media (max-width: 1024px) {
  /* Content hero */
  .mof-content-hero { padding: 60px 0 48px; }
  .mof-content-hero__title { font-size: 32px; }
  .mof-content-hero--split .mof-content-hero__inner { grid-template-columns: 1fr; }

  /* Page layout — collapse sidebar below content */
  .mof-page-layout__grid {
    grid-template-columns: 1fr;
  }
  /* Listing layout (left section sidebar) — drop sidebar, go single column.
     On mobile/tablet the Finance section nav is replaced by the breadcrumb. */
  .mof-listing-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .mof-listing-layout__sidebar { display: none; }
  .mof-breadcrumb--listing-mobile { display: block; }
  .mof-sidebar--section { position: static; }
  .mof-sidebar { order: 2; }

  /* ── Mobile section menu (bottom sheet) ──
     Turned on at exactly the breakpoint that hides .mof-listing-layout__sidebar above, so
     the section menu is reachable at every width. Rendered only on Finance/Taxation. */
  .mof-section-sheet { display: block; }

  .mof-section-sheet__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 21, 39, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    /* Below the mobile nav drawer + its backdrop (200/199) so opening the hamburger
       cleanly covers the sheet, and above the sticky header (100) and the footer. */
    z-index: calc(var(--mof-z-overlay) - 21);
  }
  .mof-section-sheet.mof-is-open .mof-section-sheet__backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mof-section-sheet__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--mof-z-overlay) - 20);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    background: var(--mof-white);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -8px 28px rgba(15, 31, 68, .18);
    /* Collapsed: slide down so only the header row shows. translateY is animated rather
       than height so the transition stays on the compositor. */
    transform: translateY(calc(100% - var(--mof-sheet-header, 56px)));
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
  }
  .mof-section-sheet.mof-is-open .mof-section-sheet__panel { transform: translateY(0); }

  .mof-section-sheet__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 16px;
    min-height: 56px;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--mof-grey-border);
    touch-action: none; /* the header owns the drag gesture */
  }
  .mof-section-sheet__handle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--mof-navy);
    cursor: pointer;
    text-align: start;
  }
  .mof-section-sheet__grip {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: var(--mof-grey-border);
  }
  .mof-section-sheet__panel { padding-top: 4px; }
  .mof-section-sheet__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mof-section-sheet__section { font-weight: 500; color: var(--mof-text-muted); }
  .mof-section-sheet__chevron {
    flex-shrink: 0;
    color: var(--mof-text-muted);
    transition: transform .28s ease;
  }
  .mof-section-sheet.mof-is-open .mof-section-sheet__chevron { transform: rotate(180deg); }
  /* Visibility is driven by the open class, NOT the `hidden` attribute: a class selector
     setting `display` outranks the UA stylesheet's `[hidden] { display: none }`, so the
     button would stay on screen while collapsed. display:none also keeps it out of the
     accessibility tree when there is nothing to close. */
  .mof-section-sheet__close { display: none; }
  .mof-section-sheet.mof-is-open .mof-section-sheet__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--mof-text-muted);
    cursor: pointer;
  }
  .mof-section-sheet.mof-is-open .mof-section-sheet__close:hover {
    background: var(--mof-grey-bg);
    color: var(--mof-text);
  }

  .mof-section-sheet__body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; /* scrolling the menu never scrolls the page behind */
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }
  /* The <=1024px rule above lays sidebar lists out as horizontal wrapping chips, which
     suits the old tablet treatment but not a vertical sheet. Restore block layout for the
     copy inside the sheet only — the rule above is left untouched. */
  .mof-section-sheet__nav .mof-sidebar-nav__list,
  .mof-section-sheet__nav .mof-sidebar-nav__sublist,
  .mof-section-sheet__nav .mof-sidebar-nav__subsublist,
  .mof-section-sheet__nav .mof-sidebar-nav__subsubsublist {
    display: block;
  }
  .mof-section-sheet__nav .mof-sidebar-nav__item { display: block; }
  /* Comfortable tap targets for a touch menu. */
  .mof-section-sheet__nav a { display: block; padding: 9px 0; }

  @media (prefers-reduced-motion: reduce) {
    .mof-section-sheet__panel,
    .mof-section-sheet__backdrop,
    .mof-section-sheet__chevron { transition: none; }
  }

  /* Sidebar nav becomes horizontal scrollable on tablet */
  .mof-sidebar-nav__list { display: flex; flex-wrap: wrap; gap: 8px; }
  .mof-sidebar-nav__item { flex: 0 0 auto; }

  /* Filter bar */
  .mof-filter-bar__inner {
    flex-wrap: wrap;
    gap: 10px;
  }
  .mof-filter-bar__select { flex: 1 1 160px; }
  .mof-filter-bar__search { flex: 1 1 200px; }

  /* Listing header */
  .mof-listing-header__inner { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Document grid */
  .mof-document-grid { grid-template-columns: repeat(2, 1fr); }

  /* News grid */
  .mof-news-grid { grid-template-columns: repeat(2, 1fr); }
  .mof-news-card--featured { grid-column: 1 / -1; }
  /* Media/news featured card stacks (image on top) so the 420px image column
     never overflows the narrower layout. */
  .mof-news-card--featured { flex-direction: column; }
  .mof-news-card--featured .mof-news-card__img-link { width: 100%; }
  .mof-news-card--featured .mof-news-card__img-wrap { height: 200px; min-height: 0; }

  /* Publication detail */
  .mof-pub-detail-layout { grid-template-columns: 1fr; }
  .mof-pub-meta-card { order: -1; }

  /* About — values, mission */
  .mof-values-grid { grid-template-columns: repeat(2, 1fr); }
  .mof-mission-split { grid-template-columns: 1fr; }

  /* Minister bio */
  .mof-minister-bio { flex-direction: column; }
  .mof-minister-bio__photo { width: 100%; max-width: 340px; margin: 0 auto; }

  /* Contact */
  .mof-dept-grid { grid-template-columns: repeat(2, 1fr); }

  /* Sitemap */
  .mof-sitemap__grid { columns: 2; }

  /* 404 */
  .mof-404__inner { max-width: 720px; }
  .mof-404__quick-link { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }

  /* Taxation */
  .mof-tax-categories { grid-template-columns: 1fr; }
}

/* ── Tablet Portrait (max 768px) — Part 2 ── */
@media (max-width: 768px) {
  /* Content hero */
  .mof-content-hero { padding: 48px 0 40px; }
  .mof-content-hero__title { font-size: 26px; }
  .mof-content-hero__subtitle { font-size: 15px; }
  .mof-content-hero__meta { flex-wrap: wrap; gap: 10px; }

  /* Breadcrumb */
  .mof-breadcrumb { font-size: 12px; }
  .mof-breadcrumb__item:not(:last-child):not(:nth-last-child(2)) { display: none; }

  /* Filter bar */
  .mof-filter-bar { padding: 14px 0; }
  .mof-filter-bar__inner { flex-direction: column; }
  .mof-filter-bar__select,
  .mof-filter-bar__search { width: 100%; }
  .mof-filter-bar__actions { width: 100%; justify-content: flex-end; }
  .mof-filter-tags { flex-wrap: wrap; }

  /* Document grid */
  .mof-document-grid { grid-template-columns: 1fr; }

  /* News grid */
  .mof-news-grid { grid-template-columns: 1fr; }
  .mof-news-card--featured { grid-column: auto; }

  /* Pagination */
  .mof-pagination__inner { gap: 4px; }
  .mof-pagination__btn:not(.mof-pagination__btn--prev):not(.mof-pagination__btn--next):not(.mof-pagination__btn--active) {
    display: none;
  }

  /* Article content */
  .mof-article-content h2 { font-size: 20px; }
  .mof-article-content h3 { font-size: 17px; }

  /* Share bar */
  .mof-share-bar { flex-wrap: wrap; gap: 8px; }

  /* About */
  .mof-values-grid { grid-template-columns: 1fr; }
  .mof-leadership-grid { grid-template-columns: repeat(2, 1fr); }

  /* Search results */
  .mof-search-bar-page { flex-direction: column; }
  .mof-search-bar-page input { width: 100%; border-radius: var(--mof-radius-md); }
  .mof-search-bar-page__submit,
  .mof-search-bar-page__btn { width: 100%; border-radius: var(--mof-radius-md); justify-content: center; }
  .mof-search-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 0; }

  /* Contact */
  .mof-dept-grid { grid-template-columns: 1fr; }

  /* Sitemap */
  .mof-sitemap__grid { columns: 2; }

  /* Legal */
  .mof-legal-layout { grid-template-columns: 1fr; }
  .mof-legal-toc { display: none; }

  /* 404 */
  .mof-404 { padding: 60px 0; }
  .mof-404__code { font-size: 120px; }
  .mof-404__quick-link { min-width: 100%; max-width: 100%; flex: 1 1 100%; justify-content: flex-start; }
}

/* ── Mobile (max 576px) — Part 2 ── */
@media (max-width: 576px) {
  /* Content hero */
  .mof-content-hero { padding: 36px 0 32px; }
  .mof-content-hero__title { font-size: 22px; }
  .mof-content-hero__subtitle { font-size: 14px; }

  /* Minister hero — smaller portrait card on phones (stacks under the text via
     the 1024px single column; matches the compact home spotlight card). */
  .mof-content-hero__photo-frame { width: min(260px, 100%); height: 300px; }

  /* Minister content sections — tighter spacing / padding on phones. */
  .mof-minister-section { margin-bottom: 32px; }
  .mof-office-card { padding: 18px 18px; }
  .mof-office-card__icon { width: 34px; height: 34px; }

  /* Link directory — single column on phones. */
  .mof-link-directory { gap: 28px; }
  .mof-link-directory__grid { grid-template-columns: 1fr; }

  /* Contact cards — single column on phones. */
  .mof-contact-grid { grid-template-columns: 1fr; }

  /* View toggle — hide on small mobile */
  .mof-view-toggle { display: none; }

  /* Document card */
  .mof-document-card { padding: 16px; }
  .mof-document-card__actions { flex-direction: column; gap: 8px; }
  .mof-document-card__btn { width: 100%; justify-content: center; }

  /* News card */
  .mof-news-card__body { padding: 16px; }

  /* Pub detail download */
  .mof-btn-download-large,
  .mof-btn-preview { width: 100%; justify-content: center; }
  .mof-pub-meta-card { padding: 20px; }

  /* Minister bio */
  .mof-minister-bio__quote-block { padding: 20px; }
  .mof-minister-bio__quote { font-size: 17px; }

  /* Sitemap */
  .mof-sitemap__grid { columns: 1; }

  /* Leadership */
  .mof-leadership-grid { grid-template-columns: 1fr; }

  /* Pagination — show only prev/next */
  .mof-pagination__ellipsis { display: none; }

  /* 404 */
  .mof-404__code { font-size: 96px; }
  .mof-404__search { flex-direction: column; }
  .mof-404__search input,
  .mof-404__search button { width: 100%; border-radius: var(--mof-radius-md); }

  /* Contact form */
  .mof-contact-cols { grid-template-columns: 1fr; }
}

/* ── Small mobile (max 380px) — Part 2 ── */
@media (max-width: 380px) {
  .mof-content-hero__title { font-size: 20px; }
  .mof-filter-bar__inner { gap: 8px; }
  .mof-pagination__btn { width: 34px; height: 34px; font-size: 13px; }
  .mof-breadcrumb { font-size: 11px; }
}

/* ── Dropdown — ensure not shown on mobile/tablet ── */
@media (max-width: 1024px) {
  .mof-nav__dropdown { display: none !important; }
  .mof-nav__dropdown-btn { display: none !important; }
  .mof-footer__app-buttons { flex-direction: column; }
}

/* ── Footer app buttons — 2 up on tablet ── */
@media (min-width: 1025px) {
  .mof-footer__app-buttons { flex-wrap: nowrap; }
}

/* ── Hero Slider responsive ── */

/* Large desktop — subtle height reduction */
@media (max-width: 1280px) {
  .mof-hero-slider { height: 480px; }
}

/* Tablet landscape — hide badge, adjust font, controls stay right */
@media (max-width: 1024px) {
  .mof-hero-slider { height: 420px; }
  .mof-slider__controls { right: 28px; bottom: 24px; }
  .mof-slider__title { font-size: 28px; }
  .mof-slider__desc { font-size: 15px; }
}

/* Tablet portrait — center controls horizontally, give content breathing room */
@media (max-width: 768px) {
  .mof-hero-slider { height: 380px; }
  .mof-slider__badge { display: none; }
  .mof-slider__title { font-size: 26px; }
  .mof-slider__desc { font-size: 14px; margin-bottom: 18px; max-width: 100%; }
  .mof-slider__cta { padding: 11px 24px; font-size: 13.5px; }
  /* Center controls so they don't conflict with left-aligned text on narrow viewports */
  .mof-slider__controls {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    white-space: nowrap; /* prevent btn–dot–btn row from wrapping */
  }
  /* Pad slide content bottom so CTA never overlaps the centered controls */
  .mof-slider__content { padding-bottom: 64px; }
}

/* Mobile (≤576px) — tighten further, keep comfortable height */
@media (max-width: 576px) {
  .mof-hero-slider { height: 360px; } /* 300px was too cramped */
  .mof-slider__title { font-size: 22px; line-height: 1.2; }
  .mof-slider__desc { font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
  .mof-slider__cta { padding: 10px 22px; font-size: 13px; }
  .mof-slider__content { padding-bottom: 60px; }
  .mof-slider__controls { bottom: 16px; gap: 8px; }
  .mof-slider__btn { width: 36px; height: 36px; }
  .mof-slider__dot { width: 7px; height: 7px; }
  .mof-slider__dot--active,
  .mof-slider__dot:hover { width: 18px; }
}

/* Small mobile (≤390px) — tightest, reduce height slightly */
@media (max-width: 390px) {
  .mof-hero-slider { height: 340px; }
  .mof-slider__title { font-size: 20px; }
  .mof-slider__desc { font-size: 13px; margin-bottom: 14px; }
  .mof-slider__content { padding-bottom: 56px; }
  .mof-slider__controls { bottom: 14px; }
}

/* ── Spotlight Section responsive ── */

/* Tablet landscape — narrow minister column */
@media (max-width: 1024px) {
  .mof-spotlight__grid { grid-template-columns: 1fr 300px; gap: 36px; }
}

/* Tablet portrait — single column, stack minister below search */
@media (max-width: 768px) {
  .mof-spotlight { padding: 48px 0; }
  .mof-spotlight__grid { grid-template-columns: 1fr; gap: 36px; }
  .mof-spotlight__heading { margin-bottom: 22px; }
}

/* Mobile (≤576px) — stack search input above button, compact spacing */
@media (max-width: 576px) {
  .mof-spotlight { padding: 32px 0; }
  .mof-spotlight__heading { font-size: 22px; margin-bottom: 18px; }

  /* Vertical stack: input on top, button full-width below */
  .mof-spotlight__search-wrap {
    flex-wrap: wrap;
    padding: 10px;
    gap: 8px;
    border-radius: var(--mof-radius-md);
    align-items: stretch;
  }
  .mof-spotlight__search-icon { display: none; }
  .mof-spotlight__search-input {
    flex: none;
    width: 100%;
    height: 46px;
    font-size: 15px;
  }
  .mof-spotlight__search-btn {
    flex: none;
    width: 100%;
    height: 46px;
    font-size: 14px;
    border-radius: var(--mof-radius);
    padding: 0;
  }

  /* Quick tags — compact */
  .mof-spotlight__quick-tags { gap: 7px; margin-bottom: 24px; }
  .mof-spotlight__quick-tag { font-size: 12.5px; padding: 5px 12px; }

  /* News ticker — tighter padding and text */
  .mof-spotlight__news-ticker { padding: 16px 18px; }
  .mof-spotlight__ticker-heading { font-size: 10px; padding-bottom: 10px; margin-bottom: 12px; }
  .mof-spotlight__ticker-item { font-size: 13px; gap: 8px; }
  .mof-spotlight__ticker-date { font-size: 10.5px; }
}

/* Small mobile (≤390px) — final squeeze */
@media (max-width: 390px) {
  .mof-spotlight { padding: 28px 0; }
  .mof-spotlight__heading { font-size: 20px; margin-bottom: 16px; }
  .mof-spotlight__quick-tag { font-size: 12px; padding: 5px 10px; }
  .mof-spotlight__search-input { height: 44px; }
  .mof-spotlight__search-btn { height: 44px; }
}

/* ════════════════════════════════════════════════════════════
   Finance listing pages (.mof-listing-layout) — mobile refinements
   budget-listing.html / public-debt-listing.html
   ════════════════════════════════════════════════════════════ */

/* Filters: clean, full-width stacking on mobile */
@media (max-width: 768px) {
  /* restore comfortable padding (global rule drops it to 14px 0) */
  .mof-listing-layout .mof-filter-bar { padding: 16px; }

  .mof-listing-layout .mof-filter-bar__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .mof-listing-layout .mof-filter-bar__field,
  .mof-listing-layout .mof-filter-bar__search,
  .mof-listing-layout .mof-filter-bar__actions { width: 100%; }
  .mof-listing-layout .mof-filter-bar__select { width: 100%; }

  /* Fix: in a column flex, `flex: 1 1 200px` made the search box 200px TALL.
     Reset it so the search keeps its normal 40px height, full width. */
  .mof-listing-layout .mof-filter-bar__search {
    flex: 0 0 auto;
    height: 40px;
  }

  /* Apply / Clear: clean two-column row, equal width */
  .mof-listing-layout .mof-filter-bar__actions {
    display: flex;
    gap: 10px;
  }
  .mof-listing-layout .mof-filter-bar__apply,
  .mof-listing-layout .mof-filter-bar__reset {
    flex: 1;
    justify-content: center;
  }

  /* Sort / view bar: count on its own line, sort + toggle spread below */
  .mof-listing-layout .mof-listing-header__controls {
    width: 100%;
    justify-content: space-between;
  }
  .mof-listing-layout .mof-listing-header__sort { flex: 1; }
  .mof-listing-layout .mof-listing-header__sort-select { flex: 1; min-width: 0; }
}

/* Keep the grid/list toggle visible & usable on mobile
   (global rule hides .mof-view-toggle at ≤576px) */
@media (max-width: 576px) {
  .mof-listing-layout .mof-view-toggle { display: flex; }
}

/* Contact cards — 2 columns on tablet (phones drop to 1 in the 576 block). */
@media (max-width: 1024px) {
  .mof-contact-grid { grid-template-columns: repeat(2, 1fr); }
  /* Send-us-a-Message: stack the info cards under the form. */
  .mof-contact-message-layout { grid-template-columns: 1fr; }
}
