/*
 * The redesign's header and footer (chrome.php, issue #104), from css/header.css and css/footer.css.
 * Only loaded on the redesigned pages. Everything is under .cp- so Blocksy and Elementor can't clash.
 */

/* Blocksy's own header and footer stay in the page but are hidden here. */
body.cp-redesign #header,
body.cp-redesign #footer,
body.cp-redesign .ct-header,
body.cp-redesign .ct-footer {
	display: none !important;
}

.cp-header,
.cp-drawer,
.cp-footer {
	--cp-navy: var(--color-primary-navy, #212459);
	--cp-dark: var(--color-primary-dark, #16183d);
	--cp-orange: var(--chabbad-etobicoke-theme-orange, #f27730);
	--cp-teal: var(--color-accent-teal, #0098b6);
	--cp-cyan: var(--color-accent-cyan, #00b4d8);
	--cp-plum: var(--color-accent-plum, #6b1457);
	--cp-font: var(--font-heading, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
	font-family: var(--cp-font);
	box-sizing: border-box;
}

.cp-header *,
.cp-drawer *,
.cp-footer * {
	box-sizing: border-box;
}

.cp-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.cp-icon {
	display: inline-block;
	vertical-align: -0.125em;
}

/* ==================== HEADER: transparent over the banner, white once scrolled ==================== */
.cp-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	padding: 8px 0 12px;
	background-color: transparent;
	transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

.admin-bar .cp-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .cp-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .cp-header {
		top: 0;
	}
	.admin-bar .cp-header.scrolled {
		top: 0;
	}
}

.cp-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 120px;
	background: linear-gradient(180deg, rgba(14, 17, 44, 0.75) 0%, rgba(14, 17, 44, 0.35) 60%, rgba(14, 17, 44, 0) 100%);
	pointer-events: none;
	z-index: -1;
	transition: opacity 0.35s ease;
}

.cp-header.scrolled {
	padding: 12px 0;
	background-color: #ffffff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cp-header.scrolled::before {
	opacity: 0;
}

.cp-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
}

.cp-brand {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}

/* Eva's horizontal logo (high quality, transparent background) */
.cp-logo {
	display: block;
	width: auto;
	height: 62px;
	transition: height 0.3s ease;
}

.cp-header.scrolled .cp-logo {
	height: 54px;
}

.cp-nav {
	margin-left: auto;
}

.cp-menu,
.cp-sub,
.cp-drawer-menu,
.cp-drawer-menu ul,
.cp-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cp-menu {
	display: flex;
	align-items: center;
	gap: 22px;
}

.cp-menu-item {
	position: relative;
}

.cp-header .cp-menu-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 0;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.2px;
	white-space: nowrap;
	color: #ffffff;
	text-decoration: none;
	transition: color 0.3s ease;
}

.cp-menu-link .cp-icon {
	font-size: 0.7rem;
}

.cp-header .cp-menu-link:hover {
	color: var(--cp-cyan);
}

.cp-header.scrolled .cp-menu-link {
	color: var(--cp-teal);
}

.cp-header.scrolled .cp-menu-link:hover {
	color: var(--cp-navy);
}

.cp-sub {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	padding: 8px 0 !important;
	background: #ffffff;
	border-top: 3px solid var(--cp-teal);
	border-radius: 10px;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.2s ease;
	z-index: 1001;
}

.cp-menu-item:hover > .cp-sub,
.cp-menu-item:focus-within > .cp-sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.cp-sub a {
	display: block;
	padding: 10px 18px;
	font-size: 0.88rem;
	font-weight: 500;
	color: #2d3748;
	text-decoration: none;
	transition: all 0.2s ease;
}

.cp-sub a:hover {
	padding-left: 22px;
	background-color: #f4f8fb;
	color: var(--cp-teal);
}

.cp-header-actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.cp-header .cp-donate {
	display: inline-flex;
	align-items: center;
	padding: 7px 22px;
	border: 2px solid var(--cp-orange);
	border-radius: 4px;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #ffffff;
	text-decoration: none;
	transition: all 0.3s ease;
}

.cp-header.scrolled .cp-donate {
	color: var(--cp-orange);
}

.cp-header .cp-donate:hover,
.cp-header.scrolled .cp-donate:hover {
	background-color: var(--cp-orange);
	color: #ffffff;
}

.cp-menu-toggle,
.cp-drawer-close {
	display: none;
	padding: 4px;
	border: 0;
	background: none;
	font-size: 1.5rem;
	line-height: 1;
	color: #ffffff;
	cursor: pointer;
}

.cp-header.scrolled .cp-menu-toggle {
	color: var(--cp-navy);
}

/* ==================== MOBILE DRAWER ==================== */
.cp-drawer-overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
}

.cp-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	width: 300px;
	max-width: 85vw;
	height: 100vh;
	height: 100dvh;
	overflow-y: auto;
	background: #ffffff;
	box-shadow: -5px 0 30px rgba(0, 0, 0, 0.25);
	transform: translateX(105%);
	visibility: hidden;
	transition: transform 0.3s ease, visibility 0.3s;
}

.cp-drawer.active {
	transform: none;
	visibility: visible;
}

.cp-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	background: var(--cp-orange);
	color: #ffffff;
	font-size: 1.2rem;
	font-weight: 800;
}

