/**
 * Hello Elementor Child - Main Styles
 *
 * Gray color scheme with readable contrast.
 * Responsive layout with max 1000px content width.
 *
 * @package HelloElementorChild
 */

/* ========================================
   CSS Custom Properties (Variables)
   ======================================== */
:root {
	/* Gray Color Scheme */
	--hec-color-bg: #f5f5f5;
	--hec-color-bg-dark: #333333;
	--hec-color-text: #333333;
	--hec-color-text-light: #666666;
	--hec-color-text-inverse: #ffffff;
	--hec-color-border: #dddddd;
	--hec-color-nav-bg: #ffffff;
	--hec-color-nav-hover: #e8e8e8;
	--hec-color-footer-bar: #2d2d2d;

	/* Layout */
	--hec-content-max-width: 1000px;
	--hec-side-padding: 20px;
	--hec-mobile-side-padding: 10px;

	/* Transitions */
	--hec-transition: 0.3s ease;
}

/* ========================================
   Base Layout
   ======================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	background-color: var(--hec-color-bg);
	color: var(--hec-color-text);
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Skip link for accessibility */
.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--hec-color-bg-dark);
	color: var(--hec-color-text-inverse);
	padding: 8px 16px;
	z-index: 10000;
	text-decoration: none;
}

.skip-link:focus {
	top: 0;
}

/* Screen reader text */
.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;
	width: 1px;
	word-wrap: normal !important;
}

/* ========================================
   Content Container
   ======================================== */
.hec-content-container {
	width: 100%;
	padding: 0;
}

/* Site Content Area */
.hec-site-content {
	flex: 1;
	width: 100%;
}

/* ========================================
   Header
   ======================================== */
.hec-site-header {
	width: 100%;
}

/* ========================================
   Navigation
   ======================================== */
.hec-main-nav {
	background-color: var(--hec-color-nav-bg);
	width: 100%;
	position: relative;
	z-index: 1000;
}

.hec-nav-container {
	width: 100%;
	display: flex;
	justify-content: flex-start; /* Default - can be overridden by Customizer */
	align-items: center;
	padding: 15px var(--hec-side-padding);
	position: relative;
}

/* Desktop Navigation Menu */
.hec-nav-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 5px;
}

.hec-nav-menu li {
	position: relative;
}

.hec-nav-menu a {
	display: block;
	padding: 10px 15px;
	text-decoration: none;
	color: var(--hec-color-text);
	transition: background-color var(--hec-transition), color var(--hec-transition);
	white-space: nowrap;
	text-transform: uppercase;
}

.hec-nav-menu a:hover,
.hec-nav-menu a:focus {
	/* Background color controlled by Customizer */
}

.hec-nav-menu .current-menu-item > a,
.hec-nav-menu .current-menu-ancestor > a {
	font-weight: 600;
}

/* Submenu (dropdown) styling */
.hec-nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background-color: var(--hec-color-nav-bg);
	min-width: 200px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	list-style: none;
	padding: 0;
	margin: 0;
	z-index: 100;
}

.hec-nav-menu li:hover > .sub-menu,
.hec-nav-menu li:focus-within > .sub-menu {
	display: block;
}

.hec-nav-menu .sub-menu a {
	padding: 12px 20px;
	border-bottom: 1px solid var(--hec-color-border);
}

.hec-nav-menu .sub-menu li:last-child a {
	border-bottom: none;
}

/* Nested submenu */
.hec-nav-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

/* ========================================
   Mobile Menu Toggle Button
   ======================================== */
.hec-menu-toggle {
	display: none;
	background: none !important;
	background-color: transparent !important;
	border: none;
	cursor: pointer;
	padding: 10px;
	z-index: 1001;
}

.hec-menu-toggle:hover,
.hec-menu-toggle:focus,
.hec-menu-toggle:active {
	background: none !important;
	background-color: transparent !important;
	outline: none;
}

.hec-hamburger-icon {
	display: block;
	width: 24px;
	height: 3px;
	background-color: var(--hec-color-text);
	position: relative;
	transition: background-color var(--hec-transition);
}

.hec-hamburger-icon::before,
.hec-hamburger-icon::after {
	content: '';
	position: absolute;
	width: 24px;
	height: 3px;
	background-color: var(--hec-color-text);
	left: 0;
	transition: transform var(--hec-transition);
}

.hec-hamburger-icon::before {
	top: -8px;
}

.hec-hamburger-icon::after {
	top: 8px;
}

/* Hamburger to X transformation */
.hec-menu-toggle[aria-expanded="true"] .hec-hamburger-icon {
	background-color: transparent;
}

.hec-menu-toggle[aria-expanded="true"] .hec-hamburger-icon::before {
	transform: translateY(8px) rotate(45deg);
}

