/*
Theme Name: GlobalReach Theme
Theme URI:
Author: GlobalReach Solution
Author URI:
Description: Custom theme for GlobalReach Solution - CINET project.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: globalreach-theme
Tags: custom, minimal
*/

/* =============================================================================
   SECTION 1 — CSS CUSTOM PROPERTIES
============================================================================= */

:root {
	/* Brand colours */
	--clr-primary:       #c5a028;   /* brand gold */
	--clr-primary-dark:  #a8861f;
	--clr-accent:        #c5a028;
	--clr-accent-hover:  #a8861f;

	/* Text */
	--clr-text:          #2d2d2d;
	--clr-text-muted:    #6b7280;

	/* Backgrounds */
	--clr-bg:            #ffffff;
	--clr-bg-light:      #f4f6f9;
	--clr-border:        #e5e7eb;

	/* Header */
	--header-bg:         #ffffff;
	--header-height:     88px;
	--header-shadow:     0 2px 12px rgba(0, 0, 0, 0.08);

	/* Footer */
	--footer-top-bg:     #162536;
	--footer-mid-bg:     #0f1f2e;
	--footer-bottom-bg:  #0a1520;
	--footer-text:       #9bafc4;
	--footer-heading:    #ffffff;
	--footer-link:       #9bafc4;
	--footer-link-hover: #ffffff;
	--footer-border:     rgba(255, 255, 255, 0.08);

	/* Spacing scale */
	--sp-1: 0.25rem;
	--sp-2: 0.5rem;
	--sp-3: 0.75rem;
	--sp-4: 1rem;
	--sp-5: 1.25rem;
	--sp-6: 1.5rem;
	--sp-8: 2rem;
	--sp-10: 2.5rem;
	--sp-12: 3rem;
	--sp-16: 4rem;

	/* Typography */
	--font-base: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--fz-sm:   0.875rem;
	--fz-base: 1rem;
	--fz-md:   1.0625rem;
	--fz-lg:   1.125rem;

	/* Borders */
	--radius-sm:   4px;
	--radius-md:   8px;
	--radius-full: 999px;

	/* Transitions */
	--t-fast:   150ms ease;
	--t-normal: 220ms ease;

	/* Z-index */
	--z-header: 1000;
}

/* =============================================================================
   SECTION 2 — RESET & BASE
============================================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter', var(--font-base);
	font-size: var(--fz-base);
	line-height: 1.65;
	color: var(--clr-text);
	background-color: var(--clr-bg);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Roboto Condensed', var(--font-base);
	font-weight: 700;
	line-height: 1.15;
}

/* Prevent horizontal scroll when mobile nav is open */
body.menu-open {
	overflow: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

ul,
ol {
	list-style: none;
}

address {
	font-style: normal;
}

/* =============================================================================
   SECTION 3 — LAYOUT
============================================================================= */

.container {
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: var(--sp-6);
}

.site-main {
	min-height: 60vh;
}

/* =============================================================================
   SECTION 4 — HEADER
============================================================================= */

/* --- 4.1  Header wrapper -------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: var(--z-header);
	background-color: var(--header-bg);
	border-bottom: 1px solid var(--clr-border);
	transition: box-shadow var(--t-normal);
}

/* Shadow appears once user scrolls (class toggled by JS) */
.site-header.is-scrolled {
	box-shadow: var(--header-shadow);
	border-bottom-color: transparent;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-6);
	height: var(--header-height);
}

/* --- 4.2  Logo ------------------------------------------------------------ */

.header-logo {
	flex-shrink: 0;
}

.site-wordmark {
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-decoration: none;
	line-height: 1;
}

.site-wordmark:hover {
	text-decoration: none;
}

.site-wordmark__main {
	font-family: 'Roboto Condensed', var(--font-base);
	font-size: 1.5rem;
	font-weight: 900;
	color: #0d1f3c;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	display: block;
}

.site-wordmark__accent {
	font-family: 'Roboto Condensed', var(--font-base);
	font-size: 0.875rem;
	font-weight: 700;
	color: #c5a028;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	display: block;
}

/* Footer / dark-background variant */
.site-wordmark--light .site-wordmark__main {
	color: #ffffff;
}

/* --- 4.3  Primary navigation ---------------------------------------------- */

.header-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.header-nav .nav-menu {
	display: flex;
	align-items: center;
	gap: var(--sp-1);
}

.header-nav .nav-menu > li {
	position: relative;
}

