/*
Theme Name: Town Square Health Theme
Theme URI:
Author: Unlock Health
Author URI:
Description: A modern WordPress theme for Town Square Health
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: town-square-health-theme
Domain Path: /languages
*/

/* ==========================================================================
   Mobile navigation drawer — overlay, does not push content down.
   ========================================================================== */

#mobile-nav {
	display: none;
	top: 100%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#mobile-nav.is-open {
	display: flex;
}

/* Hamburger icon — hidden by default on desktop, close icon always hidden */
.menu-icon-close {
	display: none;
}

/* ==========================================================================
   Utility nav — link styles (wp_nav_menu renders <ul><li><a>).
   ========================================================================== */

.utility-menu li {
	list-style: none;
}

.utility-menu li a {
	position: relative;
	display: inline-block;
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.6;
	text-decoration: none;
	padding-bottom: 6px;            /* gap between the link text and the underline */
}

/* Patient Portal is a standalone link (with an icon) beside the utility menu —
   give it relative positioning + the same spacing so it gets the hover underline. */
.utility-nav > a {
	position: relative;
	padding-bottom: 6px;
}

/* Animated hover underline — wipes in from left to right (utility bar links). */
.utility-menu li a::after,
.utility-nav > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background-color: var(--wp--preset--color--navy);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.3s ease;
}

.utility-menu li a:hover::after,
.utility-menu li a:focus-visible::after,
.utility-nav > a:hover::after,
.utility-nav > a:focus-visible::after {
	transform: scaleX(1);
}

/* Active page — static green underline on the current utility item. */
.utility-menu li.current-menu-item > a::before,
.utility-menu li.current-menu-ancestor > a::before,
.utility-menu li a[aria-current="page"]::before {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background-color: var(--wp--preset--color--green);
}

/* On the active utility link, stack the animated underline directly above the green. */
.utility-menu li.current-menu-item > a::after,
.utility-menu li.current-menu-ancestor > a::after,
.utility-menu li a[aria-current="page"]::after {
	bottom: 2px;
}

/* ==========================================================================
   Primary nav — link styles.
   ========================================================================== */

.primary-menu li {
	list-style: none;
}

.primary-menu li a {
	position: relative;
	display: inline-block;
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.6;
	text-decoration: none;
	padding-bottom: 8px;            /* gap between the link text and the underline */
}

/* Animated hover underline — wipes in from left to right. */
.primary-menu li a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background-color: var(--wp--preset--color--navy);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.3s ease;
}

.primary-menu li a:hover::after,
.primary-menu li a:focus-visible::after {
	transform: scaleX(1);
}

/* Active page — static green underline on the current menu item. */
.primary-menu li.current-menu-item > a::before,
.primary-menu li.current-menu-ancestor > a::before,
.primary-menu li a[aria-current="page"]::before {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background-color: var(--wp--preset--color--green);
}

/* On the active link, stack the animated hover underline directly above the
   green one (green is 2px tall at bottom: 0, so bottom: 2px sits flush on top
   of it with no gap between the two lines). */
.primary-menu li.current-menu-item > a::after,
.primary-menu li.current-menu-ancestor > a::after,
.primary-menu li a[aria-current="page"]::after {
	bottom: 2px;
}

/* ==========================================================================
   Mobile menus — link styles.
   ========================================================================== */

.mobile-primary-menu li,
.mobile-utility-menu li {
	list-style: none;
}

.mobile-primary-menu li a {
	color: var(--wp--preset--color--navy);
	font-size: 1.25rem;
	line-height: 1.6;
	text-decoration: none;
	display: block;
}

.mobile-utility-menu li a {
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.6;
	text-decoration: none;
	display: block;
}

.mobile-primary-menu li a:hover,
.mobile-utility-menu li a:hover {
	text-decoration: underline;
}

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

/* Column headings — Poppins Medium */
.footer-col-heading {
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

/* All footer links default to white; bottom bar links override to blue-pale */
.site-footer a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.site-footer a:hover {
	text-decoration: underline;
}
.site-footer .footer-bottom a,
.site-footer .footer-legal-menu a {
	color: var(--wp--preset--color--blue-pale);
}

/* Footer logo sizing */
.footer-logo .custom-logo-link,
.footer-logo a {
	display: block;
}
.footer-logo-img,
.footer-logo .custom-logo {
	display: block;
	width: 204px;
	height: auto;
	object-fit: contain;
	object-position: left top;
}
@media (min-width: 768px) {
	.footer-logo-img,
	.footer-logo .custom-logo {
		width: 279px;
	}
}

/* Footer nav links — Patients + Town Square Health columns */
.footer-patients-menu a,
.footer-about-menu a {
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.6;
	text-decoration: none;
}
.footer-patients-menu a:hover,
.footer-about-menu a:hover {
	text-decoration: underline;
}

/* Patient Portal external link icon — set target="_blank" on that menu item */
.footer-patients-menu a[target="_blank"]::after {
	content: ' \2197';
	font-size: 0.75em;
}

/* Legal links */
.footer-legal-menu a {
	color: var(--wp--preset--color--blue-pale);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.6;
	text-decoration: none;
}
.footer-legal-menu a:hover {
	text-decoration: underline;
}