.cp-drawer .cp-drawer-close {
	display: block;
}

.cp-drawer-menu {
	padding: 15px 0 !important;
}

.cp-drawer-menu a {
	display: block;
	padding: 13px 24px;
	border-bottom: 1px solid #edf2f7;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--cp-navy);
	text-decoration: none;
}

.cp-drawer-menu ul a {
	padding-left: 40px;
	font-size: 0.95rem;
	font-weight: 500;
}

.cp-drawer-menu a:hover {
	background-color: #f7f9fc;
	color: var(--cp-teal);
}

.cp-drawer-donate {
	display: block;
	margin: 20px;
	padding: 12px;
	border: 2px solid var(--cp-orange);
	border-radius: 4px;
	text-align: center;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--cp-orange);
	text-decoration: none;
}

.cp-drawer-donate:hover {
	background: var(--cp-orange);
	color: #ffffff;
}

@media (max-width: 1024px) {
	.cp-nav {
		display: none;
	}
	.cp-menu-toggle {
		display: block;
	}
}

@media (max-width: 768px) {
	.cp-logo,
	.cp-header.scrolled .cp-logo {
		height: 44px;
	}
	.cp-header .cp-donate {
		padding: 6px 14px;
		font-size: 0.85rem;
	}
	.cp-header-actions {
		gap: 12px;
	}
}

/* ==================== FOOTER ==================== */
.cp-footer {
	position: relative;
	padding: 60px 0 35px;
	background-color: var(--cp-dark);
	border-top: 4px solid var(--cp-orange);
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.85);
}

.cp-footer a {
	text-decoration: none;
	transition: all 0.2s ease;
}

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

.cp-footer h3 {
	margin: 0 0 12px;
	font-size: 1.6rem;
	font-weight: 800;
	color: #ffffff;
}

.cp-footer h4 {
	margin: 0 0 18px;
	font-size: 1.15rem;
	font-weight: 700;
	color: #ffffff;
}

.cp-footer p {
	margin: 0 0 15px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.7);
}

.cp-footer-contact {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cp-footer-contact a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
}

.cp-footer-contact a:hover {
	color: var(--cp-orange);
}

.cp-footer-contact .cp-icon {
	color: var(--cp-orange);
}

.cp-footer-col ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cp-footer-col li a {
	color: rgba(255, 255, 255, 0.75);
}

.cp-footer-col li a:hover {
	padding-left: 6px;
	color: #ffffff;
}

.cp-social {
	display: flex;
	gap: 12px;
	margin-top: 5px;
}

.cp-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	font-size: 1.15rem;
	color: #ffffff;
}

.cp-social a:hover {
	transform: translateY(-3px);
	color: #ffffff;
}

.cp-social .cp-social-facebook:hover {
	background: #1877f2;
}

.cp-social .cp-social-instagram:hover {
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.cp-social .cp-social-youtube:hover {
	background: #ff0000;
}

.cp-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding-top: 25px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.6);
}

.cp-footer-bottom a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: underline;
}

.cp-footer-bottom a:hover {
	color: var(--cp-orange);
}

.cp-footer-bottom-links {
	display: flex;
	gap: 16px;
}

@media (max-width: 850px) {
	.cp-footer-grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}
	.cp-footer-bottom {
		flex-direction: column;
		text-align: center;
	}
}
