/* Mega menu: desktop hover panels and mobile drawer accordions.
   Rendered only when <html> has .mm-on (see nav.ejs). */

.gp-mega { display: none; }
html.mm-on .navbar .dropdown-menu { display: none !important; }
html.mm-on nav.navbar { z-index: 1031; }
html:not(.mm-on) .gp-macc { display: none !important; }
html.mm-on .gp-old { display: none !important; }

/* ---------- shared pieces ---------- */
.gp-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #5B6B6B; }
.gp-label-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.gp-label-row-spread { justify-content: space-between; }
.gp-label-row-spread > .gp-label-row { margin-bottom: 0; }
.gp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.gp-badge-cyan { background: #E3F6F6; color: #0B4A4C; }
.gp-badge-gold { background: #E9CF8B; color: #3F3000; }
.gp-badge-dark { background: #003134; color: #ffffff; }
.gp-badge-lime { background: #F3FBD9; color: #3F5A00; border: 1px solid #C7EE4E; }
.gp-badge-outline { background: #ffffff; color: #003134; border: 1px solid #DDE6DD; }
.gp-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: #85B000; text-decoration: underline; text-underline-offset: 3px; }
.gp-link:hover { color: #6C9200; }
.gp-link-lime { color: #C7EE4E; }
.gp-link-lime:hover { color: #E3F6A6; }
.gp-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; }
.gp-btn-lime { background: linear-gradient(180deg, #F3FBD9 -4.17%, #C7EE4E 14.96%, #85B000 88.25%, #9ACC00 108.33%); color: #1E2F2C; }
.gp-btn-lime:hover { background: var(--green-gradient-hover, linear-gradient(180deg, #C7EE4E 0%, #85B000 100%)); color: #1E2F2C; }
.gp-btn-outline { background: #ffffff; color: #003134; border: 1px solid #003134; }
.gp-btn-outline:hover { background: #F7FEE0; color: #003134; }
.gp-btn-auto { display: inline-flex; }
.gp-thumb { width: 36px; height: 36px; border-radius: 8px; background: #003134; object-fit: cover; flex-shrink: 0; display: inline-block; }
.gp-icon-tile { width: 40px; height: 40px; border-radius: 8px; background: #E9F5DC; color: #3F5A00; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }

/* ---------- desktop panels ---------- */
@media (min-width: 992px) {
  html.mm-on .gp-mega { display: block; }
  .gp-mega-backdrop { position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: rgba(0, 49, 52, 0.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1030; }
  .gp-mega.is-open .gp-mega-backdrop { opacity: 1; pointer-events: auto; }
  .gp-mega-panel { position: absolute; left: 16px; right: 16px; top: 100%; z-index: 1040; background: #ffffff; border-radius: 0 0 24px 24px; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25); padding: 56px 80px 56px; display: none; color: #1E2F2C; }
  .gp-mega-panel.is-open { display: block; }
  .gp-mega-panel a { text-decoration: none; }
  .gp-mega-panel .gp-link { text-decoration: underline; }
  .gp-grid { display: grid; gap: 0; }
  .gp-grid-sc { grid-template-columns: 1fr 1.2fr 1.05fr; }
  .gp-grid-pms { grid-template-columns: 2.2fr 1fr; }
  .gp-grid-res { grid-template-columns: 1fr 2.3fr; }
  .gp-col { padding: 0 40px; min-width: 0; }
  .gp-col:first-child { padding-left: 0; }
  .gp-col:last-child { padding-right: 0; }
  .gp-col-div { border-left: 1px solid #E6ECEC; }

  /* trigger state in the nav */
  .navbar [data-mega].is-open { background: #F7FEE0; color: #003134 !important; }
  html.mm-on .navbar-collapse .nav-item.dropdown:hover .nav-link[data-mega],
  html.mm-on .navbar-collapse .nav-item.dropdown .nav-link[data-mega].is-open { background: #0E4C4E; color: #C7EE4E !important; font-weight: 500 !important; border-radius: 20px; padding-left: 12px; padding-right: 12px; }
  html.mm-on .navbar-collapse .nav-item.dropdown:hover .nav-link[data-mega]::after,
  html.mm-on .navbar-collapse .nav-item.dropdown .nav-link[data-mega].is-open::after { background-color: #C7EE4E; }

  /* category cards */
  .gp-cat-cards { display: flex; flex-direction: column; gap: 16px; }
  .gp-cat-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid #E6ECEC; border-radius: 12px; background: #ffffff; color: #1E2F2C; transition: background .2s, color .2s, box-shadow .2s; }
  .gp-cat-title { font-size: 18px; font-weight: 600; }
  .gp-cat-desc { font-size: 14px; line-height: 1.5; color: #4B5F60; }
  .gp-cat-card .gp-link { margin-top: 6px; }
  .gp-cat-card:hover { background: linear-gradient(180deg, #0E4C4E 0%, #003134 100%); color: #ffffff; box-shadow: 0 12px 24px rgba(0, 49, 52, 0.25); border-color: transparent; }
  .gp-cat-card:hover .gp-cat-desc { color: #D6E4E4; }
  .gp-cat-card:hover .gp-link { color: #C7EE4E; }

  /* row lists */
  .gp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
  .gp-list-2col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 4px; }
  .gp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #1E2F2C; font-size: 15px; font-weight: 500; transition: background .15s; }
  .gp-row:hover { background: #F7FEE0; color: #003134; }
  .gp-row-title { min-width: 0; }

  /* featured card */
  .gp-featured { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; background: #F3F7F3; border: 1px solid #DDE6DD; }
  .gp-featured-badges { display: flex; gap: 8px; flex-wrap: wrap; }
  .gp-featured-badges .gp-badge { text-transform: uppercase; letter-spacing: 0.02em; }
  .gp-featured-head { display: flex; align-items: center; gap: 12px; }
  .gp-featured-icon { width: 48px; height: 48px; border-radius: 10px; background: #003134; color: #C7EE4E; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; object-fit: cover; flex-shrink: 0; }
  .gp-featured-title { font-size: 20px; font-weight: 600; color: #003134; }
  .gp-featured-desc { margin: 0; font-size: 14px; line-height: 1.55; color: #4B5F60; }

  /* CTA bar */
  .gp-cta { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 12px 12px 24px; border-radius: 14px; background: linear-gradient(180deg, #0E4C4E 0%, #003134 100%); box-shadow: 0 12px 24px rgba(0, 49, 52, 0.25); }
  .gp-cta-text { color: #ffffff; font-size: 15px; font-weight: 500; }

  /* AIF cards */
  .gp-aif-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
  .gp-aif-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 16px; background: linear-gradient(180deg, #0E4C4E 0%, #003134 100%); color: #ffffff; box-shadow: 0 12px 24px rgba(0, 49, 52, 0.2); }
  .gp-aif-soon { position: absolute; top: 20px; right: 20px; }
  .gp-aif-logo { width: 48px; height: 48px; border-radius: 10px; background: #F5F5F0; object-fit: contain; display: inline-block; margin-bottom: 6px; }
  .gp-aif-title { font-size: 20px; font-weight: 600; }
  .gp-aif-desc { font-size: 14px; line-height: 1.55; color: #D6E4E4; }
  .gp-aif-card .gp-link { margin-top: 6px; }

  /* resources */
  .gp-podcast { display: flex; flex-direction: column; gap: 14px; }
  .gp-podcast .gp-label-row { margin-bottom: 4px; }
  .gp-podcast-label { font-size: 16px; font-weight: 600; color: #003134; }
  .gp-podcast-thumb { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: #003134; }
  .gp-podcast-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .gp-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #003134; display: flex; align-items: center; justify-content: center; font-size: 28px; }
  .gp-podcast-title { font-size: 16px; font-weight: 600; color: #003134; line-height: 1.4; }
  .gp-podcast-meta { font-size: 13px; color: #6B7C7C; }
  .gp-res-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .gp-res-cols .gp-res-list:first-child { padding-right: 32px; }
  .gp-res-cols .gp-res-list + .gp-res-list { border-left: 1px solid #E6ECEC; padding-left: 32px; }
  .gp-res-list { list-style: none; margin: 0; padding: 0; }
  .gp-res-list li + li { border-top: 1px solid #E6ECEC; }
  .gp-res-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 12px; min-height: 104px; box-sizing: border-box; border-radius: 12px; color: #1E2F2C; transition: background .15s; }
  .gp-res-item:hover { background: #F7FEE0; }
  .gp-res-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .gp-res-title { font-size: 16px; font-weight: 600; color: #003134; }
  .gp-res-desc { font-size: 14px; line-height: 1.5; color: #4B5F60; }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .gp-mega-panel { padding: 32px 40px 36px; }
  .gp-col { padding: 0 24px; }
  .gp-grid-sc { grid-template-columns: 1fr 1fr 1fr; }
  .gp-res-cols { grid-template-columns: 1fr; }
  .gp-res-cols .gp-res-list:first-child { padding-right: 0; }
  .gp-res-cols .gp-res-list + .gp-res-list { border-left: 0; padding-left: 0; }
}

/* ---------- mobile drawer: drill-down pages + Resources accordion ---------- */
@media (max-width: 991.98px) {
  .offcanvas-body .navbar-nav .nav-item.gp-macc.accordion { border-bottom: 1px solid #BFD4D2; padding-bottom: 28px; }
  .offcanvas-body .navbar-nav .nav-item.invest-link.gp-macc { border-bottom: 1px solid #BFD4D2; padding-bottom: 28px; }
  .gp-msub { position: absolute; inset: 0; z-index: 5; background: #ffffff; display: flex; flex-direction: column; overflow: hidden; list-style: none; }
  .gp-msub[hidden] { display: none; }
  .gp-msub-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 56px; padding: 0 8px; border-bottom: 1px solid #E6ECEC; flex-shrink: 0; }
  .gp-msub-title { text-align: center; font-size: 16px; font-weight: 600; color: #003134; }
  .gp-msub-back, .gp-msub-close { width: 40px; height: 40px; border: 0; background: none; color: #003134; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
  .gp-msub-body { flex: 1; overflow-y: auto; padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
  .gp-msub-body a { text-decoration: none; }
  .gp-mbody { padding: 8px 0 0; display: flex; flex-direction: column; gap: 14px; }
  .gp-mbody a { text-decoration: none; }
  .gp-mhead { display: flex; flex-direction: column; gap: 10px; }
  .gp-mbadges { display: flex; flex-wrap: wrap; gap: 8px; }
  .gp-mlabel { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #5B6B6B; }
  .gp-mdivider { height: 1px; background: #E6ECEC; margin: 4px 0; }
  .gp-mcards { display: flex; flex-direction: column; gap: 12px; }
  .gp-mcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid #E6ECEC; border-radius: 12px; background: #ffffff; color: #1E2F2C; }
  .gp-mcard-title { font-size: 16px; font-weight: 600; color: #003134; }
  .gp-mcard-desc { font-size: 14px; line-height: 1.5; color: #4B5F60; }
  .gp-mcard .gp-link { margin-top: 4px; font-size: 14px; }
  .gp-mcard-dark { background: linear-gradient(180deg, #0E4C4E 0%, #003134 100%); border-color: transparent; color: #ffffff; padding: 20px; gap: 8px; }
  .gp-mcard-dark .gp-mcard-title { color: #ffffff; font-size: 18px; }
  .gp-mcard-dark .gp-mcard-desc { color: #D6E4E4; }
  .gp-mcard-dark .gp-aif-soon { position: absolute; top: 16px; right: 16px; }
  .gp-mcard-dark .gp-aif-logo { width: 44px; height: 44px; border-radius: 8px; background: #F5F5F0; object-fit: contain; display: inline-block; margin-bottom: 4px; }
  .gp-mlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
  .gp-mlist a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 8px; font-size: 15px; font-weight: 500; color: #2B4B4D; }
  .gp-mlist a:active { background: #F7FEE0; }
  .gp-mviewall { font-size: 14px; padding: 0 8px; }
  .gp-mfeatured { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: #F3F7F3; border: 1px solid #DDE6DD; }
  .gp-mfeatured .gp-badge { text-transform: uppercase; letter-spacing: 0.02em; }
  .gp-mfeatured-head { display: flex; align-items: center; gap: 12px; }
  .gp-featured-icon { width: 44px; height: 44px; border-radius: 10px; background: #003134; color: #C7EE4E; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; object-fit: cover; flex-shrink: 0; }
  .gp-mfeatured-title { font-size: 17px; font-weight: 600; color: #003134; }
  .gp-mfeatured-desc { font-size: 14px; line-height: 1.5; color: #4B5F60; }
  .gp-mcta { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: linear-gradient(180deg, #0E4C4E 0%, #003134 100%); color: #ffffff; font-size: 14px; font-weight: 500; }
  .gp-btn { min-height: 44px; font-size: 14px; }
}
