/* ==========================================================
   Nepal Foreign Affairs - newspaper layout
   Loaded by functions.php after the parent theme
   ========================================================== */
:root {
  --nfa-max: 1280px;
  --nfa-gutter: 16px;
  --nfa-gap: 28px;
  --nfa-logo-block: 96px;
  --nfa-red: #dc0228;
  --nfa-ink: #111111;
  --nfa-muted: #5c5c5c;
  --nfa-line: #dcdcdc;
  --nfa-rule: #111111;
  --nfa-band: #f4f4f4;
  --nfa-ui-font: "Noto Sans", "Open Sans", system-ui, sans-serif;
}

/* ---------- Page frame: one width for every section ---------- */
.container,
.py-4 > .container-fluid {
  width: calc(100% - var(--nfa-gutter) * 2);
  max-width: var(--nfa-max);
  margin-inline: auto;
}

/* AdSense sets a fixed pixel width that pushes the page sideways */
ins.adsbygoogle,
ins.adsbygoogle > [id$="_host"] {
  max-width: 100% !important;
  overflow: hidden;
}

/* ---------- Header: logo left, only the menu stays on scroll ---------- */
header.sticky-top {
  top: calc(var(--nfa-logo-block) * -1);
}

.headerlogo {
  height: var(--nfa-logo-block);
  padding: 0 !important;
}

.headerlogo .container {
  width: calc(100% - var(--nfa-gutter) * 2);
}

.headerlogo .row {
  justify-content: center;
}

.headerlogo .col-md-4:not(.text-center) {
  display: none;
}

.headerlogo .col-md-4.text-center {
  flex: 0 0 auto;
  width: auto;
}

.headerlogo img {
  display: block;
  width: auto;
  height: 70px;
  max-width: 100%;
  object-fit: contain;
}

/* ---------- Menu: centred, double rule above, single rule below ---------- */
.nav-border {
  padding: 0;
  border-top: 3px double var(--nfa-ink);
  border-bottom: 1px solid var(--nfa-ink) !important;
}

.navbar .nav-padding {
  max-width: none;
  padding-block: 0;
  padding-inline: max(var(--nfa-gutter), calc((100% - var(--nfa-max)) / 2));
}

.nav-bar-text {
  position: relative;
  align-items: center;
  justify-content: center !important;
  gap: 30px;
  margin-bottom: 0 !important;
}

