/* =========================================================
   Agami News — Custom Header (mobile-first)
   ========================================================= */

.agami-header {
  background: #ffffff;
  border-bottom: 1px solid #e7eaea;
  font-family: inherit;
}

.agami-header * {
  box-sizing: border-box;
}

/* ---------- Row 1: hamburger / logo / search ---------- */
.ah-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #ffffff;
  transition: box-shadow .2s ease;
}

.ah-top-row.is-stuck {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.ah-icon-btn {
  background: transparent;
  border: 0;
  padding: 6px 8px;
  font-size: 22px;
  line-height: 1;
  color: #111;
  cursor: pointer;
  flex: 0 0 auto;
}

.ah-icon-btn:focus {
  outline: none;
}

.ah-logo {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
  min-width: 0;
}

.ah-logo img {
  max-width: 393px;
  max-height: 125px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: inline-block;
}

.ah-logo .textLogo {
  font-size: 26px;
  font-weight: 700;
  color: #0f7a3d;
  text-decoration: none;
  white-space: nowrap;
}

.ah-desktop-banner {
  display: none;
}

/* ---------- Collapsible search box ---------- */
.ah-search-box {
  max-height: 0;
  overflow: hidden;
  background: #f5f7f7;
  transition: max-height .25s ease;
}

.ah-search-box.is-open {
  max-height: 120px;
}

.ah-search-box-inner {
  padding: 10px 14px;
}

.ah-search-box-inner form {
  display: flex;
  width: 100%;
}

.ah-search-box-inner input[type="text"],
.ah-search-box-inner input[type="search"] {
  flex: 1 1 auto;
  border: 1px solid #dcdfdf;
  border-radius: 4px 0 0 4px;
  padding: 8px 12px;
  font-size: 14px;
  height: 42px;
}

.ah-search-box-inner button,
.ah-search-box-inner input[type="submit"] {
  flex: 0 0 auto;
  border: 1px solid #0f7a3d;
  background: #0f7a3d;
  color: #fff;
  padding: 0 16px;
  border-radius: 0 4px 4px 0;
  height: 42px;
}

.ah-search-box-inner .input-group-btn {
  display: flex;
}

.ah-search-box-inner #close_mobile_search {
  display: none;
}

/* ---------- Row 2: category strip ---------- */
.ah-cat-strip {
  background: #eef2f2;
  border-top: 1px solid #e2e6e6;
  border-bottom: 1px solid #e2e6e6;
}

.ah-cat-list {
  list-style: none;
  margin: 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 26px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ah-cat-list::-webkit-scrollbar {
  display: none;
}

.ah-cat-list li {
  flex: 0 0 auto;
}

.ah-cat-list li a {
  display: inline-block;
  padding: 13px 0;
  color: #555c5c;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.ah-cat-list li:first-child a {
  color: #111;
}

.ah-cat-list li a:hover,
.ah-cat-list li.current-menu-item > a {
  color: #0f7a3d;
}

/* ---------- Row 3: location + date ---------- */
.ah-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 14px auto;
  padding: 10px 18px;
  max-width: calc(100% - 28px);
  border: 1px solid #e2e6e6;
  border-radius: 6px;
  color: #333;
  font-size: 15px;
  background: #fff;
}

.ah-meta-item i {
  margin-right: 6px;
  color: #333;
}

/* ---------- Row 4: trending tags ---------- */
.ah-trending {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 16px;
}

.ah-trending-label {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 16px;
  color: #111;
}

.ah-trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ah-trending-list::-webkit-scrollbar {
  display: none;
}

.ah-trending-list li {
  flex: 0 0 auto;
}

.ah-trending-list li a,
.ah-tag {
  display: inline-block;
  flex: 0 0 auto;
  background: #eef2f2;
  color: #222;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
}

.ah-trending-list li a:hover,
.ah-tag:hover {
  background: #0f7a3d;
  color: #fff;
}

/* prevent background scroll while the drawer is open */
body.ah-noscroll {
  overflow: hidden;
}

/* ---------- Slide-in drawer menu ---------- */
.ah-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
  z-index: 1040;
}

.ah-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ah-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 78%;
  max-width: 320px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 1050;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0, 0, 0, .15);
}

.ah-drawer.is-open {
  transform: translateX(0);
}

.ah-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.ah-drawer-title {
  font-weight: 700;
  font-size: 18px;
  color: #0f7a3d;
}

.ah-drawer-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.ah-drawer-list li a {
  display: block;
  padding: 12px 18px;
  color: #222;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid #f2f2f2;
}

.ah-drawer-list li a:hover {
  background: #f5f7f7;
  color: #0f7a3d;
}

/* =========================================================
   Desktop / tablet adjustments
   ========================================================= */
@media (min-width: 992px) {
  .ah-top-row {
    max-width: 1212px;
    margin: 0 auto;
    padding: 14px 12px;
  }

  .ah-hamburger {
    display: none;
  }

  .ah-logo {
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .ah-logo img {
    width: auto;
  }

  .ah-desktop-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    margin-right: 10px;
  }

  .ah-search-toggle {
    order: 3;
  }

  .ah-cat-list {
    max-width: 1212px;
    margin: 0 auto;
    justify-content: flex-start;
    padding: 0 12px;
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .ah-meta-bar {
    max-width: 1212px;
    justify-content: flex-start;
  }

  .ah-trending {
    max-width: 1212px;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
  }
}
