/*
Theme Name: Gandaki Government
Theme URI: https://gandaki.gov.np
Author: Government of Gandaki Province
Author URI: https://gandaki.gov.np
Description: Official theme for the Government of Gandaki Province website.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gandaki-govt
Tags: government, nepal, accessibility, bilingual
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: "Noto Sans Devanagari", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   ACCESSIBILITY BAR (.top-bar) — matches original gov site
   ============================================================ */
.top-bar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  color: #007bff;
  background: #fff;
  padding: 9px 0;
  box-shadow: 0px 0px 4px 0px #ece9e9;
  position: fixed;
  width: 100%;
  z-index: 100;
  top: 0;
}

.top-bar .list-group {
  flex-direction: row;
}

.top-bar .list-group-item {
  padding: 0.2rem 1rem;
  font-size: 0.875rem;
  border: none;
  border-right: 1px solid rgba(0, 0, 0, 0.125);
  color: #007bff;
  background: transparent;
}

.top-bar .list-group-item a {
  color: #007bff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.top-bar .list-group-item a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Font Resizer */
.fontResizer {
  cursor: pointer;
}

.fontResizer > span {
  color: #007bff;
  padding: 0px 8px;
}

.fontResizer > span:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* ============================================================
   BODY OFFSET — push content below fixed bar
   ============================================================ */
.top-header {
  padding-top: 44px;
}

/* ============================================================
   SKIP TO CONTENT (accessibility)
   ============================================================ */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 9999;
  background: #007bff;
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 4px 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-to-content:focus {
  top: 0;
}

/* ============================================================
   BRANDING HEADER — two-zone design
   ============================================================ */
.header-hairline {
  height: 2px;
  background: #e8e8e8;
}

.header-branding {
  display: flex;
  height: 104px;
  overflow: hidden;
}

/* LEFT ZONE */
.header-left {
  width: 30%;
  min-width: 320px;
  background: #304E87;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  flex-shrink: 0;
  z-index: 2;
}

.header-emblem .img-logo,
.header-emblem .custom-logo-link img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  object-fit: cover;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.header-ministry-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-province-name {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
}

.header-ministry-name {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
}

.header-tagline {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.2;
}

/* RIGHT ZONE */
.header-right {
  flex: 1;
  background: #355FB3;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.header-stupa {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 96px;
  pointer-events: none;
}

.header-stupa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.13;
  filter: brightness(0.4) sepia(0.2);
}

.header-notice {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  padding-left: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}