.hec-menu-toggle[aria-expanded="true"] .hec-hamburger-icon::after {
	transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   Header / Footer Image Sections (Background)
   ======================================== */
.hec-header-image {
	width: 100%;
	height: var(--hec-header-height, 300px);
	background-size: auto;
	background-position: top center;
	background-repeat: no-repeat;
}

.hec-footer-image {
	width: 100%;
	height: var(--hec-footer-height, 200px);
	background-size: auto;
	background-position: bottom center;
	background-repeat: no-repeat;
}

/* ========================================
   Footer
   ======================================== */
.hec-site-footer {
	width: 100%;
	margin-top: auto;
}

/* Footer Info Bar */
.hec-footer-info-bar {
	background-color: var(--hec-color-footer-bar);
	color: var(--hec-color-text-inverse);
	padding: 15px 0;
	text-align: center;
}

.hec-info-container {
	padding-left: var(--hec-side-padding);
	padding-right: var(--hec-side-padding);
}

.hec-footer-info-bar p {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
}

.hec-footer-info-bar a {
	color: var(--hec-color-text-inverse);
	text-decoration: underline;
}

.hec-footer-info-bar a:hover,
.hec-footer-info-bar a:focus {
	opacity: 0.8;
}

/* ========================================
   Elementor Compatibility
   ======================================== */
.elementor-page .hec-site-content {
	width: 100%;
}

/* Elementor sections - full width background */
.elementor-section {
	width: 100%;
}

/* Elementor containers - limited to 1000px */
.elementor-section > .elementor-container {
	max-width: var(--hec-content-max-width);
	margin-left: auto;
	margin-right: auto;
}

/* Full-width sections still have container limited */
.elementor-section.elementor-section-full_width {
	width: 100%;
}

.elementor-section.elementor-section-full_width > .elementor-container {
	max-width: var(--hec-content-max-width);
	margin-left: auto;
	margin-right: auto;
}

/* ========================================
   Home Page Intro Section
   ======================================== */
.hec-home-intro {
	padding: 60px 0;
}

.hec-home-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	padding: 0 var(--hec-side-padding);
}

.hec-home-text {
	text-align: center;
	flex: 1;
}

.hec-home-text h1 {
	color: #75604e;
	text-transform: uppercase;
	font-size: 30px;
	font-weight: 800;
	margin-bottom: 20px;
}

.hec-home-text p {
	font-size: 16px;
	line-height: 1.6;
	color: var(--hec-color-text);
}

.hec-home-logos {
	text-align: center;
	flex: 1;
}

.hec-home-logos img {
	margin: 20px;
	max-width: 120px;
	height: auto;
}

/* ========================================
   Highlight Section
   ======================================== */
.hec-highlight-container {
	text-align: center;
	position: relative;
}

.hec-highlight {
	background-color: #313d43;
	background-position: center center;
	background-repeat: no-repeat;
	height: 500px;
	clip-path: polygon(0 0, 100% 150px, 100% 500px, 0 350px);
}

.hec-highlight-dog {
	background-position: center center;
	background-repeat: no-repeat;
	height: 500px;
	width: 100%;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
}

.hec-shadow::after {
	background-image: url('../images/shadow-square.png');
	content: '';
	background-repeat: no-repeat;
	background-size: 100% 100%;
	margin-top: -151px;
	height: 150px;
	width: 100%;
	display: block;
}

/* ========================================
   Blog Posts Section
   ======================================== */
.hec-blog-posts {
	max-width: var(--hec-content-max-width);
	margin: 40px auto;
	padding: 0 var(--hec-side-padding);
}

.hec-post-item {
	margin-bottom: 40px;
	padding-bottom: 40px;
	border-bottom: 1px solid var(--hec-color-border);
}

.hec-post-item:last-child {
	border-bottom: none;
}

.hec-post-title {
	font-size: 24px;
	margin-bottom: 10px;
}

.hec-post-title a {
	color: var(--hec-color-text);
	text-decoration: none;
}

.hec-post-title a:hover {
	color: var(--hec-color-text-light);
}

.hec-post-meta {
	font-size: 14px;
	color: var(--hec-color-text-light);
	margin-bottom: 15px;
}

.hec-post-content {
	font-size: 16px;
	line-height: 1.6;
}

.hec-post-content img {
	border-style: solid;
	border-width: 10px;
	border-radius: 5px;
	box-shadow: 9px 7px 10px 0px rgba(0, 0, 0, 0.27);
}

.hec-post-excerpt {
	font-size: 16px;
	line-height: 1.6;
}

.hec-read-more {
	display: inline-block;
	margin-top: 15px;
	color: var(--hec-color-text);
	text-decoration: none;
	font-weight: 600;
}

