/* ==========================================================================
   GCNB — supplemental styles (block styles + brand polish that theme.json
   cannot express). Loaded on the front end AND in the editor.
   ========================================================================== */

/* ---- Block style: Card (core/group .is-style-card) ---- */
.wp-block-group.is-style-card {
	background: #ffffff;
	border: 1px solid var(--wp--preset--color--border, #e8e8e8);
	border-radius: 14px;
	padding: clamp(18px, 2.4vw, 28px);
}

/* ---- Block style: Stat tile (core/group .is-style-stat-tile) ---- */
.wp-block-group.is-style-stat-tile {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 18px 16px;
	text-align: center;
}

/* ---- Block style: Outline Gold button ---- */
.wp-block-button.is-style-outline-gold .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary, #eba52c);
	border: 1px solid var(--wp--preset--color--primary, #eba52c);
}
.wp-block-button.is-style-outline-gold .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary, #eba52c);
	color: #ffffff;
}

/* ---- Header (template part) ---- */
.gcnb-header {
	position: sticky;
	top: 0;
	z-index: 100;
}
.gcnb-header .wp-block-navigation {
	gap: 30px;
}
.gcnb-header .wp-block-navigation .wp-block-navigation-item__content {
	font-weight: 600;
}
.gcnb-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--primary, #eba52c) !important;
}

