.ap-katha__hero .ap-katha__tools--hero {
  align-self: end;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
}

.ap-katha__hero .ap-katha__tools--hero .ap-episode-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-katha__hero .ap-katha__tools--hero .ap-episode-filters button {
  min-width: 0;
  padding-inline: 8px;
}

.ap-episode-feedback {
  min-height: 26px;
  margin: 2px 0 0;
  color: #31546f;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.ap-episode-feedback a {
  color: #006f68;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ap-katha--searching .ap-katha__featured {
  display: none;
}

.ap-katha--searching .ap-katha__library {
  padding-top: 32px;
}

.ap-katha--searching .ap-katha__section-head {
  display: none;
}

.ap-language-source,
.gt_switcher_wrapper {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.ap-language-ribbon {
  display: flex;
  width: min(calc(100% - 40px), 1180px);
  justify-content: flex-end;
  margin: 0 auto;
  padding: 7px 0;
  color: #17324d;
}

#masthead.ap-header--pinned,
#masthead-mobile.ap-header--pinned {
  position: fixed;
  top: var(--ap-header-top, 0);
  right: 0;
  left: 0;
  z-index: 10000 !important;
}

.ap-language-ribbon--pinned {
  position: fixed;
  top: var(--ap-ribbon-top, 0);
  right: 0;
  left: 0;
  z-index: 9999;
}

.ap-header-spacer,
.ap-language-ribbon__spacer {
  height: 0;
}

@media (min-width: 621px) {
  #masthead .site-header-inner {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  #masthead .container,
  #masthead .row.valign {
    min-height: 80px !important;
  }

  #masthead .site-logo {
    width: 72px !important;
    height: 72px !important;
  }

  #masthead .row.valign {
    align-items: flex-end;
  }

  #masthead .menu-col,
  #masthead .header-elements {
    padding-bottom: 4px;
  }
}

.ap-language-ribbon .ap-language-ribbon__link--current {
  border-color: #8f2828 !important;
  background: #8f2828 !important;
  color: #ffffff !important;
}

.ap-language-ribbon__inner {
  display: flex;
  width: auto;
  min-height: 36px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.ap-language-ribbon__link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 1px solid #9fb8ae;
  border-radius: 999px;
  background: #ffffff;
  color: #17324d !important;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none !important;
}

.ap-language-ribbon__link img {
  display: none;
}

.ap-language-ribbon__link:hover,
.ap-language-ribbon__link:focus {
  border-color: #8f2828;
  background: #8f2828;
  color: #ffffff !important;
}

.ap-language-ribbon__link:focus-visible {
  outline: 3px solid #d5952f;
  outline-offset: 2px;
}

.ap-home-title-band {
  width: min(calc(100% - 80px), 1160px);
  margin: 0 auto;
  padding: 34px 0 0;
  text-align: center;
}

.ap-home-title {
  margin: 0;
  color: #17324d;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.1;
}

.home .ap-hero-grid .ap-home-message {
  max-width: 690px;
  margin: 14px 0 18px;
  color: #17324d;
  font-size: 52px;
  font-weight: 600;
  line-height: 1.08;
}

.ap-hero-visual__devotion {
  margin: 12px 0 0 !important;
  color: #006f68;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

#block-9.widget_recent_entries {
  display: none !important;
}

@media (max-width: 620px) {
  .ap-katha__hero .ap-katha__tools--hero .ap-episode-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-language-ribbon__inner {
    width: 100%;
    justify-content: center;
    gap: 5px;
  }

  .ap-language-ribbon__link {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 6px;
  }

  .ap-home-title-band {
    width: min(calc(100% - 28px), 1160px);
    padding-top: 26px;
  }

  .ap-home-title {
    font-size: 38px;
  }

  .home .ap-hero-grid .ap-home-message {
    font-size: 38px;
    line-height: 1.12;
  }

  .ap-hero-visual__devotion {
    font-size: 16px;
  }
}


.ap-language-ribbon {
  width: 100%;
  max-width: none;
  padding: 7px max(20px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(159, 184, 174, 0.38);
  box-shadow: 0 10px 24px rgba(23, 50, 77, 0.06);
}

.ap-anubhuti .ap-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid #8f2828;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ap-anubhuti .ap-btn-primary {
  background: #8f2828;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(143, 40, 40, 0.18);
}

.ap-anubhuti .ap-btn-secondary {
  background: #ffffff;
  color: #8f2828 !important;
  box-shadow: 0 12px 26px rgba(23, 50, 77, 0.08);
}

.ap-anubhuti .ap-btn:hover,
.ap-anubhuti .ap-btn:focus {
  transform: translateY(-1px);
}

.ap-anubhuti .ap-btn-primary:hover,
.ap-anubhuti .ap-btn-primary:focus {
  background: #762020;
  border-color: #762020;
}

.ap-anubhuti .ap-btn-secondary:hover,
.ap-anubhuti .ap-btn-secondary:focus {
  background: #fbf7ef;
  border-color: #762020;
  color: #762020 !important;
}

.ap-anubhuti .ap-btn:focus-visible {
  outline: 3px solid #d5952f;
  outline-offset: 3px;
}


@media (max-width: 620px) {
  .ap-language-ribbon,
  .ap-language-ribbon.ap-language-ribbon--pinned {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 7px 12px !important;
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom: 1px solid rgba(159, 184, 174, 0.38) !important;
    box-shadow: 0 10px 24px rgba(23, 50, 77, 0.06) !important;
  }
}


@media (max-width: 620px) {
  .ap-language-switcher {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 12px !important;
    margin: 0 0 18px !important;
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom: 1px solid rgba(159, 184, 174, 0.38) !important;
    box-shadow: 0 10px 24px rgba(23, 50, 77, 0.06) !important;
  }
}


/* Akshaya Peeth: tablet/mobile language ribbon surface */
@media (max-width: 1024px) {
  .ap-language-ribbon,
  .ap-language-ribbon.ap-language-ribbon--pinned,
  body.home .ap-language-ribbon,
  body.home .ap-language-ribbon.ap-language-ribbon--pinned,
  body.home .ap-language-switcher,
  .ap-language-switcher {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 7px 12px !important;
    background: rgba(255, 255, 255, 0.97) !important;
    background-color: rgba(255, 255, 255, 0.97) !important;
    border-bottom: 1px solid rgba(159, 184, 174, 0.38) !important;
    box-shadow: 0 10px 24px rgba(23, 50, 77, 0.06) !important;
  }
}


/* Akshaya Peeth: fixed language ribbon surface across all viewports */
.ap-language-ribbon,
.ap-language-ribbon.ap-language-ribbon--pinned,
body.home .ap-language-ribbon,
body.home .ap-language-ribbon.ap-language-ribbon--pinned,
body.home .ap-language-switcher,
.ap-language-switcher {
  background: rgba(255, 255, 255, 0.97) !important;
  background-color: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid rgba(159, 184, 174, 0.38) !important;
  box-shadow: 0 10px 24px rgba(23, 50, 77, 0.06) !important;
}

@media (max-width: 1024px) {
  .ap-language-ribbon,
  .ap-language-ribbon.ap-language-ribbon--pinned,
  body.home .ap-language-ribbon,
  body.home .ap-language-ribbon.ap-language-ribbon--pinned,
  body.home .ap-language-switcher,
  .ap-language-switcher {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 7px 12px !important;
  }
}
