/*
Theme Name: GreenBio
Theme URI: https://example.com/greenbio
Author: GreenBio Team
Author URI: https://example.com
Description: GreenBio is a modern, fast, content-first WordPress theme built specifically for biography websites. It ships with a Biography Quick Facts box with automatic Person schema, an automatic Table of Contents for long articles, AdSense-friendly widget areas, full accessibility support, and clean semantic SEO-ready markup that works out of the box with Yoast SEO and Classic Editor.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: greenbio
Tags: blog, news, one-column, two-columns, right-sidebar, custom-colors, custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, threaded-comments, translation-ready, accessibility-ready, theme-options

GreenBio is distributed under the terms of the GNU GPL v2 or later.
*/

/* ==========================================================================
   Table of Contents
   1.0 Reset / Normalize helpers
   2.0 CSS Variables (Customizer hooked)
   3.0 Base / Typography
   4.0 Accessibility helpers
   5.0 Layout / Grid
   6.0 Header & Navigation
   7.0 Hero
   8.0 Cards / Post loops
   9.0 Single Biography (quick facts, TOC, author box)
   10.0 Widgets / Sidebar / Ad areas
   11.0 Footer
   12.0 Forms
   13.0 Utilities
   14.0 Responsive
   ========================================================================== */

/* 1.0 Reset */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--gb-bg, #ffffff);
	color: var(--gb-text, #1b1f1a);
	font-family: var(--gb-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
	line-height: 1.7;
	font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; }
a { color: var(--gb-primary, #0f7a44); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
table { border-collapse: collapse; width: 100%; }

/* 2.0 CSS Variables */
:root {
	--gb-primary: #0f7a44;
	--gb-primary-dark: #0a5c33;
	--gb-secondary: #1b1f1a;
	--gb-bg: #ffffff;
	--gb-bg-alt: #f4f7f5;
	--gb-text: #1b1f1a;
	--gb-text-light: #5b6660;
	--gb-border: #e2e8e4;
	--gb-white: #ffffff;
	--gb-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--gb-font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--gb-container: 1180px;
	--gb-radius: 10px;
}

/* 3.0 Typography */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--gb-font-heading);
	font-weight: 700;
	line-height: 1.25;
	color: var(--gb-secondary);
	margin: 1.4em 0 0.6em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.2em; }
.entry-content p, .entry-content ul, .entry-content ol { max-width: 72ch; }

/* 4.0 Accessibility */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--gb-primary);
	color: #fff;
	padding: 12px 20px;
	z-index: 100000;
	border-radius: 0 0 6px 0;
}
.skip-link:focus {
	left: 0;
}
:focus-visible {
	outline: 3px solid var(--gb-primary-dark);
	outline-offset: 2px;
}
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* 5.0 Layout */
.gb-container {
	width: 100%;
	max-width: var(--gb-container);
	margin: 0 auto;
	padding: 0 20px;
}
.gb-content-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 40px;
	padding: 40px 0 60px;
	align-items: start;
}
.gb-content-wrap.no-sidebar { grid-template-columns: minmax(0, 1fr); }
main#main { min-width: 0; }

