/*
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;
}

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

/* ============================================================
   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 (.header)
   ============================================================ */
.header {
  padding-top: 0;
  background: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.header > .container-fluid {
  padding-top: 46px;
  padding-bottom: 24px;
}

.img-logo {
  padding-top: 16px;
  width: 125px;
}

.national-flag {
  width: 90px;
  height: 120px;
}

/* Ministry name block */
.custom-name h1 {
  font-size: 2.37rem;
  color: #ee1d25;
  font-weight: bolder;
  padding: 4px 0;
  margin: 0;
}

.custom-name p {
  color: #484747;
  font-weight: 600;
  padding: 5px 0;
  margin: 0;
}

/* 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: scale down ministry name on tablet */
@media (max-width: 991px) {
  .custom-name h1 {
    font-size: 1.6rem;
  }
}

/* Branding: further scale on small tablet / large phone */
@media (max-width: 767px) {
  .custom-name h1 {
    font-size: 1.25rem;
  }
  .custom-name p {
    font-size: 0.8rem;
    padding: 2px 0;
  }
  .img-logo {
    width: 80px;
    padding-top: 8px;
  }
}

/* Branding: compact on small phones */
@media (max-width: 575px) {
  .custom-name h1 {
    font-size: 1.05rem;
  }
  .img-logo {
    width: 65px;
  }
}

/* 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;
  }
}

/* ── 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: 1700px;
  }
}

/* ── 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;
}
