/**
 * Header and Footer Styles
 * Loaded on all pages to ensure consistent header and footer styling
 *
 * @package Together_Theme
 */

/* ============================================
   Color Variables - Brand Guide
   ============================================ */
:root {
	--together-white: #ffffff;
	--together-blue: #447AB3; /* Brand Blue */
	--together-green: #97C354; /* Brand Green */
}

/* ============================================
   Header Styles
   ============================================ */
.together-header {
	background: #fff; /* White background */
	padding: 20px 0;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
}

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

.site-branding .site-logo,
.site-branding .custom-logo-link {
	display: block;
	text-decoration: none;
}

.site-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1a1a1a; /* Black text */
	text-transform: lowercase;
	letter-spacing: -0.5px;
}

.main-navigation {
	flex: 1;
	display: flex;
	justify-content: center;
}

.nav-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 30px;
	align-items: center;
}

.nav-menu li {
	margin: 0;
}

.nav-menu a {
	color: #1a1a1a; /* Black text */
	text-decoration: none;
	font-weight: 500;
	font-size: 1rem;
	transition: color 0.3s ease;
	padding: 8px 0;
}

.nav-menu a:hover {
	color: var(--together-blue);
}

.header-right {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-left: auto;
}

.header-cta-button {
	padding: 10px 20px;
	border-radius: 25px;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.header-cta-cyan {
	background: var(--together-blue);
	color: var(--together-white);
}

.header-cta-pink {
	background: var(--together-green);
	color: var(--together-white);
}

.header-cta-pink:hover {
	background: #6bb81a;
	color: var(--together-white);
	text-decoration: none;
}

/* Account Menu */
.account-menu-wrapper {
	position: relative;
	/* Add padding bottom to account for dropdown gap, ensuring smooth hover */
	padding-bottom: 10px;
}

.account-menu-trigger {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	flex-direction: row;
	gap: 10px;
	background: none;
	border: none;
	color: #1a1a1a; /* Black text */
	cursor: pointer;
	padding: 8px 12px;
	border-radius: 8px;
	transition: background 0.3s ease;
	font-family: "Open Sans", sans-serif;
	font-size: 0.9375rem;
	white-space: nowrap;
}

.account-menu-trigger:hover {
	background: rgba(0, 0, 0, 0.05);
}

.account-menu-trigger[aria-expanded="true"] {
	background: rgba(0, 0, 0, 0.1);
}

.account-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	display: block;
}

.account-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.account-name {
	font-weight: 500;
	display: inline-block;
	white-space: nowrap;
}

.account-dropdown-icon {
	width: 16px;
	height: 16px;
	transition: transform 0.3s ease;
}

.account-menu-trigger[aria-expanded="true"] .account-dropdown-icon {
	transform: rotate(180deg);
}

.account-menu-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 10px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	min-width: 240px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
	z-index: 1000;
	overflow: hidden;
}

.account-menu-wrapper.active .account-menu-dropdown,
.account-menu-wrapper:hover .account-menu-dropdown,
.account-menu-dropdown.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.account-menu-wrapper:hover .account-menu-trigger {
	background: rgba(0, 0, 0, 0.05);
}

.account-menu-wrapper:hover .account-menu-trigger .account-dropdown-icon {
	transform: rotate(180deg);
}

.account-menu-list {
	list-style: none;
	padding: 8px 0;
	margin: 0;
}

.account-menu-list li {
	margin: 0;
}

.account-menu-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	color: #1a1a1a;
	text-decoration: none;
	font-size: 0.9375rem;
	transition: background 0.2s ease;
	font-family: "Open Sans", sans-serif;
}

.account-menu-list a:hover {
	background: #f5f5f5;
	color: #1a1a1a;
	text-decoration: none;
}

.account-menu-list a svg {
	flex-shrink: 0;
	color: #666;
	width: 20px;
	height: 20px;
}

.account-menu-list a:hover svg {
	color: var(--together-blue);
}

.menu-toggle {
	display: none;
	background: transparent;
	border: none;
	cursor: pointer;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
}

.menu-toggle-icon {
	width: 24px;
	height: 2px;
	background: #1a1a1a; /* Black for white background */
	transition: all 0.3s ease;
}

/* Mobile account icon button */
.account-menu-trigger-mobile {
	display: none;
}

.account-icon-mobile {
	display: none;
	color: #1a1a1a;
	text-decoration: none;
	padding: 8px;
	border-radius: 8px;
	transition: background 0.3s ease;
}

.account-icon-mobile:hover {
	background: rgba(0, 0, 0, 0.05);
	color: #1a1a1a;
}

.account-icon-mobile svg {
	display: block;
}

/* ============================================
   Footer Styles
   ============================================ */
.together-footer {
	background: rgba(68, 122, 179, 0.08); /* Light blue background */
	color: #1a1a1a;
	padding: 60px 0 30px;
	position: relative;
	overflow: hidden;
}

/* Add soft blob shapes to footer */
.together-footer::before,
.together-footer::after {
	content: '';
	position: absolute;
	width: 500px;
	height: 500px;
	border-radius: 50% 30% 60% 40% / 50% 40% 60% 30%;
	z-index: 1;
	pointer-events: none;
	opacity: 0.6;
}

.together-footer::before {
	top: -150px;
	left: -150px;
	background: rgba(68, 122, 179, 0.15); /* Muted blue blob */
	transform: rotate(45deg);
}