/* ---- Footer link columns ---- */
.gcnb-footer a { text-decoration: none; transition: color .15s ease; }
.gcnb-footer a:hover { color: #ffffff; }
.gcnb-foot-heading { font-weight: 600; }

/* ---- Hero cover blocks: keep titles tight ---- */
.gcnb-hero .wp-block-cover__inner-container { max-width: 1000px; }

/* ---- Social icon chips ---- */
.gcnb-social .wp-block-social-link { background: #5b6b86; border-radius: 8px; }
.gcnb-social .wp-block-social-link:hover { background: var(--wp--preset--color--primary, #eba52c); }

/* ---- Member / logo tiles keep logos contained ---- */
.gcnb-logo-tile img { max-height: 64px; width: auto; object-fit: contain; }

/* ---- Numbered goal rows ---- */
.gcnb-goal-num { color: var(--wp--preset--color--primary, #eba52c); font-weight: 700; font-size: 22px; }

/* ---- Floating WhatsApp button ---- */
.gcnb-wa {
	position: fixed; right: 28px; bottom: 28px; z-index: 200;
	width: 60px; height: 60px; border-radius: 9999px;
	background: #25d366; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.gcnb-wa svg { width: 32px; height: 32px; fill: #fff; }

/* ---- Small-screen polish ---- */
@media (max-width: 781px) {
	.gcnb-wa { width: 52px; height: 52px; right: 16px; bottom: 16px; }
}

/* ---- Homepage stats: translucent tiles overlapping the hero ---- */
.gcnb-stats { margin-top: -150px; position: relative; z-index: 5; }
.gcnb-stats .wp-block-column {
	background: rgba(255, 255, 255, 0.18);
	border-radius: 12px;
	padding: 16px;
}
.gcnb-stats .wp-block-column .wp-block-heading { margin: 0 0 4px; }
@media (max-width: 781px) {
	.gcnb-stats { margin-top: -70px; }
}

/* ---- Homepage stat boxes (Globally / In Bangladesh) ---- */
.gcnb-statbox-card { gap: 10px; align-items: stretch; }
.gcnb-statbox-card > .wp-block-group { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.gcnb-statbox-card .wp-block-heading { line-height: 1; }

/* ---- Homepage Featured: horizontal cards ---- */
.gcnb-feat { align-items: center; gap: 24px; }
.gcnb-feat > .wp-block-image { flex: 0 0 231px; margin: 0; }
.gcnb-feat > .wp-block-group { flex: 1 1 auto; }
.gcnb-feat > .wp-block-buttons { flex: 0 0 auto; }
@media (max-width: 781px) {
	.gcnb-feat { flex-wrap: wrap; }
	.gcnb-feat > .wp-block-image { flex-basis: 100%; }
	.gcnb-feat > .wp-block-image img { width: 100%; height: auto; }
}

/* ---- Flush the header into the hero (no gap) ---- */
.wp-site-blocks > main { margin-block-start: 0; }
.wp-site-blocks > main { padding-top: 0; }
.wp-site-blocks > main > .wp-block-post-content > :first-child { margin-top: 0; }
.gcnb-header { margin-block-end: 0; }

/* ==========================================================================
   Listing pages (News, Publications, Gallery) — filter bar + card grid
   ========================================================================== */
.gcnb-listing { padding: 50px 0 70px; }
.gcnb-filterbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 34px; }
.gcnb-pill {
	font: inherit; cursor: pointer; border: 1px solid #d8dde5; background: #fff;
	color: #23324e; border-radius: 999px; padding: 9px 22px; font-size: 15px;
	font-weight: 500; line-height: 1; transition: all .15s ease;
}
.gcnb-pill:hover { border-color: #eba52c; color: #eba52c; }
.gcnb-pill.is-active { background: #eba52c; border-color: #eba52c; color: #fff; }

/* card */
.gcnb-listing li.wp-block-post {
	background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; overflow: hidden;
	display: flex; flex-direction: column; transition: box-shadow .18s ease, transform .18s ease;
}
.gcnb-listing li.wp-block-post:hover { box-shadow: 0 12px 30px rgba(9,40,72,.12); transform: translateY(-3px); }
.gcnb-listing li.wp-block-post .wp-block-post-featured-image { margin: 0; }
.gcnb-listing li.wp-block-post .wp-block-post-featured-image img { width: 100%; height: 210px; object-fit: cover; display: block; }
.gcnb-listing li.wp-block-post .gcnb-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.gcnb-listing li.wp-block-post .wp-block-post-terms {
	align-self: flex-start; background: #f0f2f5; color: #5c6c83; font-size: 12.5px;
	font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 4px 12px; border-radius: 6px;
}
.gcnb-listing li.wp-block-post .wp-block-post-terms a { color: inherit; text-decoration: none; }
.gcnb-listing li.wp-block-post .wp-block-post-date { color: #8a93a3; font-size: 14px; }
.gcnb-listing li.wp-block-post .wp-block-post-title { font-size: 20px; line-height: 1.25; margin: 0; }
.gcnb-listing li.wp-block-post .wp-block-post-title a { color: #23324e; text-decoration: none; }
.gcnb-listing li.wp-block-post .wp-block-post-title a:hover { color: #eba52c; }
.gcnb-listing li.wp-block-post .wp-block-read-more,
.gcnb-listing li.wp-block-post .wp-block-button__link { margin-top: auto; }

/* gallery card: square-ish image, title overlay-less */
.gcnb-listing--album li.wp-block-post .wp-block-post-featured-image img { height: 240px; }

/* ==========================================================================
   Events (ongoing-programs) — toolbar, cards, calendar
   ========================================================================== */
.gcnb-events { margin-top: 10px; }
.gcnb-events-toolbar { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.gcnb-seg { display: inline-flex; background: #fff; border: 1px solid #d8dde5; border-radius: 999px; padding: 4px; gap: 2px; }
.gcnb-seg button { font: inherit; cursor: pointer; border: 0; background: transparent; color: #23324e; border-radius: 999px; padding: 9px 20px; font-size: 15px; font-weight: 500; line-height: 1; transition: all .15s; }
.gcnb-seg button:hover { color: #eba52c; }
.gcnb-seg button.is-active { background: #eba52c; color: #fff; }

.gcnb-events-list { display: flex; flex-direction: column; gap: 16px; }
.gcnb-event-card {
	display: flex; align-items: stretch; gap: 22px; text-decoration: none;
	background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 18px 22px;
	transition: box-shadow .18s ease, transform .18s ease;
}
.gcnb-event-card:hover { box-shadow: 0 12px 30px rgba(9,40,72,.12); transform: translateY(-2px); }
.gcnb-event-date {
	flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; justify-content: center;
	background: #092848; color: #fff; border-radius: 12px; padding: 10px;
}
.gcnb-event-date .d { font-size: 34px; font-weight: 700; line-height: 1; color: #eba52c; }
.gcnb-event-date .m { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.gcnb-event-main { flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.gcnb-event-badge { align-self: flex-start; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 11px; border-radius: 6px; }
.gcnb-event-badge--ongoing { background: rgba(235,165,44,.15); color: #b97d10; }
.gcnb-event-badge--past { background: #eef0f3; color: #5c6c83; }
.gcnb-event-title { font-size: 21px; font-weight: 700; color: #23324e; line-height: 1.2; }
.gcnb-event-loc, .gcnb-event-time { font-size: 14.5px; color: #5c6c83; }
.gcnb-event-cta { align-self: center; flex: 0 0 auto; color: #eba52c; font-weight: 600; white-space: nowrap; }
.gcnb-events-calendar { background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 22px; }
#gcnb-cal { --fc-button-bg-color:#092848; --fc-button-active-bg-color:#eba52c; --fc-button-border-color:#092848; --fc-button-active-border-color:#eba52c; --fc-today-bg-color:rgba(235,165,44,.10); }
#gcnb-cal .fc-toolbar-title { font-size: 22px; color:#23324e; }
@media (max-width: 600px) {
	.gcnb-event-card { flex-wrap: wrap; gap: 14px; }
	.gcnb-event-date { flex-direction: row; gap: 8px; flex-basis: auto; padding: 8px 14px; }
	.gcnb-event-cta { display: none; }
}

/* ==========================================================================
   Motion — scroll reveal + sticky header (only under html.gcnb-anim)
   ========================================================================== */
html { scroll-behavior: smooth; }

html.gcnb-anim .wp-block-post-content > *,
html.gcnb-anim .gcnb-listing li.wp-block-post,
html.gcnb-anim .gcnb-event-card {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .75s cubic-bezier(.22,.61,.36,1), transform .75s cubic-bezier(.22,.61,.36,1);
	will-change: opacity, transform;
}
html.gcnb-anim .wp-block-post-content > *.is-in,
html.gcnb-anim .gcnb-listing li.wp-block-post.is-in,
html.gcnb-anim .gcnb-event-card.is-in {
	opacity: 1;
	transform: none;
}

/* the hero should fade only (no upward shift that reveals a gap under a fixed header) */
html.gcnb-anim .wp-block-post-content > .wp-block-cover:first-child { transform: none; }

/* sticky header gains a shadow once scrolled */
.gcnb-header { transition: box-shadow .25s ease, background-color .25s ease; }
.gcnb-header.is-stuck { box-shadow: 0 8px 28px rgba(9,40,72,.22); }

/* gentle hover lift on content cards */
.is-style-card { transition: transform .2s ease, box-shadow .2s ease; }
.wp-block-group.is-style-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(9,40,72,.10); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* Hide the header CTA buttons on mobile (keep logo + hamburger nav) */
@media (max-width: 781px) {
	.gcnb-header .wp-block-buttons { display: none !important; }
}

/* Mobile: stats sit as a clean 2x2 navy block (no hero overlap) */
@media (max-width: 781px) {
	.gcnb-hero.wp-block-cover { min-height: 460px !important; padding-top: 48px !important; padding-bottom: 44px !important; }
	.gcnb-stats { margin-top: 0; background: #092848; padding: 24px 16px 30px; }
	.gcnb-stats .wp-block-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
	.gcnb-stats .wp-block-column { background: rgba(255,255,255,0.12); margin: 0; }
	.gcnb-stats .wp-block-column .wp-block-heading { font-size: 34px; }
}

/* Mobile: hide the hero counters entirely (looked odd stacked) */
@media (max-width: 781px) {
	.gcnb-stats { display: none !important; }
}