.header-nav .nav-menu > li > a {
	display: block;
	padding: var(--sp-2) var(--sp-4);
	font-size: var(--fz-sm);
	font-weight: 500;
	color: var(--clr-text);
	border-radius: var(--radius-sm);
	transition: color var(--t-fast), background-color var(--t-fast);
	white-space: nowrap;
}

.header-nav .nav-menu > li > a:hover,
.header-nav .nav-menu > li.current-menu-item > a,
.header-nav .nav-menu > li.current-menu-ancestor > a {
	color: var(--clr-primary);
	background-color: var(--clr-bg-light);
	text-decoration: none;
}

/* --- 4.4  Dropdown sub-menus ---------------------------------------------- */

/* Down-arrow indicator on parent items */
.header-nav .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	margin-left: var(--sp-1);
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
	vertical-align: middle;
	opacity: 0.6;
	transition: transform var(--t-fast);
}

.header-nav .menu-item-has-children:hover > a::after,
.header-nav .menu-item-has-children:focus-within > a::after {
	transform: rotate(180deg);
}

.header-nav .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + var(--sp-2));
	left: 0;
	min-width: 200px;
	background-color: var(--clr-bg);
	border: 1px solid var(--clr-border);
	border-radius: var(--radius-md);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
	padding: var(--sp-2) 0;
	z-index: 10;
}

/* Show on hover and keyboard focus */
.header-nav .menu-item-has-children:hover > .sub-menu,
.header-nav .menu-item-has-children:focus-within > .sub-menu {
	display: block;
}

.header-nav .sub-menu li a {
	display: block;
	padding: var(--sp-2) var(--sp-5);
	font-size: var(--fz-sm);
	color: var(--clr-text);
	white-space: nowrap;
	transition: background-color var(--t-fast), color var(--t-fast);
}

.header-nav .sub-menu li a:hover {
	background-color: var(--clr-bg-light);
	color: var(--clr-primary);
	text-decoration: none;
}

/* --- 4.5  CTA Call button ------------------------------------------------- */

.header-cta {
	flex-shrink: 0;
}

.btn-call {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	padding: var(--sp-2) var(--sp-5);
	background-color: var(--clr-accent);
	color: #ffffff;
	font-size: var(--fz-sm);
	font-weight: 600;
	border-radius: var(--radius-full);
	white-space: nowrap;
	transition: background-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
	text-decoration: none;
	letter-spacing: 0.01em;
}

.btn-call:hover {
	background-color: var(--clr-accent-hover);
	box-shadow: 0 4px 14px rgba(197, 160, 40, 0.35);
	transform: translateY(-1px);
	text-decoration: none;
}

.btn-call:active {
	background-color: var(--clr-accent-hover);
	transform: translateY(0);
	box-shadow: none;
}

.btn-call__icon {
	flex-shrink: 0;
}

/* --- 4.6  Hamburger button (hidden on desktop) ---------------------------- */

.hamburger {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 26px;
	height: 18px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	z-index: calc(var(--z-header) + 1);
}

.hamburger__line {
	display: block;
	width: 100%;
	height: 2px;
	background-color: var(--clr-primary);
	border-radius: 2px;
	transform-origin: center;
	transition: transform var(--t-normal), opacity var(--t-normal), background-color var(--t-normal);
}

/* Animate to × when active */
.hamburger.is-active .hamburger__line:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

.hamburger.is-active .hamburger__line:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* =============================================================================
   SECTION 5 — FOOTER
============================================================================= */

/* --- 5.1  Footer top (brand + tagline) ------------------------------------ */

.footer-top {
	background-color: var(--footer-top-bg);
	padding: var(--sp-10) 0;
	border-bottom: 1px solid var(--footer-border);
}

.footer-top__inner {
	display: flex;
	align-items: center;
	gap: var(--sp-6);
}

.footer-brand {
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
}


.footer-tagline {
	font-size: var(--fz-sm);
	color: var(--footer-text);
	max-width: 280px;
	line-height: 1.5;
}

/* --- 5.2  Footer middle (navigation columns) ------------------------------ */

.footer-middle {
	background-color: var(--footer-mid-bg);
	padding: var(--sp-8) 0;
}

.footer-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--sp-6);
	align-items: start;
}

.footer-col__title {
	font-size: var(--fz-sm);
	font-weight: 700;
	color: var(--footer-heading);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: var(--sp-3);
}

/* --- 5.3  Footer navigation lists ---------------------------------------- */

.footer-nav-list {
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
}

.footer-nav-list li a,
.footer-nav-list a {
	font-size: var(--fz-sm);
	color: var(--footer-link);
	transition: color var(--t-fast), padding-left var(--t-fast);
	display: inline-block;
}