.header-notice-label {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.header-notice-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.header-notice-text {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.header-flag-date {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.nepal-flag-icon {
  width: 28px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.header-date-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.header-date-bs {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  line-height: 1.35;
}

/* Blink animation */
.blink_me {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

/* ============================================================
   NAVBAR (.header-last)
   ============================================================ */
.header-last {
  z-index: 3;
  background-color: #2460b9;
  --bs-gutter-x: 0;
}

.header-last ul.navbar-nav a.nav-link {
  padding: 0.5rem 0.75rem;
  color: #ffffff;
}

.header-last ul.navbar-nav a.nav-link:hover {
  color: #ffffff;
  background: #ff0016;
}

nav.navbar.navbar-expand-sm.navbar-dark {
  margin: 0;
  width: 100%;
  background: none;
  color: #281a04;
  padding: 0;
}

/* Nested dropdown sub-menus */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  display: none;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

/* ============================================================
   RESPONSIVE — TABLET & MOBILE
   ============================================================ */

/* Branding: tablet — compress left zone, hide notice ticker */
@media (max-width: 991px) {
  .header-branding {
    height: auto;
    min-height: 80px;
  }
  .header-left {
    min-width: 0;
    width: 45%;
    padding: 12px 16px;
    gap: 10px;
  }
  .header-tagline {
    font-size: 15px;
  }
  .header-notice {
    display: none;
  }
}

/* Branding: mobile — stack zones vertically */
@media (max-width: 767px) {
  .header-branding {
    flex-direction: column;
    height: auto;
  }
  .header-left {
    width: 100%;
    min-width: 0;
    padding: 12px 16px;
  }
  .header-right {
    width: 100%;
    min-height: 44px;
  }
  .header-notice {
    display: none;
  }
  .header-flag-date {
    right: 12px;
  }
}

/* Top-bar: compact on mobile/tablet */
@media (max-width: 991px) {
  .top-bar {
    padding: 5px 0;
  }
  .top-bar .list-group {
    justify-content: center;
  }
  .top-bar .list-group-item {
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* Nav: collapsed state on mobile/tablet (<992px) */
@media (max-width: 991px) {
  .header-last {
    margin-top: 0 !important;
  }
  .header-last .container,
  .header-last .container-fluid {
    --bs-gutter-x: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .header-last .navbar-collapse .navbar-nav {
    padding: 0.5rem 0;
  }
  .header-last .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .header-last .dropdown-menu {
    background: #1a4a9a;
    border: none;
    border-radius: 0;
  }
  .header-last .dropdown-item {
    color: #fff;
  }
  .header-last .dropdown-item:hover {
    background: #ff0016;
    color: #fff;
  }
  .dropdown-submenu > .dropdown-menu {
    position: static;
    left: 0;
    display: none;
  }
  .dropdown-submenu.open > .dropdown-menu {
    display: block;
  }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE HEADER  (<992px)
   ══════════════════════════════════════════════════════════════ */

/* Branding band — mobile (single row) */
.brand-band-mob {
  width: 100%;
  background: #fff;
  padding: 6px 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  min-height: 56px;
}
.logo-block-mob { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.emblem-mob {
  width: 40px; height: 40px; border-radius: 50%;
  background: #1B4A9A; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; overflow: hidden;
}
.emblem-mob img { width: 28px; height: 28px; object-fit: contain; }
.ministry-name-mob {
  font-weight: 700; font-size: 13px; color: #1A1A1A; line-height: 1.3;
  font-family: 'Noto Sans Devanagari', 'Mukta', system-ui, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mob-flag-date {
  display: flex; align-items: center; gap: 6px;
  margin: 0 10px; flex-shrink: 0;
}
.mob-flag-icon { width: 24px; display: block; }
.mob-date-bs {
  font-size: 11px; font-weight: 600; color: #304E87;
  white-space: nowrap;
  font-family: 'Noto Sans Devanagari', 'Mukta', system-ui, sans-serif;
}
.hamburger-btn {
  background: none; border: none; cursor: pointer; color: #1B4A9A;
  display: flex; align-items: center; justify-content: center; padding: 4px;
  flex-shrink: 0;
}

/* Mobile overlay */
.mob-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 1050; display: none;
}
.mob-overlay.open { display: block; }

/* Bottom-sheet drawer */
.mob-drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-radius: 16px 16px 0 0;
  z-index: 1051; transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
  max-height: 85vh; overflow-y: auto; display: none;
}
.mob-drawer.open { transform: translateY(0); }
.drawer-handle {
  width: 36px; height: 4px; background: #D1D5DB;
  border-radius: 2px; margin: 12px auto 4px;
}
.drawer-header-label {
  padding: 8px 20px 12px; border-bottom: 1px solid #E5E9F0;
  font-size: 14px; color: #6B7280; font-weight: 500;
  font-family: 'Noto Sans Devanagari', 'Mukta', system-ui, sans-serif;
}
.drawer-item { border-bottom: 1px solid #E5E9F0; }
.drawer-link {
  padding: 16px 20px; display: flex; justify-content: space-between;
  align-items: center; font-size: 16px; font-weight: 500; color: #1A1A1A;
  cursor: pointer; background: none; border: none; width: 100%;
  font-family: 'Noto Sans Devanagari', 'Mukta', system-ui, sans-serif;
  text-align: left;
}
.drawer-link.active {
  border-left: 3px solid #1B4A9A; background: #F4F8FF;
  color: #1B4A9A; padding-left: 17px;
}
.drawer-chev { transition: transform 0.2s; display: flex; align-items: center; flex-shrink: 0; }
.drawer-chev.open { transform: rotate(180deg); }
.drawer-children { display: none; }
.drawer-children.open { display: block; }
.drawer-child {
  padding: 12px 20px 12px 32px; font-size: 14px; color: #6B7280;
  border-bottom: 1px solid #F0F2F7; cursor: pointer; display: block;
  background: #FAFBFC; text-decoration: none;
  font-family: 'Noto Sans Devanagari', 'Mukta', system-ui, sans-serif;
}
.drawer-child:hover { color: #1B4A9A; }
.drawer-cta-wrap { padding: 16px 20px; }
.drawer-cta-btn {
  width: 100%; text-align: center; display: block;
  border: 1.5px solid #1B4A9A; color: #1B4A9A; background: transparent;
  border-radius: 6px; padding: 11px 20px; font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.drawer-cta-btn:hover { background: #1B4A9A; color: #fff; }

/* Show mobile elements, hide desktop elements on mobile */
@media (max-width: 991px) {
  .brand-band-mob { display: flex; }
  .mob-drawer { display: block; }
  /* hide desktop-only header layers */
  .top-bar { display: none !important; }
  .header-hairline { display: none; }
  .header-branding { display: none !important; }
  .header-last { display: none !important; }
}

/* ── Highlights Ticker ── */
.highlights-ticker-wrap {
  background: #ffffff;
  padding: 4px;
}

.breaking-news-ticker {
  display: flex;
  align-items: stretch;
  min-height: 38px;
  overflow: hidden;
  background-color: #eeeeee;
}

.bn-label {
  flex-shrink: 0;
  background: #2460b9;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0 16px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: "Noto Sans Devanagari", sans-serif;
}

.ptms_marquee {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.ptms_marquee marquee {
  width: 100%;
}

.ptms_marquee p {
  margin: 0;
  color: #0d2240;
  font-family: "Noto Sans Devanagari", sans-serif;
}

.ptms_marquee a {
  color: #2460b9;
  text-decoration: none;
}

.ptms_marquee a:hover {
  text-decoration: underline;
  color: #ee1d25;
}

@media (max-width: 575.98px) {
  .bn-label {
    display: none;
  }
}

/* ── Home Carousel ── */
#gandaki-carousel {
  border-radius: 15px;
  overflow: hidden;
}

.gc-slide-img {
  width: 100%;
  height: 580px;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

.gc-caption {
  background: transparent;
  border-radius: 0;
  padding: 12px 20px;
  left: 0;
  right: 0;
  bottom: 2.25rem;
  top: auto;
  z-index: 10;
}

.gc-caption-text {
  color: #fff !important;
  margin: 0;
  font-family: "Noto Sans Devanagari", serif;
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.7);
}

#gandaki-carousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border-top: none;
  border-bottom: none;
  opacity: 0.5;
}

#gandaki-carousel .carousel-indicators .active {
  opacity: 1;
}

#gandaki-carousel .carousel-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.65));
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .gc-slide-img {
    height: 240px;
  }
}

@media (max-width: 480px) {
  .gc-slide-img {
    height: 180px;
  }
  .gc-caption-text {
    font-size: 0.85rem;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

/* ── About / inner-page styles ────────────────────────────────── */

hr.underlined {
  width: 13%;
  border: 2px solid #f54242;
  margin: .5rem auto;
  opacity: 0.9;
}

.page-body table { border-collapse: collapse; }
.page-body th,
.page-body td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}
.page-body th {
  background-color: #0167bb;
  color: #fff;
}

.social-media { margin: 10px; text-align: center; }
.social-media a {
  padding: 10px 15px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  border-radius: 4px;
  margin: 2px;
}
.social-media a:hover { opacity: 0.7; }
.social-media #facebook { background: #3B5998; color: #fff; }
.social-media #twitter  { background: #55ACEE; color: #fff; }
.social-media #google   { background: #dd4b39; color: #fff; }

/* ============================================================
   GUTENBERG BLOCK — Columns fix (Bootstrap conflict override)
   Bootstrap resets flex children; restore Gutenberg's column
   layout so wp-block-columns renders correctly.
   ============================================================ */
.wp-block-columns {
  display: flex !important;
  flex-wrap: wrap;
  gap: 1.5em;
  align-items: normal;
}

.wp-block-column {
  flex-grow: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.wp-block-column:not([style*="flex-basis"]) {
  flex-basis: 0;
}

.page .entry-title {
    display: none;
  }

#main-content article {

    align-items: center;
    justify-content: center;
}
#main-content h1 {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;

}