.hec-read-more:hover {
	color: var(--hec-color-text-light);
}

/* Pagination */
.hec-pagination {
	text-align: center;
	margin: 40px 0;
}

.hec-pagination .page-numbers {
	display: inline-block;
	padding: 10px 15px;
	margin: 0 5px;
	background-color: var(--hec-color-nav-bg);
	color: var(--hec-color-text);
	text-decoration: none;
	border-radius: 4px;
}

.hec-pagination .page-numbers.current,
.hec-pagination .page-numbers:hover {
	background-color: var(--hec-color-text);
	color: var(--hec-color-text-inverse);
}

/* ========================================
   Responsive Styles
   ======================================== */

/* Tablet and below (992px) - Show mobile menu */
@media (max-width: 992px) {
	.hec-menu-toggle {
		display: block;
	}

	.hec-nav-menu {
		display: flex;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		/* Background color controlled by Customizer (same as menu bar) */
		flex-direction: column;
		padding: 0;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
		/* Animation with transform - no scrollbar flash */
		transform: scaleY(0);
		transform-origin: top;
		opacity: 0;
		visibility: hidden;
		transition: transform 0.3s ease, opacity 0.25s ease, visibility 0.3s;
	}

	.hec-nav-menu.is-open {
		transform: scaleY(1);
		opacity: 1;
		visibility: visible;
		max-height: calc(100vh - 100px);
		overflow-y: auto;
	}

	/* Animate menu items */
	.hec-nav-menu li {
		border-bottom: 1px solid var(--hec-color-border);
		opacity: 0;
		transform: translateX(-20px);
		transition: opacity 0.25s ease, transform 0.25s ease;
	}

	.hec-nav-menu.is-open li {
		opacity: 1;
		transform: translateX(0);
	}

	/* Stagger animation for each menu item */
	.hec-nav-menu.is-open li:nth-child(1) { transition-delay: 0.1s; }
	.hec-nav-menu.is-open li:nth-child(2) { transition-delay: 0.15s; }
	.hec-nav-menu.is-open li:nth-child(3) { transition-delay: 0.2s; }
	.hec-nav-menu.is-open li:nth-child(4) { transition-delay: 0.25s; }
	.hec-nav-menu.is-open li:nth-child(5) { transition-delay: 0.3s; }
	.hec-nav-menu.is-open li:nth-child(6) { transition-delay: 0.35s; }
	.hec-nav-menu.is-open li:nth-child(7) { transition-delay: 0.4s; }
	.hec-nav-menu.is-open li:nth-child(8) { transition-delay: 0.45s; }

	.hec-nav-menu li:last-child {
		border-bottom: none;
	}

	.hec-nav-menu a {
		padding: 15px var(--hec-side-padding);
		text-align: center;
	}

	/* Submenu in mobile */
	.hec-nav-menu .sub-menu {
		position: static;
		box-shadow: none;
		display: none;
		background-color: #fafafa;
	}

	.hec-nav-menu li:hover > .sub-menu,
	.hec-nav-menu li:focus-within > .sub-menu,
	.hec-nav-menu .sub-menu.is-open {
		display: block;
	}

	.hec-nav-menu .sub-menu a {
		padding-left: 40px;
	}

	.hec-nav-menu .sub-menu .sub-menu a {
		padding-left: 60px;
	}
}

/* Mobile (768px and below) - Background images switched via JS */

/* Tablet (768px and below) - Home intro responsive */
@media (max-width: 768px) {
	.hec-home-content {
		flex-direction: column;
	}

	.hec-home-text,
	.hec-home-logos {
		width: 100%;
	}

	.hec-home-logos {
		margin-top: 30px;
	}
}

/* Small mobile (576px and below) - 10px side padding */
@media (max-width: 576px) {
	.hec-nav-container,
	.hec-info-container {
		padding-left: var(--hec-mobile-side-padding);
		padding-right: var(--hec-mobile-side-padding);
	}

	.hec-nav-menu a {
		padding-left: var(--hec-mobile-side-padding);
		padding-right: var(--hec-mobile-side-padding);
	}

	.hec-nav-menu .sub-menu a {
		padding-left: 30px;
	}

	.hec-nav-menu .sub-menu .sub-menu a {
		padding-left: 50px;
	}

	.hec-home-intro {
		padding: 40px 0;
	}

	.hec-home-content {
		padding: 0 var(--hec-mobile-side-padding);
	}

	.hec-home-text h1 {
		font-size: 24px;
	}

	.hec-home-logos img {
		max-width: 80px;
	}

	.hec-blog-posts {
		padding: 0 var(--hec-mobile-side-padding);
	}

	.hec-post-title {
		font-size: 20px;
	}
}