.footer-nav-list li a:hover,
.footer-nav-list a:hover {
	color: var(--footer-link-hover);
	padding-left: var(--sp-1);
	text-decoration: none;
}

/* --- 5.4  Contact column -------------------------------------------------- */

.footer-contact {
	display: flex;
	flex-direction: column;
	gap: var(--sp-2);
}

.footer-contact__item {
	display: flex;
	align-items: flex-start;
	gap: var(--sp-2);
	font-size: var(--fz-sm);
	color: var(--footer-text);
	line-height: 1.5;
}

.footer-contact__item svg {
	flex-shrink: 0;
	margin-top: 2px;
	opacity: 0.7;
}

.footer-contact__item a {
	color: var(--footer-link);
	transition: color var(--t-fast);
}

.footer-contact__item a:hover {
	color: var(--footer-link-hover);
	text-decoration: none;
}

.footer-contact__address {
	align-items: flex-start;
}

/* --- 5.5  Social icons ---------------------------------------------------- */

.footer-social {
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
}

.footer-social__link {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-3);
	color: var(--footer-link);
	font-size: var(--fz-sm);
	transition: color var(--t-fast);
}

.footer-social__link svg {
	flex-shrink: 0;
	transition: transform var(--t-fast);
}

.footer-social__link:hover {
	color: var(--footer-link-hover);
	text-decoration: none;
}

.footer-social__link:hover svg {
	transform: scale(1.15);
}

/* --- 5.6  Footer bottom bar ----------------------------------------------- */

.footer-bottom {
	background-color: var(--footer-bottom-bg);
	padding: var(--sp-5) 0;
	border-top: 1px solid var(--footer-border);
}

.footer-bottom__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	flex-wrap: wrap;
}

.footer-copyright {
	font-size: var(--fz-sm);
	color: var(--footer-text);
}

.footer-copyright a {
	color: var(--footer-text);
	transition: color var(--t-fast);
}

.footer-copyright a:hover {
	color: var(--footer-link-hover);
	text-decoration: none;
}

.footer-bottom-links {
	display: flex;
	align-items: center;
	gap: var(--sp-5);
}

.footer-bottom-links a {
	font-size: var(--fz-sm);
	color: var(--footer-text);
	transition: color var(--t-fast);
}

.footer-bottom-links a:hover {
	color: var(--footer-link-hover);
	text-decoration: none;
}

/* =============================================================================
   SECTION 6 — RESPONSIVE
============================================================================= */

/* --- 6.1  Tablet (≤ 1024px) ----------------------------------------------- */

@media (max-width: 1024px) {

	.footer-columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* --- 6.2  Mobile (≤ 768px) ------------------------------------------------ */

@media (max-width: 768px) {

	/* Show hamburger, hide desktop nav and header CTA */
	.hamburger {
		display: flex;
	}

	.header-cta {
		display: none;
	}

	/* Mobile nav: full-width overlay from top */
	.header-nav {
		display: none;
		position: fixed;
		inset: var(--header-height) 0 0 0;
		background-color: var(--header-bg);
		overflow-y: auto;
		padding: var(--sp-6) var(--sp-6) var(--sp-10);
		flex-direction: column;
		justify-content: flex-start;
		align-items: stretch;
		border-top: 1px solid var(--clr-border);
		box-shadow: var(--header-shadow);
	}

	.header-nav.is-open {
		display: flex;
	}

	.header-nav .nav-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.header-nav .nav-menu > li > a {
		font-size: var(--fz-md);
		padding: var(--sp-3) var(--sp-2);
		border-bottom: 1px solid var(--clr-border);
		border-radius: 0;
	}

	/* Inline dropdowns on mobile */
	.header-nav .sub-menu {
		display: block;
		position: static;
		box-shadow: none;
		border: none;
		border-radius: 0;
		padding: 0;
		background-color: var(--clr-bg-light);
	}

	.header-nav .sub-menu li a {
		padding-left: var(--sp-8);
		border-bottom: 1px solid var(--clr-border);
	}

	/* Hide dropdown arrows on mobile */
	.header-nav .menu-item-has-children > a::after {
		display: none;
	}

	/* Footer columns: 2 columns */
	.footer-columns {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Footer bottom: stack vertically */
	.footer-bottom__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--sp-3);
	}
}

/* --- 6.3  Small mobile (≤ 480px) ----------------------------------------- */

@media (max-width: 480px) {

	.footer-columns {
		grid-template-columns: 1fr;
	}

	.footer-col:nth-child(n) {
		grid-column: 1;
	}

	.footer-top__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-bottom-links {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--sp-2);
	}
}
