/**
 * Nonprofit Donation — main component styles.
 *
 * Layout, header, navigation, buttons, cards, blog, footer and utilities.
 * Color/typography tokens are defined in style.css :root and overridden at
 * runtime from theme options (see inc/enqueue.php → ndp_dynamic_css).
 */

/* -------------------------------------------------------------------------- */
/* Layout helpers                                                             */
/* -------------------------------------------------------------------------- */
.ndp-container {
	width: 100%;
	max-width: var(--ndp-container);
	margin-inline: auto;
	padding-inline: 20px;
}

.ndp-content-wrap {
	display: grid;
	gap: 40px;
	padding-block: 60px;
	grid-template-columns: minmax(0, 1fr) 320px;
}

.ndp-content-wrap.ndp-layout-full-width,
.ndp-content-wrap.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.ndp-content-wrap.ndp-layout-left-sidebar { grid-template-columns: 320px minmax(0, 1fr); }
.ndp-content-wrap.ndp-layout-left-sidebar .site-main { order: 2; }
.ndp-content-wrap.ndp-layout-left-sidebar #secondary { order: 1; }

.site-main--elementor { padding: 0; }

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */
.ndp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: 12px 26px;
	font-family: var(--ndp-font-heading);
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	border: 2px solid transparent;
	border-radius: 50px;
	cursor: pointer;
	transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
	text-align: center;
}
.ndp-btn:hover { transform: translateY(-2px); }
.ndp-btn--primary { background: var(--ndp-color-primary); color: #fff; }
.ndp-btn--primary:hover { background: var(--ndp-color-secondary); color: #fff; }
.ndp-btn--accent { background: var(--ndp-color-accent); color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 89, .25); }
.ndp-btn--accent:hover { background: var(--ndp-color-secondary); color: #fff; }
.ndp-btn--outline { background: transparent; border-color: var(--ndp-color-primary); color: var(--ndp-color-primary); }
.ndp-btn--outline:hover { background: var(--ndp-color-primary); color: #fff; }

/* -------------------------------------------------------------------------- */
/* Top bar                                                                    */
/* -------------------------------------------------------------------------- */
.ndp-topbar {
	background: var(--ndp-color-secondary);
	color: #cfd5e3;
	font-size: 14px;
}
.ndp-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	gap: 20px;
}
.ndp-topbar__info { display: flex; gap: 24px; flex-wrap: wrap; }
.ndp-topbar__item { color: #cfd5e3; }
.ndp-topbar__item:hover { color: #fff; }
.ndp-social-menu { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.ndp-social-menu a { color: #cfd5e3; }
.ndp-social-menu a:hover { color: #fff; }

/* Social profile icons (Theme Options repeater) */
.ndp-social-icons { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ndp-social-icons__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	font-size: 14px;
	border-radius: 50%;
	background: var(--soc-bg, transparent);
	color: var(--soc-color, #fff);
	transition: background .2s ease, color .2s ease, transform .2s ease;
}
.ndp-social-icons__item:hover {
	background: var(--soc-bg-h, var(--ndp-color-primary));
	color: var(--soc-color-h, #fff);
	transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/* Header + navigation                                                        */
/* -------------------------------------------------------------------------- */
.site-header {
	background: var(--ndp-color-bg);
	border-bottom: 1px solid var(--ndp-color-border);
}
.has-sticky-header .site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	transition: box-shadow .2s ease;
}
.has-sticky-header .site-header.is-stuck { box-shadow: 0 6px 24px rgba(31, 42, 68, .08); }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	min-height: 84px;
}
.site-branding { display: flex; flex-direction: column; justify-content: center; }
.custom-logo-link { display: inline-block; }
.site-title { font-size: 26px; margin: 0; }
.site-title a { color: var(--ndp-color-heading); }
.site-description { margin: 0; font-size: 13px; color: var(--ndp-color-muted); }

.main-navigation { margin-inline-start: auto; }
.primary-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.primary-menu li { position: relative; }
.primary-menu a {
	display: block;
	padding: 12px 16px;
	font-family: var(--ndp-font-heading);
	font-weight: 600;
	font-size: 15px;
	color: var(--ndp-color-heading);
}
.primary-menu > li > a:hover,
.primary-menu > .current-menu-item > a { color: var(--ndp-color-primary); }

/* Sub menus */
.primary-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #fff;
	border-radius: var(--ndp-radius);
	box-shadow: 0 12px 32px rgba(31, 42, 68, .12);
	list-style: none;
	margin: 0;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all .2s ease;
	z-index: 100;
}
.primary-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-menu .sub-menu a { padding: 10px 18px; font-weight: 500; }
.primary-menu .sub-menu a:hover { background: var(--ndp-color-bg-alt); color: var(--ndp-color-primary); }

/* Mobile menu toggle + close buttons (shown on mobile via dynamic CSS) */
.menu-toggle,
.menu-close {
	display: none;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--ndp-color-border);
	border-radius: var(--ndp-radius);
	color: var(--ndp-color-heading);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.menu-toggle:hover { border-color: var(--ndp-color-primary); color: var(--ndp-color-primary); }
.menu-close {
	position: absolute;
	top: 16px;
	right: 16px;
	border: 0;
	font-size: 22px;
}
.site-header__cta { display: flex; align-items: center; }

/* -------------------------------------------------------------------------- */
/* Page header / breadcrumbs                                                  */
/* -------------------------------------------------------------------------- */
.page-header {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--ndp-color-bg-alt);
	padding-block: 40px;
	border-bottom: 1px solid var(--ndp-color-border);
	overflow: hidden;
}
.page-header__inner { position: relative; z-index: 1; width: 100%; }
.page-header__overlay { position: absolute; inset: 0; z-index: 0; }

/* Alignment */
.page-header--align-center { text-align: center; }
.page-header--align-left { text-align: left; }
.page-header--align-right { text-align: right; }

/* With a background image, switch to light text on a dark overlay */
.page-header--image { background-size: cover; background-position: center; border-bottom: 0; }
.page-header--image .page-title { color: #fff; }
.page-header--image .page-subtitle { color: rgba(255, 255, 255, .85); }
.page-header--image .ndp-breadcrumbs,
.page-header--image .ndp-breadcrumbs .current { color: rgba(255, 255, 255, .9); }
.page-header--image .ndp-breadcrumbs a { color: #fff; }

.page-title { font-size: clamp(28px, 4vw, 42px); margin: 0 0 10px; }
.page-subtitle { color: var(--ndp-color-muted); margin: 0 0 12px; }
.ndp-breadcrumbs { font-size: 14px; color: var(--ndp-color-muted); }
.page-header__inner .ndp-breadcrumbs { margin-top: 10px; }
.page-header__inner .ndp-breadcrumbs:first-child { margin-top: 0; margin-bottom: 10px; }
.ndp-breadcrumbs a { color: var(--ndp-color-primary); }
.ndp-breadcrumbs .sep { margin-inline: 8px; opacity: .6; }
.ndp-breadcrumbs .current { color: var(--ndp-color-heading); }

/* -------------------------------------------------------------------------- */
/* Blog cards / grid                                                          */
/* -------------------------------------------------------------------------- */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
}
.ndp-layout-full-width .posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ndp-card {
	background: #fff;
	border: 1px solid var(--ndp-color-border);
	border-radius: var(--ndp-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .2s ease, box-shadow .2s ease;
}
.ndp-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(31, 42, 68, .1); }
.ndp-card .post-thumbnail { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.ndp-card .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ndp-card:hover .post-thumbnail img { transform: scale(1.05); }
.ndp-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ndp-card__cats a {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--ndp-color-accent);
}
.ndp-card__title { font-size: 20px; margin: 0; }
.ndp-card__title a { color: var(--ndp-color-heading); }
.ndp-card__title a:hover { color: var(--ndp-color-primary); }
.ndp-card__more { margin-top: auto; font-weight: 600; color: var(--ndp-color-primary); }

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 13px;
	color: var(--ndp-color-muted);
}
.entry-meta a { color: var(--ndp-color-muted); }
.entry-meta a:hover { color: var(--ndp-color-primary); }

/* Single post */
.ndp-single .post-thumbnail { display: block; margin-bottom: 30px; border-radius: var(--ndp-radius); overflow: hidden; }
.entry-content { font-size: 17px; }
.entry-content > * { margin-block: 0 1.4em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-tags a {
	display: inline-block;
	margin: 4px 6px 0 0;
	padding: 4px 12px;
	font-size: 13px;
	background: var(--ndp-color-bg-alt);
	border-radius: 50px;
	color: var(--ndp-color-text);
}

/* Search results list */
.posts-list, .posts-list .ndp-search-result { display: block; }
.ndp-search-result { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--ndp-color-border); }
.ndp-search-result__thumb img { border-radius: var(--ndp-radius); }

/* Pagination */
.pagination, .comments-pagination { margin-top: 50px; }
.pagination .nav-links, .comments-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex;
	min-width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	padding-inline: 14px;
	border: 1px solid var(--ndp-color-border);
	border-radius: var(--ndp-radius);
	color: var(--ndp-color-heading);
	font-weight: 600;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--ndp-color-primary); border-color: var(--ndp-color-primary); color: #fff; }

/* -------------------------------------------------------------------------- */
/* Sidebar + widgets                                                          */
/* -------------------------------------------------------------------------- */
.widget { margin-bottom: 36px; }
.widget-title { font-size: 18px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--ndp-color-border); position: relative; }
.widget-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 48px; height: 2px; background: var(--ndp-color-primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--ndp-color-border); }
.sidebar .widget { background: var(--ndp-color-bg-alt); padding: 24px; border-radius: var(--ndp-radius); }

/* -------------------------------------------------------------------------- */
/* Search form                                                                */
/* -------------------------------------------------------------------------- */
.ndp-search-form { display: flex; gap: 8px; }
.ndp-search-form__field {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid var(--ndp-color-border);
	border-radius: 50px;
	font-size: 15px;
}
.ndp-search-form__field:focus { outline: none; border-color: var(--ndp-color-primary); }

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
.site-footer { background: var(--ndp-color-secondary); color: #aeb6c7; }
.site-footer a { color: #d4dae6; }
.site-footer a:hover { color: #fff; }
.site-footer__widgets { padding-block: 64px; }
.footer-widget-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
.site-footer .widget-title { color: #fff; border-color: rgba(255, 255, 255, .12); }
.site-footer .widget ul li { border-color: rgba(255, 255, 255, .08); }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 24px; }
.site-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-menu { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }

/* -------------------------------------------------------------------------- */
/* 404                                                                        */
/* -------------------------------------------------------------------------- */
.error-404 { text-align: center; padding-block: 80px; }
.error-404__code { font-family: var(--ndp-font-heading); font-size: clamp(80px, 16vw, 160px); font-weight: 800; line-height: 1; color: var(--ndp-color-primary); margin: 0; }
.error-404__inner { max-width: 560px; margin-inline: auto; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.error-404__search { width: 100%; }

/* -------------------------------------------------------------------------- */
/* Comments                                                                   */
/* -------------------------------------------------------------------------- */
.comments-area { margin-top: 60px; }
.comments-title { font-size: 24px; margin-bottom: 30px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment-body { padding: 20px 0; border-bottom: 1px solid var(--ndp-color-border); }
.comment-list .children { list-style: none; margin-left: 40px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--ndp-color-border);
	border-radius: var(--ndp-radius);
	font-family: inherit;
	font-size: 15px;
}

/* -------------------------------------------------------------------------- */
/* Events (CPT)                                                               */
/* -------------------------------------------------------------------------- */
.ndp-card--event .post-thumbnail { position: relative; }
.ndp-event-date-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--ndp-color-accent);
	color: #fff;
	font-family: var(--ndp-font-heading);
	font-weight: 700;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 50px;
}
.ndp-event-meta { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ndp-color-muted); }
.ndp-event-meta i { color: var(--ndp-color-primary); width: 16px; }

/* Single event layout: content + details sidebar */
.ndp-event-single { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.ndp-event__featured { border-radius: var(--ndp-radius); overflow: hidden; margin-bottom: 28px; }
.ndp-event__map { margin-top: 30px; border-radius: var(--ndp-radius); overflow: hidden; }
.ndp-event-details {
	background: var(--ndp-color-bg-alt);
	border: 1px solid var(--ndp-color-border);
	border-radius: var(--ndp-radius);
	padding: 26px;
	position: sticky;
	top: 100px;
}
.ndp-event-details__title { font-size: 20px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 2px solid var(--ndp-color-border); }
.ndp-event-details ul { list-style: none; margin: 0 0 20px; padding: 0; }
.ndp-event-details li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--ndp-color-border); }
.ndp-event-details li:last-child { border-bottom: 0; }
.ndp-event-details .label { font-weight: 600; color: var(--ndp-color-heading); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.ndp-event-details .label i { color: var(--ndp-color-primary); margin-right: 6px; }
.ndp-event-details .value { color: var(--ndp-color-text); }
.ndp-event-register { width: 100%; }

/* -------------------------------------------------------------------------- */
/* Team (CPT single)                                                          */
/* -------------------------------------------------------------------------- */
.ndp-team-single { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.ndp-team-single__photo { border-radius: var(--ndp-radius); overflow: hidden; margin-bottom: 18px; }
.ndp-team-single__photo img { width: 100%; height: auto; display: block; }
.ndp-team-single__contact { background: var(--ndp-color-bg-alt); border: 1px solid var(--ndp-color-border); border-radius: var(--ndp-radius); padding: 20px; }
.ndp-team-single__contact p { margin: 0 0 10px; }
.ndp-team-single__contact i { color: var(--ndp-color-primary); width: 18px; }
.ndp-team-single__social { display: flex; gap: 12px; margin-top: 14px; }
.ndp-team-single__social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--ndp-color-secondary); color: #fff; transition: background .2s ease; }
.ndp-team-single__social a:hover { background: var(--ndp-color-primary); }
.ndp-team-bio__name { font-size: clamp(26px, 3vw, 36px); margin: 0 0 6px; }
.ndp-team-bio__role { color: var(--ndp-color-primary); font-weight: 600; font-size: 17px; margin: 0 0 20px; }

/* -------------------------------------------------------------------------- */
/* Testimonial (CPT single)                                                   */
/* -------------------------------------------------------------------------- */
.ndp-testimonial-single { max-width: 760px; margin-inline: auto; text-align: center; }
.ndp-testimonial-single__rating { color: #f5a623; font-size: 22px; letter-spacing: 3px; margin-bottom: 18px; }
.ndp-testimonial-single__quote { font-size: 22px; line-height: 1.6; font-style: italic; color: var(--ndp-color-heading); border: 0; margin: 0 0 24px; padding: 0; }
.ndp-testimonial-single__author { display: flex; align-items: center; justify-content: center; gap: 14px; }
.ndp-testimonial-single__avatar { border-radius: 50%; }
.ndp-testimonial-single__name { display: block; font-weight: 700; color: var(--ndp-color-heading); }
.ndp-testimonial-single__role { display: block; color: var(--ndp-color-muted); font-size: 14px; }

@media (max-width: 1024px) {
	.ndp-event-single, .ndp-team-single { grid-template-columns: minmax(0, 1fr); }
	.ndp-event-details { position: static; }
}

/* -------------------------------------------------------------------------- */
/* Back to top                                                                */
/* -------------------------------------------------------------------------- */
.ndp-back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 46px;
	height: 46px;
	border: none;
	border-radius: 50%;
	background: var(--ndp-color-primary);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all .25s ease;
	z-index: 998;
}
.ndp-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.ndp-back-to-top:hover { background: var(--ndp-color-secondary); }