.nav-bar-text .the-search {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.navbar-expand-lg .nav-bar-text .nav-link {
  position: relative;
  padding: 11px 0;
  font-family: var(--nfa-ui-font);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.navbar-expand-lg .nav-bar-text .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--nfa-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.navbar-expand-lg .nav-bar-text .nav-link:hover::after,
.navbar-expand-lg .nav-bar-text .nav-link:focus-visible::after {
  transform: scaleX(1);
}

.search-icon {
  cursor: pointer;
  line-height: 1;
}

.navbar-toggler {
  padding: 8px 0;
  border: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ---------- Columns: text sits on the frame, rules only between columns ---------- */
.the-box-margin,
.the-boxes {
  margin: 14px var(--nfa-gap);
}

.for-the-width .the-box-margin {
  margin-left: 0;
}

.another-index-news .the-box-margin {
  margin-right: 0;
}

.another-width {
  border-right: 0;
}

.the-border {
  border-left: 0;
}

.for-the-width > .the-border {
  height: 100%;
}

.for-the-width section.position-sticky {
  top: 56px !important;
}

/* The theme's 73% + 26.2% columns overshoot the frame on the right */
@media (min-width: 1001px) {
  .another-width .row:has(> .another-index-news) {
    margin-right: 0;
  }

  .another-index-news {
    flex: 1 1 0;
    width: auto !important;
    min-width: 0;
  }

  /* Short sidebars: spread the stories down the column, keep the last block in view */
  .another-index-news > div:only-child,
  .another-index-news > div:only-child > .the-box-margin {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
  }

  .another-index-news > div:only-child > .the-box-margin > div {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .another-index-news > div:only-child .the-border-bottom {
    flex: 1 1 auto;
  }

  .another-index-news > .mt-3:last-child {
    position: sticky;
    top: 56px;
  }
}

/* The sticky lists fill the screen so no blank area sits under them */
@media (min-width: 769px) {
  .for-the-width section.position-sticky {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
  }

  .for-the-width section.position-sticky > div,
  .for-the-width section.position-sticky .the-box-margin {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .for-the-width section.position-sticky .the-box-border {
    flex: 1 1 auto;
  }
}

/* Lead column stories and the tighter Headlines block */
.index-news-border .the-boxes > .row.mt-3 + .row.mt-3 {
  padding-top: 16px;
  border-top: 1px solid var(--nfa-line);
}

.index-news-border .the-boxes > .row.mt-3 > .col-md-6:first-child img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.headlines-main img {
  height: 230px;
}

.headlines-sub img {
  height: 150px;
}

/* ---------- Section headings ---------- */
.for-the-width .content-heading,
.another-width .content-heading,
.py-4 .content-heading {
  padding: 12px var(--nfa-gap) 10px;
  border-top: 2px solid var(--nfa-rule);
  border-bottom: 1px solid var(--nfa-line);
}

/* The theme's full-width line would double the rule above each section */
body > .content-heading,
body > .content-heading-top {
  border-top: 0;
  border-bottom: 0;
}

/* The first row sits right under the menu rule */
body > .content-heading .for-the-width .content-heading,
.another-width > div:first-child > .content-heading {
  border-top: 0;
}

.for-the-width .content-heading {
  padding-left: 0;
}

.another-index-news .content-heading {
  padding-right: 0;
}

.py-4 .content-heading {
  padding-inline: 0;
}

.content-heading-top > .content-heading:empty {
  display: none;
}

.heading-text {
  position: relative;
  padding-left: 18px;
}

.heading-text::after {
  top: 5px;
  left: 0;
}

.heading-text h6 {
  margin: 0;
  padding-left: 0 !important;
  font-family: var(--nfa-ui-font);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Type scale ---------- */
.cat-name-ah {
  font-family: var(--nfa-ui-font);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.home .author-name {
  padding: 0;
  font-family: var(--nfa-ui-font);
  font-size: 0.6875rem !important;
}

.the-sub-type-text a h4 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.the-box-border {
  padding: 12px 0;
  border-bottom-color: var(--nfa-line);
}

/* Author photo and byline in the Opinion list */
.the-sub-type-text .author-img {
  gap: 8px;
  justify-content: flex-start;
  margin-top: 8px;
}

.the-sub-type-text .author-img img {
  flex: none;
}

.the-sub-type-text .author-name,
.the-sub-type-text .author-name a {
  padding: 0;
  font-family: var(--nfa-ui-font);
  font-size: 0.75rem !important;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--nfa-muted) !important;
}

.the-sub-text a h3 {
  margin-top: 0;
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.ah-sbu-title,
.news-sub-title a h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.ah-sm-title,
.side-news-heading a h3 {
  font-size: 1.1875rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.side-news-heading a h4 {
  font-size: 1.0625rem;
  line-height: 1.25;
}

.the-headlines-text a h2 {
  font-size: 1.125rem;
}

/* ---------- Lead story: headline set over the picture ---------- */
.news-section a h1 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 1.05rem + 1.3vw, 2.125rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.news-section .wp-post-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.some-news-function:has(> .news-section > a:first-child > h1) {
  position: relative;
  padding-bottom: 0;
  border-bottom: 0;
}

.some-news-function:has(> .news-section > a:first-child > h1) > h4 {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  margin: 0 !important;
  padding: 4px 10px;
  line-height: 1;
  background: var(--nfa-red);
}

.some-news-function:has(> .news-section > a:first-child > h1) .cat-name-ah {
  color: #fff;
}

.news-section:has(> a:first-child > h1) {
  position: relative;
}

.news-section:has(> a:first-child > h1) .ah-img {
  position: relative;
  margin-bottom: 0 !important;
}

.news-section:has(> a:first-child > h1) .ah-img::after {
  content: "";
  position: absolute;
  inset: 30% 0 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0));
}

.news-section:has(> a:first-child > h1) .wp-post-image {
  display: block;
  aspect-ratio: 16 / 9;
}

.news-section:has(> a:first-child > h1) > a:first-child {
  position: absolute;
  right: 20px;
  bottom: 38px;
  left: 20px;
  z-index: 1;
}

.news-section:has(> a:first-child > h1) h1 {
  margin: 0;
  color: #fff;
}

.news-section:has(> a:first-child > h1) > .mb-3 {
  position: absolute;
  bottom: 14px;
  left: 20px;
  z-index: 1;
  margin: 0 !important;
}

.news-section:has(> a:first-child > h1) .author-name {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Sidebar summaries keep the side column level with the lead */
.another-index-news .the-sub-text p {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* ---------- Ads: cropped banner, the full notice opens in a dialog ---------- */
.another-width .row.mt-2 {
  margin-inline: 0;
}

.row.mt-2 > .col-md-12.text-center {
  padding-inline: 0;
}

.row.mt-2 > .col-md-12.text-center > section.widget {
  margin: 8px 0 20px;
}

.row.mt-2 > .col-md-12.text-center > section.widget::before {
  content: "Advertisement";
  display: block;
  margin-bottom: 6px;
  font-family: var(--nfa-ui-font);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nfa-muted);
}

.row.mt-2 > .col-md-12.text-center .wp-block-image {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 41 / 10;
}

.row.mt-2 > .col-md-12.text-center .wp-block-image a {
  position: relative;
  display: block;
  height: 100%;
  cursor: zoom-in;
}

.row.mt-2 > .col-md-12.text-center .wp-block-image a::after {
  content: "View full notice";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  font-family: var(--nfa-ui-font);
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: rgba(17, 17, 17, 0.8);
}

.row.mt-2 > .col-md-12.text-center .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.nfa-ad-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  background: #fff;
  border: 0;
}

.nfa-ad-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.nfa-ad-dialog img {
  display: block;
  width: 100%;
  height: auto;
}

.nfa-ad-close {
  position: sticky;
  top: 8px;
  z-index: 1;
  float: right;
  width: 36px;
  height: 36px;
  margin: 8px 8px -44px 0;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  background: #111;
  border: 0;
  border-radius: 50%;
}

/* ---------- Story row: no boxes, rules between stories ---------- */
.py-4 > .container-fluid {
  padding-inline: 0;
}

.py-4 > .container-fluid > .row {
  row-gap: 20px;
}

.py-4 .col-md-3 {
  display: flex;
}

.py-4 .col-md-3 + .col-md-3 {
  border-left: 1px solid var(--nfa-line);
}

.carosoul-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  text-align: left !important;
  background: none;
}

.carosoul-body > a:first-child {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.carosoul-body > a:first-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carosoul-body .card-body {
  padding: 12px 0 0;
}

.carosoul-body .side-news-heading a h3 {
  display: -webkit-box;
  margin: 4px 0 8px;
  overflow: hidden;
  font-size: 1.125rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.carosoul-body .the-sub-text p {
  display: -webkit-box;
  margin-bottom: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* Internal labels such as "banner-2" stay off the top story row */
body > .py-4 .cat-name-ah {
  display: none;
}

/* ---------- Interview: dark feature band with a quote mark on each card ---------- */
body > .content-heading-top > .py-4 {
  margin-top: 28px;
  padding-block: 10px 36px !important;
  background: #111;
}

body > .content-heading-top > .py-4 .content-heading {
  margin-bottom: 6px;
  border-top: 0;
  border-bottom-color: #333;
}

body > .content-heading-top > .py-4 .heading-text h6 {
  color: #fff;
}

body > .content-heading-top > .py-4 .col-md-3 + .col-md-3 {
  border-left-color: #2e2e2e;
}

body > .content-heading-top > .py-4 .carosoul-body > a:first-child {
  aspect-ratio: 4 / 3;
}

body > .content-heading-top > .py-4 .carosoul-body > a:first-child img {
  object-position: center 20%;
}

body > .content-heading-top > .py-4 .cat-name-ah {
  display: none;
}

body > .content-heading-top > .py-4 .card-body::before {
  content: "\201C";
  display: block;
  height: 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--nfa-red);
}

body > .content-heading-top > .py-4 .side-news-heading a h3 {
  font-size: 1.25rem;
  color: #fff;
}

body > .content-heading-top > .py-4 .side-news-heading a:hover h3 {
  color: #ffc9d2;
}

body > .content-heading-top > .py-4 .the-sub-text p {
  color: #b4b4b4;
}

body > .content-heading-top + footer,
body > .content-heading-top > footer {
  margin-top: 0 !important;
}

/* ---------- Footer: four columns over a credit bar ---------- */
.footer-bg {
  padding: 60px 0 0;
  background: var(--nfa-band);
  border-top: 3px double var(--nfa-rule);
}

.footer-bg .container {
  padding-inline: 0;
}

.footer-bg .row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.6fr);
  gap: 16px 48px;
  align-items: start;
  margin-inline: 0;
}

.footer-bg .row > [class*="col-"] {
  width: auto;
  max-width: 100%;
  padding: 0;
}

/* The parent's nested blocks become direct grid cells, and the two
   pseudo-elements carry the column titles the markup does not have. */
.footer-bg .row > .col-md-8,
.footer-bg .col-md-8 > .footer-border,
.footer-list.resonsive-author {
  display: contents !important;
}

.footer-bg .row::before,
.footer-bg .row::after,
.footer-bg .responsive-dnone::before {
  display: block;
  padding-bottom: 10px;
  font-family: var(--nfa-ui-font);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--nfa-ink);
}

.footer-bg .row::before {
  content: "Editorial Team";
  grid-column: 3;
  grid-row: 1;
}

.footer-bg .row::after {
  content: "Contact";
  grid-column: 4;
  grid-row: 1;
}

.footer-bg .responsive-dnone::before {
  content: "Sections";
  margin-bottom: 18px;
}

.footer-bg .row > .col-md-2:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.footer-bg .row > .col-md-2:last-child {
  grid-column: 1;
  grid-row: 3;
}

.footer-bg .col-md-2 img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
}

.footer-bg .col-md-8 > .responsive-dnone {
  display: block !important;
  grid-column: 2;
  grid-row: 1 / span 3;
}

.footer-list {
  margin: 0;
  padding: 0;
}

.responsive-dnone .footer-list {
  display: grid !important;
  grid-template-columns: repeat(2, max-content);
  gap: 14px 40px;
  justify-content: start !important;
  padding: 0 !important;
  border: 0;
}

.responsive-dnone .footer-list a {
  font-family: var(--nfa-ui-font);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: capitalize;
}

.footer-list.resonsive-author li {
  position: relative;
  min-height: 42px;
  padding: 2px 0 8px 54px;
}

.footer-list.resonsive-author li:nth-child(1) {
  grid-column: 3;
  grid-row: 2;
  margin-top: 8px;
}

.footer-list.resonsive-author li:nth-child(2) {
  grid-column: 3;
  grid-row: 3;
}

.footer-list.resonsive-author li:nth-child(3) {
  grid-column: 4;
  grid-row: 2 / span 2;
  margin-top: 8px;
}

.footer-list.resonsive-author li::before {
  content: "\f4da";
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-family: "bootstrap-icons";
  font-size: 1.0625rem;
  color: #fff;
  background: #111;
  border-radius: 50%;
}

.footer-list.resonsive-author li:nth-child(2)::before {
  content: "\f483";
}

.footer-list.resonsive-author li:nth-child(3)::before {
  content: "\f32c";
  background: var(--nfa-red);
}

.footer-list li h4 {
  margin: 0 0 6px;
  font-family: var(--nfa-ui-font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nfa-muted);
}

.footer-list li h5 {
  margin: 0;
  font-size: 1.1875rem;
  text-transform: capitalize;
}

.footer-list li h6 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.footer-list li p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--nfa-muted);
}

.footer-bg .col-md-8 > .text-center {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  grid-row: 4;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding: 18px 0;
  font-family: var(--nfa-ui-font);
  font-size: 0.8125rem;
  color: #cfcfcf;
  text-align: left !important;
  background: #111;
  box-shadow: 0 0 0 100vmax #111;
  clip-path: inset(0 -100vmax);
}

.footer-bg .col-md-8 > .text-center::before {
  content: "\00A9\00A0Nepal Foreign Affairs. All rights reserved.";
}

.footer-bg .text-center span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.footer-bg .text-center h4 {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  color: inherit;
}

.footer-bg .text-center a,
.footer-bg .text-center a:hover {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 4px 14px 4px 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(100deg, #1b3664 0%, #3f7df0 50%, #1b3664 100%) 0 0 / 200% 100%;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(63, 125, 240, 0.45);
  animation: nfa-credit-run 5s linear infinite;
}

.footer-bg .text-center a:hover {
  box-shadow: 0 0 20px rgba(63, 125, 240, 0.8);
}

.footer-bg .text-center a::before {
  content: "";
  width: 26px;
  height: 26px;
  background: #fff url("../img/appharu-logo.svg") center / 20px no-repeat;
  border-radius: 50%;
  animation: nfa-logo-spin 8s linear infinite;
}

.footer-bg .text-center a::after {
  content: "\f144";
  font-family: "bootstrap-icons";
  font-size: 0.625rem;
  font-weight: 400;
  color: #d6e4ff;
}

@keyframes nfa-credit-run {
  to {
    background-position: 200% 0;
  }
}

@keyframes nfa-logo-spin {
  to {
    transform: rotate(360deg);
  }
}

.the-icon-color {
  gap: 10px;
  justify-content: flex-start !important;
  margin-top: 8px;
}

.the-icon {
  width: 40px;
  height: 40px;
}

.the-icon-color a {
  background: #fff;
  border: 1px solid var(--nfa-line);
  color: var(--nfa-muted);
  transition: all 0.2s ease;
}

.the-icon-color .the-icon a:hover {
  color: #fff !important;
  background: #111;
  border-color: #111;
}

.bi.icon-before::before {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

/* ---------- Breathing room, less text, gentle motion ---------- */
.the-box-margin,
.the-boxes {
  margin-block: 24px 32px;
}

.the-box-border {
  padding: 16px 0;
}

.the-sub-type-text a h4 {
  line-height: 1.32;
}

.the-sub-text p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #666;
}

.the-sub-text a h3 {
  margin-bottom: 10px;
  line-height: 1.26;
}

.index-news-border .the-sub-text p,
.another-index-news .the-sub-text p,
.carosoul-body .the-sub-text p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.another-index-news .the-border-bottom {
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.another-index-news .the-border-bottom:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.side-news-heading h4.my-2 {
  margin: 12px 0 8px !important;
}

.index-news-border .the-boxes .row.mt-3 {
  margin-top: 28px !important;
}

.index-news-border .the-boxes .row.my-3 {
  margin-block: 28px !important;
}

.index-news-border .the-boxes > .row.mt-3 + .row.mt-3 {
  padding-top: 28px;
}

/* The byline repeats on every story, so only the lead and Opinion keep it */
.home .mb-3:has(> .author-name) {
  margin: 0 !important;
}

.home .mb-3 > .author-name {
  display: none;
}

.news-section:has(> a:first-child > h1) .author-name {
  display: inline;
}

.row.mt-2 > .col-md-12.text-center > section.widget {
  margin: 32px 0 40px;
}

body > .py-4 {
  padding-block: 44px !important;
}

.py-4 > .container-fluid > .row {
  --bs-gutter-x: 32px;
}

.carosoul-body .card-body {
  padding: 16px 0 4px;
}

body > .content-heading-top > .py-4 {
  margin-top: 40px;
  padding-block: 18px 52px !important;
}

body > .content-heading-top > .py-4 .content-heading {
  margin-bottom: 16px;
}

.home .wp-post-image,
.carosoul-body > a:first-child {
  border-radius: 4px;
}

.ah-img,
.election-img,
.headlines-main,
.headlines-sub,
.index-news-border .the-boxes > .row > .col-md-6:first-child > a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.ah-img img,
.election-img img,
.headlines-main img,
.headlines-sub img,
.carosoul-body > a:first-child img,
.index-news-border .the-boxes > .row > .col-md-6:first-child > a img {
  transition: transform 0.45s ease;
}

a:hover .ah-img img,
.election-img:hover img,
.headlines-main:hover img,
.headlines-sub:hover img,
.carosoul-body > a:first-child:hover img,
.index-news-border .the-boxes > .row > .col-md-6:first-child > a:hover img {
  transform: scale(1.04);
}

.the-sub-text h3,
.the-sub-type-text h4,
.side-news-heading h3,
.side-news-heading h4,
.the-headlines-text h2 {
  transition: color 0.2s ease;
}

a:hover > h2,
a:hover > h3,
a:hover > h4 {
  color: var(--nfa-red);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Narrow desktop and tablet ---------- */
@media (max-width: 1199.98px) {
  .nav-bar-text {
    gap: 20px;
  }

  .py-4 > .container-fluid > .row > .col-md-3 {
    flex: 0 0 50%;
    width: 50%;
  }

  .py-4 .col-md-3:nth-child(odd) {
    border-left: 0;
  }
}

/* ---------- Collapsed menu ---------- */
@media (max-width: 991.98px) {
  :root {
    --nfa-logo-block: 68px;
  }

  .headerlogo img {
    height: 48px;
  }

  .navbar-expand-lg .nav-bar-text {
    align-items: stretch;
    justify-content: flex-start !important;
    gap: 0;
    padding-bottom: 6px;
  }

  .navbar-expand-lg .nav-bar-text .nav-link {
    padding: 11px 0;
  }

  .navbar-expand-lg .nav-bar-text .nav-link::after {
    display: none;
  }

  .nav-bar-text .nav-item + .nav-item {
    border-top: 1px solid var(--nfa-line);
  }

  .the-search {
    display: none !important;
  }

  .home-side {
    display: block;
  }

  .footer-bg {
    padding-top: 44px;
  }

  .footer-bg .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }

  .footer-bg .row > .col-md-2:first-child {
    grid-row: 1;
  }

  .footer-bg .row > .col-md-2:last-child {
    grid-row: 2;
  }

  .footer-bg .col-md-8 > .responsive-dnone {
    grid-row: 1 / span 2;
  }

  .footer-bg .row::before {
    grid-column: 1;
    grid-row: 3;
    margin-top: 28px;
  }

  .footer-bg .row::after {
    grid-column: 2;
    grid-row: 3;
    margin-top: 28px;
  }

  .footer-list.resonsive-author li:nth-child(1) {
    grid-column: 1;
    grid-row: 4;
  }

  .footer-list.resonsive-author li:nth-child(2) {
    grid-column: 1;
    grid-row: 5;
  }

  .footer-list.resonsive-author li:nth-child(3) {
    grid-column: 2;
    grid-row: 4 / span 2;
  }

  .footer-bg .col-md-8 > .text-center {
    grid-row: 6;
    margin-top: 32px;
  }
}

/* ---------- Phone ---------- */
@media (max-width: 767.98px) {
  .container,
  .headerlogo .container,
  .py-4 > .container-fluid {
    width: 100%;
    padding-inline: var(--nfa-gutter);
  }

  .the-box-margin,
  .the-boxes,
  .for-the-width .the-box-margin,
  .another-index-news .the-box-margin {
    margin: 12px 0;
  }

  .for-the-width .content-heading,
  .another-width .content-heading,
  .py-4 .content-heading {
    padding-inline: 0;
  }

  .row.mt-2 > .col-md-12.text-center .wp-block-image {
    aspect-ratio: 3 / 1;
  }

  .py-4 > .container-fluid > .row {
    --bs-gutter-x: 0;
    row-gap: 20px;
  }

  body > .py-4 {
    padding-block: 28px !important;
  }

  .row.mt-2 > .col-md-12.text-center > section.widget {
    margin: 24px 0 28px;
  }

  .py-4 > .container-fluid > .row > .col-md-3 {
    flex: 0 0 100%;
    width: 100%;
    padding-inline: 0;
    padding-bottom: 16px;
    border-left: 0;
    border-bottom: 1px solid var(--nfa-line);
  }

  .footer-bg {
    padding-top: 28px;
  }

  .footer-bg .container {
    padding-inline: var(--nfa-gutter);
  }

  .footer-bg .row {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-bg .col-md-2 img {
    max-width: 220px;
  }

  .footer-bg .col-md-8 > .responsive-dnone {
    grid-column: 1;
    grid-row: 3;
    margin-top: 24px;
  }

  .footer-bg .row::before {
    grid-row: 4;
  }

  .footer-list.resonsive-author li:nth-child(1) {
    grid-row: 5;
  }

  .footer-list.resonsive-author li:nth-child(2) {
    grid-row: 6;
  }

  .footer-bg .row::after {
    grid-column: 1;
    grid-row: 7;
  }

  .footer-list.resonsive-author li:nth-child(3) {
    grid-column: 1;
    grid-row: 8;
  }

  .footer-bg .col-md-8 > .text-center {
    flex-direction: column;
    grid-column: 1;
    grid-row: 9;
    align-items: flex-start;
  }

  .some-news-function:has(> .news-section > a:first-child > h1) {
    margin-inline: calc(var(--nfa-gutter) * -1);
  }
}