.together-footer::after {
	bottom: -150px;
	right: -150px;
	background: rgba(68, 122, 179, 0.2); /* Slightly darker muted blue blob */
	border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
	transform: rotate(-30deg);
}

.footer-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
	position: relative;
	z-index: 2;
}

.footer-cta {
	text-align: center;
	margin-bottom: 60px;
	position: relative;
	z-index: 2;
}

.cta-title {
	font-size: 32px;
	font-weight: 700;
	color: #1a1a1a; /* Black text */
	margin: 0 0 16px;
	position: relative;
	z-index: 2;
}

.cta-description {
	font-size: 16px;
	color: #1a1a1a; /* Black text */
	margin: 0 0 40px;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.6;
	position: relative;
	z-index: 2;
}

.cta-buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.cta-button {
	display: inline-block;
	padding: 14px 32px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.3s ease;
	font-family: "Open Sans", sans-serif;
	text-align: center;
}

.cta-button-primary {
	background: #97C354; /* Brand Green */
	color: #fff;
	border: 2px solid #97C354;
}

.cta-button-primary:hover {
	background: #7fa845;
	border-color: #7fa845;
	color: #fff;
	text-decoration: none;
}

.cta-button-secondary {
	background: transparent;
	color: #447AB3; /* Blue text */
	border: 2px solid #447AB3; /* Blue border */
}

.cta-button-secondary:hover {
	background: rgba(68, 122, 179, 0.1);
	color: #447AB3;
	text-decoration: none;
}

.footer-main {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
	gap: 40px;
	margin-bottom: 40px;
}

.footer-brand {
	max-width: 300px;
}

.footer-logo {
	margin-bottom: 20px;
}

.footer-logo-icon {
	display: inline-block;
	width: 40px;
	height: 40px;
	background: var(--together-blue);
	border-radius: 8px;
	text-align: center;
	line-height: 40px;
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	margin-right: 12px;
}

.site-title-footer {
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a; /* Black text */
	text-decoration: none;
}

.footer-contact {
	font-size: 14px;
	color: #1a1a1a; /* Black text */
	line-height: 1.8;
}

.contact-address {
	margin: 0 0 12px;
	color: #1a1a1a;
	line-height: 1.6;
}

.contact-email {
	margin: 0;
}

.contact-email a {
	color: #1a1a1a;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
}

.contact-email a:hover {
	color: var(--together-blue);
	text-decoration: underline;
}

.footer-column-title {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a; /* Black text */
	margin: 0 0 20px;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-links li {
	margin-bottom: 12px;
}

.footer-links a {
	color: #1a1a1a; /* Black text */
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s ease;
}

.footer-links a:hover {
	color: #447AB3; /* Blue on hover */
}

.footer-links a.footer-link-highlight {
	color: #ff6b9d; /* Reddish-pink accent color for highlighted links */
	font-weight: 500;
}

.footer-links a.footer-link-highlight:hover {
	color: #ff8fb3;
}


/* Responsive adjustments */
@media (max-width: 1024px) {
	.footer-main {
		grid-template-columns: 1fr 1fr;
		gap: 30px;
	}
	
	.header-container {
		flex-wrap: wrap;
	}
	
	.main-navigation {
		order: 3;
		width: 100%;
		margin-top: 15px;
	}
}

@media (max-width: 768px) {
	.footer-main {
		grid-template-columns: 1fr;
	}
	
	.cta-buttons {
		flex-direction: column;
		gap: 16px;
	}
	
	.cta-button {
		width: 100%;
		max-width: 300px;
	}
	
	/* Mobile header padding */
	.together-header {
		padding: 5px 0 !important;
	}
	
	.header-container {
		padding: 0 20px !important;
		flex-wrap: nowrap;
		gap: 12px;
	}
	
	.header-left {
		flex: 1;
		min-width: 0;
	}
	
	.main-navigation {
		order: 0;
		width: auto;
		margin-top: 0;
		flex: 0;
		display: none !important;
	}
	
	.header-right {
		order: 2;
		gap: 8px;
		flex-shrink: 0;
		margin-left: auto !important;
		justify-content: flex-end !important;
	}
	
	/* Show hamburger on mobile, positioned on far right */
	.menu-toggle {
		display: flex;
		order: 3;
	}
	
	.nav-menu {
		display: none;
	}
	
	.nav-menu.active {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		padding: 20px;
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
		z-index: 1001;
	}
	
	/* Hide desktop account menu on mobile - hide everything except mobile icon */
	.account-menu-trigger:not(.account-menu-trigger-mobile) {
		display: none;
	}
	
	.account-avatar,
	.account-name,
	.account-dropdown-icon {
		display: none;
	}
	
	/* Show mobile account icon button */
	.account-menu-trigger-mobile {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
		background: none;
		border: none;
		color: #1a1a1a;
		cursor: pointer;
		border-radius: 8px;
		transition: background 0.3s ease;
	}
	
	.account-menu-trigger-mobile:hover,
	.account-menu-trigger-mobile[aria-expanded="true"] {
		background: rgba(0, 0, 0, 0.05);
	}
	
	.account-menu-trigger-mobile svg {
		width: 24px;
		height: 24px;
	}
	
	/* Hide desktop login/register buttons on mobile */
	.header-cta-button {
		display: none;
	}
	
	/* Show mobile account icon for logged out users */
	.account-icon-mobile {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
	}
	
	.account-icon-mobile svg {
		width: 24px;
		height: 24px;
	}
	
	/* Ensure everything fits on one line */
	.site-title {
		font-size: 1.25rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}
