/*
 * custom.css — Project-specific styles and Bootstrap overrides.
 *
 * This file is loaded after bootstrap.min.css and style.css so any rule
 * here will take precedence. Add component-level customisations here
 * rather than editing Bootstrap or style.css directly.
 */

/* =============================================================================
   Bootstrap Variable Overrides
   These custom properties mirror Bootstrap's own tokens and override them.
   ============================================================================= */

:root {
	--bs-primary:            #0d6efd;
	--bs-primary-rgb:        13, 110, 253;
	--bs-body-font-family:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	--bs-body-font-size:     1rem;
	--bs-body-line-height:   1.65;
	--bs-border-radius:      0.375rem;
	--bs-border-radius-lg:   0.5rem;
}

/* =============================================================================
   Header Offset
   #masthead is position:fixed (see header.css) so #content needs top padding
   equal to the header's rendered height to avoid content hiding underneath it.
   72px header (--greenova-header-height) + 1px bottom border = 73px.
   ============================================================================= */

.site-content {
	padding-top: 73px;
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* =============================================================================
   CTA Buttons — shared markup rendered by greenova_render_cta_buttons()
   (inc/custom-functions.php), used by any section on any page/template.
   Each button's own colours/padding/font/border are set inline (admin-
   configured per button, per the CTA Button custom field); this file only
   handles layout, hover behaviour, and the icon. Global (not scoped to one
   page's CSS file) since multiple sections across different templates
   reuse the same component.
   ============================================================================= */

.cta-button {
	display:         inline-flex;
	align-items:     center;
	gap:             8px;
	text-decoration: none;
	white-space:     nowrap;
	transition:      background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.cta-button:hover,
.cta-button:focus {
	background-color: var(--cta-hover-bg, inherit);
	color:            var(--cta-hover-color, inherit);
	text-decoration:  none;
}

.cta-button--full-width {
	width:           100%;
	justify-content: center;
}

/* Each button carries its own alignment rather than the wrapper reading
   its children's classes (avoids relying on :has(), which isn't supported
   in every browser this theme might need to run in). */
.cta-button--align-center {
	margin-inline: auto;
}

.cta-button--align-right {
	margin-left: auto;
}

.cta-button__icon {
	width:   1em;
	height:  1em;
	display: inline-block;
}

@media ( max-width: 575.98px ) {
	.cta-button {
		justify-content: center;
	}

	.cta-button--align-center,
	.cta-button--align-right {
		margin: 0; /* Stacked buttons at this width — auto-margins would fight a column layout. */
	}
}

/* =============================================================================
   Cards
   ============================================================================= */

.card {
	border-radius: var(--bs-border-radius-lg);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
	transform: translateY(-2px);
}

/* =============================================================================
   Navigation
   ============================================================================= */

/* Ensure active nav items are visible on dark backgrounds */
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:focus {
	color: #fff;
}

/* =============================================================================
   WordPress Core Element Styles
   WordPress adds its own classes; these keep them looking clean with Bootstrap.
   ============================================================================= */

/* Alignments */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }
.alignwide  { margin-left: -2rem; margin-right: -2rem; }
.alignfull  { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

/* Gallery */
.gallery { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gallery-item { flex: 1 1 calc(33.333% - 0.5rem); }
.gallery-item img { width: 100%; height: auto; border-radius: var(--bs-border-radius); }

/* Captions */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--bs-secondary-color, #6c757d); text-align: center; margin-top: 0.25rem; }

/* Search form */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field  { flex: 1; }
.search-form .search-submit { white-space: nowrap; }

/* Post navigation */
.post-navigation .nav-links { display: flex; justify-content: space-between; }
.post-navigation .nav-subtitle { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bs-secondary-color, #6c757d); }

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-body  { border: 1px solid var(--bs-border-color, #dee2e6); border-radius: var(--bs-border-radius-lg); padding: 1.25rem; margin-bottom: 1rem; }
.comment-author .fn { font-weight: 600; }
.comment-metadata { font-size: 0.8125rem; color: var(--bs-secondary-color, #6c757d); }

/* =============================================================================
   Utility Helpers
   ============================================================================= */

.section-title {
	position: relative;
	display: inline-block;
	padding-bottom: 0.5rem;
	margin-bottom: 1.5rem;
}

.section-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 3rem;
	height: 3px;
	background-color: var(--bs-primary);
	border-radius: 2px;
}

/* =============================================================================
   Site Footer
   ============================================================================= */

.site-footer {
	background-color: #ffffff;
	border-top: 1px solid rgba(27, 37, 14, 0.08);
}

/* --- Column 1: Logo + Footer Nav --- */

.footer-logo-img {
	width: 140px;
	max-width: 100%;
	object-fit: contain;
}

.footer-site-name {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1B250E;
}

.footer-nav-list li {
	margin-bottom: 0.6rem;
}

.footer-nav-list a {
	color: #55606a;
	text-decoration: none;
}

.footer-nav-list a:hover {
	color: var(--bs-primary);
}

/* --- Column 2: Features Menu --- */

.footer-column-heading {
	font-size: 1rem;
	font-weight: 600;
	color: #1B250E;
	margin-bottom: 1rem;
}

.footer-features-menu {
	column-count: 2;
	column-gap: 2rem;
}

.footer-features-menu li {
	margin-bottom: 0.6rem;
	break-inside: avoid;
}

.footer-features-menu a {
	color: #55606a;
	text-decoration: none;
	font-size: 0.9375rem;
}

.footer-features-menu a:hover {
	color: var(--bs-primary);
}

/* --- Column 3: Certification --- */

.footer-cert-logo {
	width: 56px;
	height: auto;
}

.footer-cert-heading {
	font-size: 1rem;
	font-weight: 700;
	color: #1B250E;
}

.footer-cert-description {
	font-size: 0.875rem;
	color: #55606a;
	line-height: 1.6;
}

/* --- Divider --- */

.footer-divider {
	border: none;
	border-top: 1px solid var(--bs-primary);
	opacity: 1;
	margin: 0;
}

/* --- Bottom Row: Social + Legal + Copyright --- */

.footer-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #55606a;
	background-color: #f6f7f7;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.footer-social-btn:hover {
	background-color: var(--bs-primary);
	color: #ffffff;
	text-decoration: none;
}

.footer-logo-link,
.footer-logo-link:hover {
	text-decoration: none;
}

.footer-legal-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem;
}

.footer-legal-list a {
	color: #55606a;
	font-size: 0.875rem;
	text-decoration: underline;
}

.footer-legal-list a:hover {
	color: var(--bs-primary);
}

.footer-legal-list .list-inline-item:not(:last-child) {
	margin-right: 0.75rem;
}

.footer-copyright {
	font-size: 0.8125rem;
	color: #8a939b;
}

@media ( max-width: 767.98px ) {
	.footer-legal-list {
		justify-content: flex-start;
	}

	/* Centre the footer logo once its column stacks full-width — the nav
	   list below it stays left-aligned, only the logo itself centers. */
	.footer-logo-link {
		display:       block;
		width:         fit-content;
		margin-top:    8px;
		margin-bottom: 24px;
		margin-left:   auto;
		margin-right:  auto;
	}

	/* Same treatment for the Certified B Corp badge — heading/description
	   text below it stay left-aligned, only the logo image centers. */
	.footer-cert-logo {
		display:       block;
		margin-top:    24px;
		margin-bottom: 16px;
		/* margin-left:   auto; */
		margin-right:  auto;
	}
}