/* 6.0 Header & Nav */
.gb-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: var(--gb-white);
	border-bottom: 1px solid var(--gb-border);
}
.gb-header-ad {
	background: var(--gb-bg-alt);
	text-align: center;
	padding: 8px 0;
}
.gb-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 20px;
	max-width: var(--gb-container);
	margin: 0 auto;
}
.gb-logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 800; color: var(--gb-secondary); }
.gb-logo img { max-height: 44px; width: auto; }
.gb-logo:hover, .gb-logo:focus { text-decoration: none; }
.gb-header-right { display: flex; align-items: center; gap: 16px; }
.gb-primary-nav { display: flex; align-items: center; gap: 6px; }
.gb-menu-toggle {
	display: none;
	background: var(--gb-primary);
	border: 0;
	color: #fff;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 1.1rem;
	cursor: pointer;
}
.gb-nav-menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.gb-nav-menu li { position: relative; }
.gb-nav-menu a {
	display: block;
	padding: 10px 14px;
	color: var(--gb-secondary);
	font-weight: 600;
	border-radius: 6px;
}
.gb-nav-menu a:hover, .gb-nav-menu a:focus, .gb-nav-menu .current-menu-item > a {
	background: var(--gb-bg-alt);
	color: var(--gb-primary-dark);
	text-decoration: none;
}
.gb-nav-menu ul.sub-menu {
	list-style: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	border: 1px solid var(--gb-border);
	border-radius: 8px;
	min-width: 220px;
	padding: 6px;
	box-shadow: 0 12px 30px rgba(0,0,0,.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease;
}
.gb-nav-menu li:hover > ul.sub-menu,
.gb-nav-menu li:focus-within > ul.sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.gb-nav-menu ul.sub-menu a { padding: 8px 12px; }

/* Language switcher */
.gb-lang-switcher { display: flex; align-items: center; flex-shrink: 0; }
.gb-lang-select {
	appearance: none;
	-webkit-appearance: none;
	background: var(--gb-bg-alt) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='14' height='14'%3E%3Cpath fill='%235b6660' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
	border: 1px solid var(--gb-border);
	border-radius: 6px;
	padding: 8px 30px 8px 12px;
	font-size: .88rem;
	font-weight: 600;
	color: var(--gb-secondary);
	cursor: pointer;
	max-width: 150px;
}
.gb-lang-select:hover { border-color: var(--gb-primary); }
.gb-lang-list { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; font-size: .88rem; }
.gb-lang-list li a { font-weight: 600; color: var(--gb-secondary); }
.gb-lang-list li.gb-lang-active a,
.gb-lang-list li a.pll-the-language-link[aria-current="true"] { color: var(--gb-primary-dark); text-decoration: underline; }

/* Hide the visible Google Translate toolbar/banner so the built-in switcher
   never disrupts the theme's layout; translation is still fully applied via
   the hidden widget + cookie, only the default Google chrome is suppressed. */
.gb-google-translate-element { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* 7.0 Hero */
.gb-hero {
	background: linear-gradient(135deg, var(--gb-primary) 0%, var(--gb-primary-dark) 100%);
	color: #fff;
	padding: 70px 0;
	text-align: center;
}
.gb-hero h1 { color: #fff; }
.gb-hero .gb-tagline { font-size: 1.15rem; opacity: .92; max-width: 640px; margin: 0 auto 28px; }
.gb-hero-search { max-width: 560px; margin: 0 auto; }
.gb-hero-search form { display: flex; }
.gb-hero-search input[type="search"] {
	flex: 1;
	padding: 14px 18px;
	border: 0;
	border-radius: 8px 0 0 8px;
	font-size: 1rem;
}
.gb-hero-search button {
	border: 0;
	background: var(--gb-secondary);
	color: #fff;
	padding: 0 22px;
	border-radius: 0 8px 8px 0;
	cursor: pointer;
	font-weight: 700;
}
.gb-hero-search button:hover { background: #000; }

/* 8.0 Cards */
.gb-section { padding: 50px 0; }
.gb-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.gb-section-head h2 { margin: 0; }
.gb-section-head a { font-weight: 600; }
.gb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gb-card {
	background: #fff;
	border: 1px solid var(--gb-border);
	border-radius: var(--gb-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s ease, transform .2s ease;
}
.gb-card:hover { box-shadow: 0 14px 30px rgba(0,0,0,.08); transform: translateY(-2px); }
.gb-card-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--gb-bg-alt); }
.gb-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gb-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.gb-card-body h3 { margin: 0 0 8px; font-size: 1.15rem; }
.gb-card-body h3 a { color: var(--gb-secondary); }
.gb-card-excerpt { color: var(--gb-text-light); font-size: .96rem; flex: 1; }
.gb-card-meta { font-size: .82rem; color: var(--gb-text-light); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.gb-readmore {
	display: inline-block;
	margin-top: 14px;
	font-weight: 700;
	color: var(--gb-primary-dark);
}
.gb-readmore::after { content: " \2192"; }

.gb-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gb-cat-card {
	background: var(--gb-bg-alt);
	border-radius: var(--gb-radius);
	padding: 22px;
	text-align: center;
	font-weight: 700;
	color: var(--gb-secondary);
	border: 1px solid var(--gb-border);
}
.gb-cat-card:hover { background: #fff; border-color: var(--gb-primary); color: var(--gb-primary-dark); text-decoration: none; }
.gb-cat-card .count { display: block; font-weight: 400; font-size: .85rem; color: var(--gb-text-light); margin-top: 4px; }

.gb-newsletter { background: var(--gb-secondary); color: #fff; padding: 50px 0; text-align: center; }
.gb-newsletter h2 { color: #fff; }
.gb-newsletter form { display: flex; max-width: 480px; margin: 20px auto 0; }
.gb-newsletter input[type="email"] { flex: 1; padding: 14px; border: 0; border-radius: 8px 0 0 8px; }
.gb-newsletter button { border: 0; background: var(--gb-primary); color: #fff; padding: 0 22px; border-radius: 0 8px 8px 0; font-weight: 700; cursor: pointer; }
.gb-newsletter button:hover { background: var(--gb-primary-dark); }
.gb-newsletter-note { font-size: .82rem; opacity: .7; margin-top: 10px; }

/* 9.0 Single Biography */
.gb-single-header { margin-bottom: 24px; }
.gb-single-thumb { border-radius: var(--gb-radius); overflow: hidden; margin-bottom: 26px; }
.gb-single-thumb img { width: 100%; }
.entry-title { margin-top: 0; }
.gb-entry-meta { color: var(--gb-text-light); font-size: .9rem; margin-bottom: 10px; }
.gb-entry-meta a { color: inherit; }

.gb-quick-facts {
	background: var(--gb-bg-alt);
	border: 1px solid var(--gb-border);
	border-left: 4px solid var(--gb-primary);
	border-radius: var(--gb-radius);
	padding: 22px 24px;
	margin: 0 0 30px;
}
.gb-quick-facts h2 {
	margin-top: 0;
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--gb-primary-dark);
}
.gb-quick-facts dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; margin: 0; }
.gb-quick-facts dt { font-weight: 700; color: var(--gb-text-light); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.gb-quick-facts dd { margin: 2px 0 0; font-size: 1.02rem; }

.gb-toc {
	background: #fff;
	border: 1px solid var(--gb-border);
	border-radius: var(--gb-radius);
	margin: 0 0 30px;
	overflow: hidden;
}
.gb-toc-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: 0;
	cursor: pointer;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--gb-secondary);
	font-family: inherit;
	padding: 18px 22px;
	text-align: left;
}
.gb-toc-toggle:hover { color: var(--gb-primary-dark); }
.gb-toc-icon {
	flex-shrink: 0;
	margin-left: 14px;
	display: inline-flex;
	transition: transform .25s ease;
	color: var(--gb-primary);
}
.gb-toc.is-open .gb-toc-icon { transform: rotate(180deg); }
.gb-toc-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height .25s ease;
}
.gb-toc-panel > nav { padding: 0 22px 20px; }
.gb-toc ol { margin: 0; padding-left: 1.2em; }
.gb-toc a { font-weight: 500; }
.gb-toc ol ol { margin-top: 6px; font-size: .95rem; }

.gb-ad-slot {
	margin: 30px 0;
	text-align: center;
	min-height: 0;
}
.gb-ad-slot span {
	display: inline-block;
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--gb-text-light);
	margin-bottom: 6px;
}

.gb-related { margin-top: 50px; }

.gb-author-box {
	display: flex;
	gap: 18px;
	background: var(--gb-bg-alt);
	border-radius: var(--gb-radius);
	padding: 24px;
	margin: 40px 0;
	align-items: flex-start;
}
.gb-author-box img { border-radius: 50%; flex-shrink: 0; }
.gb-author-box h3 { margin: 0 0 6px; }
.gb-author-social { margin-top: 10px; display: flex; gap: 10px; }
.gb-author-social a {
	width: 32px; height: 32px; border-radius: 50%; background: var(--gb-primary);
	color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem;
}
.gb-author-social a:hover { background: var(--gb-primary-dark); text-decoration: none; }

.gb-breadcrumbs { font-size: .85rem; color: var(--gb-text-light); margin-bottom: 18px; }
.gb-breadcrumbs a { color: var(--gb-text-light); }
.gb-breadcrumbs [aria-current="page"] { color: var(--gb-text); font-weight: 600; }

/* 10.0 Widgets */
.widget { background: #fff; border: 1px solid var(--gb-border); border-radius: var(--gb-radius); padding: 22px; margin-bottom: 24px; }
.widget-title { margin-top: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .03em; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--gb-border); }
.widget ul li:last-child { border-bottom: 0; }
.widget_search .search-form { display: flex; }
.gb-ad-widget { text-align: center; background: var(--gb-bg-alt); }

/* 11.0 Footer */
.gb-footer { background: var(--gb-secondary); color: #d6ddd9; margin-top: 40px; }
.gb-footer-widgets {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	padding: 50px 0 30px;
}
.gb-footer-widgets .widget { background: transparent; border: 0; padding: 0; }
.gb-footer-widgets .widget-title { color: #fff; }
.gb-footer-widgets a { color: #d6ddd9; }
.gb-footer-widgets a:hover { color: #fff; }
.gb-social-icons { display: flex; gap: 10px; }
.gb-social-icons a {
	width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1);
	display: flex; align-items: center; justify-content: center;
}
.gb-social-icons a:hover { background: var(--gb-primary); text-decoration: none; }
.gb-footer-bottom {
	border-top: 1px solid rgba(255,255,255,.12);
	padding: 18px 0;
	text-align: center;
	font-size: .85rem;
}

/* 12.0 Forms */
.search-form { display: flex; gap: 0; }
.search-form label { flex: 1; margin: 0; }
.search-form .search-field {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--gb-border);
	border-radius: 6px 0 0 6px;
	font-size: .95rem;
}
.search-form .search-submit {
	border: 1px solid var(--gb-primary);
	background: var(--gb-primary);
	color: #fff;
	padding: 0 16px;
	border-radius: 0 6px 6px 0;
	cursor: pointer;
}
.search-form .search-submit:hover { background: var(--gb-primary-dark); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--gb-border);
	border-radius: 6px;
	font-family: inherit;
	margin-bottom: 14px;
}
.comment-form .form-submit input {
	background: var(--gb-primary);
	color: #fff;
	border: 0;
	padding: 12px 22px;
	border-radius: 6px;
	font-weight: 700;
	cursor: pointer;
}
.comment-form .form-submit input:hover { background: var(--gb-primary-dark); }

/* 13.0 Utilities */
.gb-btn {
	display: inline-block;
	background: var(--gb-primary);
	color: #fff;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 700;
}
.gb-btn:hover { background: var(--gb-primary-dark); color: #fff; text-decoration: none; }
.gb-view-toggle { display: flex; gap: 8px; }
.gb-view-toggle button { border: 1px solid var(--gb-border); background: #fff; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.gb-view-toggle button[aria-pressed="true"] { background: var(--gb-primary); color: #fff; border-color: var(--gb-primary); }
.gb-list .gb-grid { grid-template-columns: 1fr; }
.gb-list .gb-card { flex-direction: row; }
.gb-list .gb-card-thumb { width: 220px; aspect-ratio: auto; flex-shrink: 0; }
.gb-pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0 0; flex-wrap: wrap; }
.gb-pagination a, .gb-pagination span.current {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--gb-border);
	color: var(--gb-secondary);
}
.gb-pagination span.current { background: var(--gb-primary); color: #fff; border-color: var(--gb-primary); }
.gb-pagination a:hover { border-color: var(--gb-primary); text-decoration: none; }
.gb-lazy { background: var(--gb-bg-alt); }

/* 14.0 Responsive */
@media (max-width: 960px) {
	.gb-grid { grid-template-columns: repeat(2, 1fr); }
	.gb-cat-grid { grid-template-columns: repeat(2, 1fr); }
	.gb-content-wrap { grid-template-columns: 1fr; }
	.gb-footer-widgets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
	.gb-menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
	.gb-primary-nav .gb-nav-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		flex-direction: column;
		border-bottom: 1px solid var(--gb-border);
		padding: 8px;
	}
	.gb-primary-nav.is-open .gb-nav-menu { display: flex; }
	.gb-nav-menu ul.sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 12px; display: none; }
	.gb-nav-menu li.gb-submenu-open > ul.sub-menu { display: block; }
	.gb-quick-facts dl { grid-template-columns: 1fr; }
	.gb-author-box { flex-direction: column; }
	.gb-list .gb-card { flex-direction: column; }
	.gb-list .gb-card-thumb { width: 100%; }
	.gb-header-right { gap: 10px; }
	.gb-lang-select { max-width: 92px; padding: 8px 24px 8px 10px; font-size: .8rem; background-position: right 6px center; }
	.gb-lang-list { gap: 6px; font-size: .8rem; }
}
@media (max-width: 560px) {
	.gb-grid { grid-template-columns: 1fr; }
	.gb-cat-grid { grid-template-columns: 1fr; }
	.gb-footer-widgets { grid-template-columns: 1fr; }
	.gb-hero { padding: 46px 0; }
	.gb-hero-search form, .gb-newsletter form { flex-direction: column; }
	.gb-hero-search input, .gb-newsletter input { border-radius: 8px; margin-bottom: 10px; }
	.gb-hero-search button, .gb-newsletter button { border-radius: 8px; padding: 12px; }
}
