/* ============================================================
   BANIANGOSTAR — Mobile / Responsive overrides
   ============================================================ */

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  padding-inline: clamp(16px, 4vw, 24px);
}

/* ---------- Header & navigation ---------- */
.site-head .wrap {
  gap: 1rem;
}

@media (max-width: 880px) {
  .site-head .wrap {
    justify-content: space-between;
    height: auto;
    min-height: 64px;
    padding-block: 10px;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }
}

.brand b {
  font-size: clamp(1rem, 4.2vw, 1.35rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Nav dropdown (Academy submenu) ---------- */
.nav-item {
  position: relative;
}

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-item .caret {
  width: 6px;
  height: 6px;
  border-inline-end: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: .8;
  flex-shrink: 0;
}

.submenu-toggle {
  display: none;
}

@media (min-width: 881px) {
  .dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    inset-inline-start: -14px;
    min-width: 210px;
    padding: 8px;
    border-radius: 14px;
    background: var(--teal-900, #06302e);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 40px rgba(4, 32, 31, .35);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 70;
  }

  .nav-item:hover .dropdown-menu,
  .nav-item:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .dropdown-menu a {
    color: var(--on-dark, #fff) !important;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.3;
    padding: .55rem .85rem !important;
    border-radius: 8px;
    white-space: nowrap;
  }

  .dropdown-menu a::after {
    display: none;
  }

  .dropdown-menu a:hover {
    background: rgba(216, 163, 46, .16);
    color: #fff !important;
  }
}

.brand small {
  letter-spacing: 1.5px;
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 65;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(216, 163, 46, 0.55);
  outline: none;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

.nav-overlay {
  display: none;
}

@media (max-width: 880px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 60;
    margin: 0;
    padding: 76px 20px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(165deg, var(--teal-950), var(--teal-800));
    border-bottom: 1px solid rgba(216, 163, 46, 0.25);
    box-shadow: 0 18px 40px rgba(4, 32, 31, 0.35);
    max-height: 100dvh;
    overflow-y: auto;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav a::after {
    display: none;
  }

  .nav-item > a {
    display: block;
    padding-inline-end: 44px;
  }

  .nav-item .caret {
    display: none;
  }

  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
  }

  .submenu-toggle .caret {
    display: block;
    width: 8px;
    height: 8px;
    border-inline-end: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg);
    transition: transform .25s ease;
  }

  .nav-item.is-open .submenu-toggle .caret {
    transform: rotate(225deg);
  }

  .dropdown-menu {
    display: none;
    flex-direction: column;
    padding-inline-start: 14px;
    margin-bottom: 6px;
  }

  .nav-item.is-open .dropdown-menu {
    display: flex;
  }

  .dropdown-menu a {
    border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
    padding: .7rem .3rem !important;
    font-size: .95rem !important;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(4, 32, 31, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ---------- Layout & spacing ---------- */
.section,
.related {
  padding: 48px 0;
}

.course-sec {
  margin-bottom: 32px;
}

.course-sec-head {
  margin-bottom: 18px;
}

.post-layout,
.course-layout {
  padding: 36px 0 56px;
}

@media (max-width: 768px) {
  .section,
  .related {
    padding: 40px 0;
  }

  .site-foot {
    padding-top: 48px;
  }

  .hero {
    min-height: auto;
    padding: 48px 0 56px;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 7vw, 2.4rem);
    line-height: 1.35;
  }

  .hero p {
    font-size: 1rem;
    margin: 1rem 0 1.6rem;
  }

  .hero-stats {
    gap: 1.4rem;
    margin-top: 2rem;
  }

  .hero-stats div b {
    font-size: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    justify-content: center;
    width: 100%;
  }

  .page-hero,
  .post-hero {
    padding: 40px 0 52px;
  }

  .post-hero h1,
  .page-hero h1 {
    max-width: none;
  }

  .post-body {
    padding: 24px 18px;
  }

  .form-card,
  .reg-card {
    padding: 22px 18px;
  }

  .academy-card {
    padding: 28px 20px;
    gap: 24px;
  }

  .partners-head {
    padding: 24px 18px 20px;
  }

  .partners-copy .sec-title {
    max-width: none;
  }

  .stats-grid b {
    font-size: 2rem;
  }

  .serv {
    min-height: 240px;
    padding: 26px 22px;
  }

  .proj .pc {
    padding: 22px;
  }

  .proj h3 {
    font-size: 1.1rem;
  }

  .chips {
    margin-top: -20px;
    gap: 0.45rem;
  }

  .chip {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
  }

  .courses-toolbar {
    padding: 16px;
    margin: 24px 0 28px;
  }

  .btn {
    padding: 0.75rem 1.35rem;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding-inline: 16px;
  }

  .brand .logo {
    width: 40px;
    height: 40px;
  }

  .sec-title {
    font-size: clamp(1.25rem, 5.5vw, 1.6rem);
  }

  .logo-pill {
    width: 132px;
    height: 72px;
  }

  .logo-pill img {
    height: 40px;
    max-width: 112px;
  }
}

/* ---------- Grids that overflow on small screens ---------- */
.books-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 12px;
}

.books-grid .book {
  flex: 0 0 clamp(120px, 38vw, 150px);
  scroll-snap-align: start;
}

@media (min-width: 981px) {
  .books-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .books-grid .book {
    flex: 1 1 0;
    min-width: 0;
    max-width: 180px;
  }
}

/* full logo (mark + wordmark) in header/footer */
.brand .brand-logo{height:52px;width:auto;max-width:100%;object-fit:contain;display:block}
.site-foot .brand .brand-logo{height:60px}
@media (max-width: 480px) {
  .brand .brand-logo{height:42px}
}
