/* Site top stack: navbar + news ticker stay sticky together */
.site-top-stack {
  position: sticky;
  top: 0;
  z-index: 997;
  width: 100%;
}

.site-top-stack .header.sticked {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
}

/* News ticker */
.news-ticker-bar {
  background: linear-gradient(90deg, #045a30 0%, #056839 50%, #045a30 100%);
  color: #fff;
  font-size: 0.875rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.news-ticker-bar .ticker-label {
  background: #f96f59;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-ticker-track-wrap {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.news-ticker-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: njsma-ticker-scroll 45s linear infinite;
  padding: 0.55rem 0;
}

.news-ticker-track:hover {
  animation-play-state: paused;
}

.news-ticker-item {
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.news-ticker-item:hover {
  color: #ffe082;
}

.news-ticker-item .badge-type {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

@keyframes njsma-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* What's New grid */
.whats-new-grid .wn-card {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whats-new-grid .wn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.whats-new-grid .wn-card-img {
  height: 160px;
  overflow: hidden;
}

.whats-new-grid .wn-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.whats-new-grid .wn-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.whats-new-grid .wn-card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.whats-new-grid .wn-card-title a {
  color: #222;
  text-decoration: none;
}

.whats-new-grid .wn-card-meta {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.75rem;
}

.whats-new-grid .wn-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.whats-new-grid .wn-card-actions .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
}

/* Blog comments sticky sidebar */
.blog-comments-panel {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.blog-comments-panel .comment-item {
  border-bottom: 1px solid #eee;
  padding: 0.75rem 0;
}

.blog-comments-panel .comment-item:last-child {
  border-bottom: none;
}

.post-gallery-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.post-gallery-bottom h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #056839;
  margin-bottom: 1rem;
}

.post-gallery-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.post-gallery-bottom-grid img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* Koforidua In Focus */
.koforidua-focus {
  background: #f8faf9;
}

.koforidua-focus .focus-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.koforidua-focus .focus-filters button {
  border: 1px solid #056839;
  background: #fff;
  color: #056839;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}

.koforidua-focus .focus-filters button.active,
.koforidua-focus .focus-filters button:hover {
  background: #056839;
  color: #fff;
}

.koforidua-focus .focus-item-card {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.koforidua-focus .focus-item-media {
  position: relative;
  height: 220px;
  background: #f4f6f8;
}

.koforidua-focus .focus-item-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain !important;
  transition: transform 0.35s ease;
}

.koforidua-focus .focus-item-card:hover .focus-item-media img {
  transform: scale(1.02);
}

.koforidua-focus .focus-photo-count {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
}

.koforidua-focus .focus-item-overlay {
  padding: 1rem 1.15rem;
  background: #fff;
  color: #333;
  border-top: 1px solid #eee;
}

.koforidua-focus .focus-item-overlay h5 {
  font-size: 1rem;
  margin: 0.25rem 0 0;
  font-weight: 700;
  color: #222;
}

.koforidua-focus .focus-item-overlay span {
  font-size: 0.75rem;
  color: #056839;
  font-weight: 600;
  text-transform: uppercase;
}

.koforidua-focus .focus-item-overlay small {
  color: #666;
}

@media (max-width: 991px) {
  .navbar .dropdown-submenu > ul {
    position: static;
    left: auto;
    margin-left: 0.75rem;
    box-shadow: none;
    display: none;
    padding-left: 0;
  }

  .navbar .dropdown-submenu > ul.dropdown-active {
    display: block;
  }

  .navbar .nav-dept-menu {
    max-height: none;
  }
}

@media (max-width: 575px) {
  .news-ticker-bar .ticker-label {
    font-size: 0.7rem;
    padding: 0.5rem 0.65rem;
  }
  .blog-comments-panel {
    position: static;
    max-height: none;
  }
}

/* Nested department & services navigation */
.navbar .dropdown-submenu {
  position: relative;
}

.navbar .dropdown-submenu > .dropdown-menu,
.navbar .nav-dept-menu .dropdown-submenu > ul {
  top: 0;
  left: 100%;
  margin-top: 0;
  margin-left: 0.1rem;
  min-width: 220px;
}

.navbar .nav-dept-menu {
  max-height: 70vh;
  overflow-y: auto;
}

@media (min-width: 992px) {
  .navbar .dropdown-submenu:hover > ul {
    display: block;
  }
}

.navbar .dropdown-submenu > a .submenu-chevron {
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

/* Homepage updates */
.home-updates {
  background: #f4f9f6;
}

.home-updates-block {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(4, 90, 48, 0.08);
  border: 1px solid rgba(4, 90, 48, 0.08);
}

.home-updates-block__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #056839;
}

.home-updates-block__head i {
  font-size: 1.35rem;
  color: #056839;
}

.home-updates-block__head h3 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 700;
}

.home-update-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.home-update-card:last-child {
  border-bottom: none;
}

.home-update-card__thumb {
  flex: 0 0 72px;
  height: 72px;
  border-radius: 0.5rem;
  overflow: hidden;
}

.home-update-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-update-card__body time {
  font-size: 0.75rem;
  color: #6c757d;
}

.home-update-card__body h4 {
  font-size: 0.95rem;
  margin: 0.2rem 0;
  line-height: 1.3;
}

.home-update-card__body h4 a {
  color: #045a30;
  text-decoration: none;
}

.home-update-card__body p {
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.home-update-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #056839;
}

/* Department detail pages */
.dept-detail-hero {
  background: linear-gradient(135deg, #045a30 0%, #056839 100%);
  color: #fff;
  padding: 2.5rem 0 2rem;
  background-size: cover;
  background-position: center;
  position: relative;
}

.dept-detail-hero.has-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 40, 22, 0.72);
}

.dept-detail-hero .container {
  position: relative;
  z-index: 1;
}

.dept-detail-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.dept-detail-hero h1 {
  font-weight: 700;
  margin: 0.5rem 0;
}

.dept-detail-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
}

.dept-content-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #e9ecef;
}

.dept-content-card--accent {
  border-left: 4px solid #056839;
}

.dept-content-card h2 {
  font-size: 1.25rem;
  color: #045a30;
  margin-bottom: 1rem;
}

.dept-sidebar-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #e9ecef;
}

.dept-sidebar-card h3 {
  font-size: 1rem;
  color: #045a30;
  margin-bottom: 1rem;
}

.dept-head-photo {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.dept-unit-card {
  display: block;
  background: #f8f9fa;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e9ecef;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.2s;
  color: inherit;
}

.dept-unit-card:hover {
  box-shadow: 0 6px 20px rgba(4, 90, 48, 0.12);
  transform: translateY(-2px);
}

.dept-unit-card__img {
  width: 100%;
  height: 120px;
  object-fit: contain;
}

.dept-unit-card__body {
  padding: 1rem;
}

.dept-unit-card__body h3 {
  font-size: 1rem;
  color: #045a30;
}

.dept-unit-card__link {
  font-size: 0.85rem;
  color: #056839;
  font-weight: 600;
}

.dept-doc-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #eee;
}

.dept-doc-list__item:last-child {
  border-bottom: none;
}

.dept-doc-list__meta {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.dept-doc-list__meta i {
  font-size: 1.5rem;
  color: #056839;
}

.dept-other-list li {
  margin-bottom: 0.5rem;
}

.dept-other-list a {
  color: #045a30;
  text-decoration: none;
}

.dept-other-list a:hover {
  text-decoration: underline;
}

.dept-unit-hero-img {
  max-height: 320px;
  object-fit: contain;
}

/* Gallery detail lightbox grid */
.gallery-detail-grid img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 0.5rem;
  cursor: pointer;
}
