/*
Theme Name: Mail Services
Theme URI: https://www.mailserviceslc.com/
Author: Mail Communications Group
Description: Custom block (Full Site Editing) theme for Mail Services, LLC — a brand-preserving, responsive modernization of the legacy PHP marketing site. Header, footer, and navigation are developer-owned template parts and block patterns; page bodies are edited freely in the block editor.
Version: 0.3.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary — Mail Communications Group, LLC. All rights reserved.
Text Domain: mailservices
*/

/*
 * Most styling is driven by theme.json (colors, typography, spacing, layout).
 * This file is intentionally light — add only rules that block supports
 * and theme.json cannot yet express. Keep it small.
 */

/* Logo sizing in the header */
.wp-block-site-logo img {
	height: auto;
	max-height: 64px;
	width: auto;
}

/* Sticky header with a green accent rule, echoing the legacy footer border */
.site-header {
	border-bottom: 4px solid var(--wp--preset--color--brand-dark);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

/* Footer top accent, matching the legacy 10px green border-top */
.site-footer {
	border-top: 10px solid var(--wp--preset--color--brand-dark);
}

/* Primary navigation: comfortable spacing + clear hover/current state */
.site-header .wp-block-navigation {
	--wp--style--block-gap: 0.7rem;
	font-weight: 500;
}
/* Trim the submenu caret gap so all top-level items fit one row */
.site-header .wp-block-navigation .wp-block-navigation-submenu__toggle + .wp-block-navigation__submenu-icon,
.site-header .wp-block-navigation .wp-block-navigation__submenu-icon {
	margin-left: 0.1rem;
	padding: 0;
}
.site-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--wp--preset--color--brand-light);
}

/* Submenus: soften the dropdown */
.wp-block-navigation .wp-block-navigation__submenu-container {
	border-radius: 6px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	border: none;
}

/* Footer columns: tighten link lists, lighten dividers */
.site-footer .wp-block-list.is-style-none,
.site-footer ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
	line-height: 1.9;
}
.site-footer h3 a { text-decoration: none; }

/* Hero: keep headline readable over the photo on small screens */
.wp-block-cover h1 { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }

/* Site notice sits above the sticky header cleanly */
.ms-site-notice a { color: #fff; text-decoration: underline; }

/* Responsive hygiene: never allow horizontal overflow on small screens */
html { overflow-x: hidden; }
img, .wp-block-cover__image-background { max-width: 100%; }

@media (max-width: 600px) {
	.site-header { position: static; }
	.wp-block-cover { min-height: 320px !important; }
	/* Let flex rows (utility nav, button groups) wrap instead of overflowing */
	.site-header .wp-block-group,
	.wp-block-buttons { flex-wrap: wrap; }
	.wp-block-cover .wp-block-buttons { justify-content: center; }
}

/* Parallax (fixed-background) covers: graceful fallback on mobile + reduced
   motion (network-wide; iOS often disables background-attachment:fixed). */
@media (max-width: 781px) {
	.wp-block-cover.has-parallax .wp-block-cover__image-background { background-attachment: scroll !important; }
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-cover.has-parallax .wp-block-cover__image-background { background-attachment: scroll !important; }
}
