/*
Theme Name:   Hello Elementor Child
Template:     hello-elementor
Description:  Child theme for Caila's Cleaning Crew. All custom CSS goes here.
Version:      1.0.0
Text Domain:  hello-elementor-child
*/

/* Custom CSS below. */

/* ==========================================================================
   CUSTOM: Header menu
   Styles the [ccc_header_menu] shortcode (inc/ccc-header-menu.php).
   Colors come from Elementor Site Settings globals.
   ========================================================================== */

.ccc-nav {
	--ccc-royal: var(--e-global-color-primary, #1E4382);
	--ccc-navy: var(--e-global-color-secondary, #08203B);
	--ccc-citrus: var(--e-global-color-accent, #F9A55D);
	--ccc-sky: var(--e-global-color-ccc_sky, #38A4D0);
	--ccc-linen: var(--e-global-color-ccc_linen, #EFECEA);
	--ccc-muted: var(--e-global-color-ccc_muted, #3D5068);
	font-family: "Montserrat", sans-serif;
}
.ccc-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ccc-nav .menu-item > a {
	display: block;
	text-decoration: none;
}
.ccc-menu__title,
.ccc-menu__desc {
	display: block;
}
/* Arrow after column headings and bottom-row links. */
.ccc-nav .ccc-mega > .sub-menu > .menu-item-has-children > a .ccc-menu__title::after,
.ccc-nav .ccc-foot > a .ccc-menu__title::after {
	content: " \2192";
}

/* ----- Desktop ----- */

.ccc-nav--desktop .ccc-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
}
.ccc-nav--desktop .ccc-menu > .menu-item {
	position: relative;
}
.ccc-nav--desktop .ccc-menu > .menu-item > a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 11px;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	color: var(--ccc-navy);
	white-space: nowrap;
}
/* Citrus underline on hover / current page. */
.ccc-nav--desktop .ccc-menu > .menu-item > a::before {
	content: "";
	position: absolute;
	left: 11px;
	right: 11px;
	bottom: 5px;
	height: 3px;
	border-radius: 3px;
	background: var(--ccc-citrus);
	transform: scaleX(0);
	transition: transform .15s;
}
.ccc-nav--desktop .ccc-menu > .menu-item:hover > a::before,
.ccc-nav--desktop .ccc-menu > .menu-item:focus-within > a::before,
.ccc-nav--desktop .ccc-menu > .menu-item.is-open > a::before,
.ccc-nav--desktop .ccc-menu > .current-menu-item > a::before,
.ccc-nav--desktop .ccc-menu > .current-menu-ancestor > a::before {
	transform: scaleX(1);
}
/* Caret on items with a panel. */
.ccc-nav--desktop .ccc-menu > .menu-item-has-children > a::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .15s;
}
.ccc-nav--desktop .ccc-menu > .menu-item-has-children:hover > a::after,
.ccc-nav--desktop .ccc-menu > .menu-item-has-children:focus-within > a::after,
.ccc-nav--desktop .ccc-menu > .menu-item-has-children.is-open > a::after {
	margin-top: 3px;
	transform: rotate(-135deg);
}

/* Panels */
.ccc-nav--desktop .ccc-menu > .menu-item > .sub-menu {
	position: absolute;
	top: calc(100% + 30px);
	left: 50%;
	z-index: 70;
	width: 210px;
	padding: 10px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(8, 32, 59, .22);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-50%, -4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
/* Invisible bridge so the panel stays open while the mouse moves down to it. */
.ccc-nav--desktop .ccc-menu > .menu-item > .sub-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -30px;
	height: 30px;
}
.ccc-nav--desktop .ccc-menu > .menu-item:hover > .sub-menu,
.ccc-nav--desktop .ccc-menu > .menu-item:focus-within > .sub-menu,
.ccc-nav--desktop .ccc-menu > .menu-item.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, 0);
}
/* Simple dropdown links (e.g. About) */
.ccc-nav--desktop .sub-menu .menu-item > a {
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--ccc-navy);
}
.ccc-nav--desktop .sub-menu .menu-item > a:hover,
.ccc-nav--desktop .sub-menu .menu-item > a:focus-visible {
	background: var(--ccc-linen);
}

/* Bottom-row links in any panel */
.ccc-nav--desktop .sub-menu .ccc-foot {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--ccc-linen);
}
.ccc-nav--desktop .sub-menu .ccc-foot > a {
	padding: 0 12px 2px;
	font-size: 14px;
	font-weight: 700;
	color: var(--ccc-royal);
}
.ccc-nav--desktop .sub-menu .ccc-foot > a:hover,
.ccc-nav--desktop .sub-menu .ccc-foot > a:focus-visible {
	background: none;
	text-decoration: underline;
}

/* Mega panel (Cleaning Services) */
.ccc-nav--desktop .ccc-menu > .ccc-mega > .sub-menu {
	left: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: start;
	gap: 4px 12px;
	width: 700px;
	padding: 20px;
	transform: translateY(-4px);
}
.ccc-nav--desktop .ccc-menu > .ccc-mega:hover > .sub-menu,
.ccc-nav--desktop .ccc-menu > .ccc-mega:focus-within > .sub-menu,
.ccc-nav--desktop .ccc-menu > .ccc-mega.is-open > .sub-menu {
	transform: translateY(0);
}
/* Column headings */
.ccc-nav--desktop .ccc-mega > .sub-menu > .menu-item-has-children > a {
	padding: 4px 12px 8px;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ccc-royal);
}
.ccc-nav--desktop .ccc-mega > .sub-menu > .menu-item-has-children > a:hover {
	background: none;
	text-decoration: underline;
}
/* Service links with descriptions */
.ccc-nav--desktop .ccc-mega .sub-menu .sub-menu > .menu-item > a {
	padding: 10px 12px;
}
.ccc-nav--desktop .ccc-mega .sub-menu .sub-menu .ccc-menu__title {
	margin-bottom: 3px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ccc-navy);
}
.ccc-nav--desktop .ccc-menu__desc {
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--ccc-muted);
}
.ccc-nav--desktop .ccc-mega > .sub-menu > .ccc-foot {
	margin-top: 10px;
}
.ccc-nav--desktop .ccc-mega > .sub-menu > .ccc-foot:nth-last-child(1):nth-child(even) > a {
	text-align: right;
}

/* Pills panel (Service Areas) */
.ccc-nav--desktop .ccc-menu > .ccc-pills > .sub-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 480px;
	padding: 20px;
}
.ccc-nav--desktop .ccc-pills > .sub-menu > .menu-item:not(.ccc-foot) > a {
	padding: 8px 15px;
	border-radius: 999px;
	background: var(--ccc-linen);
	font-size: 14px;
	font-weight: 600;
}
.ccc-nav--desktop .ccc-pills > .sub-menu > .menu-item:not(.ccc-foot) > a:hover,
.ccc-nav--desktop .ccc-pills > .sub-menu > .menu-item:not(.ccc-foot) > a:focus-visible {
	background: var(--ccc-citrus);
}
.ccc-nav--desktop .ccc-pills > .sub-menu > .ccc-foot {
	flex: 1 1 40%;
	margin-top: 6px;
	order: 2;
}
/* Line break so the bottom links always start their own row under the pills. */
.ccc-nav--desktop .ccc-menu > .ccc-pills > .sub-menu::after {
	content: "";
	flex-basis: 100%;
	order: 1;
}
.ccc-nav--desktop .ccc-pills > .sub-menu > .ccc-foot > a {
	padding-left: 0;
	padding-right: 0;
}
.ccc-nav--desktop .ccc-pills > .sub-menu > .ccc-foot + .ccc-foot > a {
	text-align: right;
}
/* Close the gap so the divider above the two links reads as one line. */
.ccc-nav--desktop .ccc-pills > .sub-menu > .ccc-foot + .ccc-foot {
	margin-left: -8px;
	padding-left: 8px;
}

/* ----- Mobile drawer ----- */

.ccc-nav--drawer {
	color: #fff;
}
.ccc-nav--drawer .ccc-menu > .menu-item {
	border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.ccc-nav--drawer .ccc-menu > .menu-item > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}
.ccc-nav--drawer .ccc-menu > .menu-item-has-children > a::after {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	margin: -4px 4px 0 12px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .3s ease, margin .3s ease;
}
.ccc-nav--drawer .ccc-menu > .is-open > a::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}
/* Accordion: sections slide open/closed. CSS can't animate to height:auto,
   so the script sets pixel heights during the slide (assets/js/ccc-header-menu.js). */
.ccc-nav--drawer .ccc-menu > .menu-item > .sub-menu {
	height: 0;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: height .3s ease, opacity .3s ease, visibility 0s linear .3s;
}
.ccc-nav--drawer .ccc-menu > .is-open > .sub-menu {
	height: auto;
	opacity: 1;
	visibility: visible;
	transition: height .3s ease, opacity .3s ease, visibility 0s;
}
/* Top/bottom spacing as pseudo-elements so it collapses with the height. */
.ccc-nav--drawer .ccc-menu > .menu-item > .sub-menu::before,
.ccc-nav--drawer .ccc-menu > .menu-item > .sub-menu::after {
	content: "";
	display: block;
	flex-basis: 100%;
}
.ccc-nav--drawer .ccc-menu > .menu-item > .sub-menu::before {
	height: 2px;
}
.ccc-nav--drawer .ccc-menu > .menu-item > .sub-menu::after {
	height: 16px;
}
@media (prefers-reduced-motion: reduce) {
	.ccc-nav--drawer .ccc-menu > .menu-item > .sub-menu,
	.ccc-nav--drawer .ccc-menu > .menu-item > a::after {
		transition: none;
	}
}
.ccc-nav--drawer .sub-menu .menu-item > a {
	padding: 9px 0;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}
.ccc-nav--drawer .ccc-mega > .sub-menu > .menu-item-has-children > a {
	margin: 12px 0 2px;
	padding: 0;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ccc-sky);
}
.ccc-nav--drawer .ccc-menu__desc {
	margin-top: 3px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	color: rgba(255, 255, 255, .78);
}
.ccc-nav--drawer .ccc-menu > .ccc-pills > .sub-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
/* The flex gap already adds space around the pills. */
.ccc-nav--drawer .ccc-menu > .ccc-pills > .sub-menu::before {
	height: 0;
}
.ccc-nav--drawer .ccc-menu > .ccc-pills > .sub-menu::after {
	height: 8px;
}
.ccc-nav--drawer .ccc-pills > .sub-menu > .menu-item:not(.ccc-foot) > a {
	padding: 8px 15px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	font-size: 14px;
}
.ccc-nav--drawer .sub-menu .ccc-foot {
	flex-basis: 100%;
}
.ccc-nav--drawer .sub-menu .ccc-foot > a {
	margin-top: 6px;
	font-size: 14px;
	font-weight: 700;
}

/* ===== END CUSTOM: Header menu ===== */

/* ==========================================================================
   CUSTOM: Footer menu
   Lays out the Elementor Nav Menu widget with the CSS class "ccc-footer-menu"
   (Footer template) in two columns. Items come from Appearance > Menus > Footer.
   ========================================================================== */

.ccc-footer-menu .elementor-nav-menu--main .elementor-nav-menu {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 22px;
}
/* One column on phones (Elementor mobile breakpoint). */
@media (max-width: 767px) {
	.ccc-footer-menu .elementor-nav-menu--main .elementor-nav-menu {
		grid-template-columns: 1fr;
	}
}

/* ===== END CUSTOM: Footer menu ===== */

/* ==========================================================================
   CUSTOM: Layout helpers
   Reusable classes added in Elementor under Advanced > CSS Classes.
   ========================================================================== */

/* ccc-img-fill: on an Image widget inside a card, the photo fills the card's
   full height (cropped to fit) without making the card taller.
   Used on the homepage "door" cards. */
.ccc-img-fill {
	position: relative;
	align-self: stretch;
	min-height: 120px;
}
.ccc-img-fill img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

@media (max-width: 767px) {
	/* ccc-img-fill-mobile: same as ccc-img-fill, but only on phones, where the
	   service cards turn into rows with the photo on the left. */
	.ccc-img-fill-mobile {
		position: relative;
		align-self: stretch;
		min-height: 120px;
	}
	.ccc-img-fill-mobile img {
		position: absolute;
		inset: 0;
		width: 100% !important;
		height: 100% !important;
		object-fit: cover;
	}

	/* ccc-snap-row: on a container whose cards sit in one row on phones,
	   lets visitors swipe sideways through the cards (homepage reviews). */
	.ccc-snap-row {
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		/* Bleed to both screen edges: the negative margins pull it out 20px a side,
		   and the width grows by 40px to match (Elementor locks it to 100% otherwise). */
		margin-inline: -20px;
		width: calc(100% + 40px) !important;
		max-width: none !important;
		padding: 4px 20px 20px !important;
	}
	.ccc-snap-row::-webkit-scrollbar {
		display: none;
	}
	.ccc-snap-row > .e-con {
		scroll-snap-align: center;
	}
}

/* ===== END CUSTOM: Layout helpers ===== */

/* =====================================================================
   CUSTOM: Service area "Nearby towns" buttons
   The Loop Grid (CSS class ccc-chip-loop) lays items out in fixed columns.
   This lets the town buttons sit side by side and wrap, like the homepage town chips.
   ===================================================================== */
.ccc-chip-loop .elementor-loop-container{display:flex!important;flex-wrap:wrap;gap:12px}
.ccc-chip-loop .e-loop-item{width:auto}
@media (max-width:767px){
 .ccc-chip-loop .elementor-loop-container{gap:9px}
}

/* ===== END CUSTOM: Service area chips ===== */

/* =====================================================================
   CUSTOM: Cleaning checklist tables
   Add the CSS class ccc-table to a Text Editor widget that holds a <table>
   (first row in <thead>). Used for the room-by-room charts on the
   home cleaning pages. On phones each row stacks: area on top, details below.
   ===================================================================== */
.ccc-table table{width:100%;margin:0;border-collapse:separate;border-spacing:0;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 24px rgba(8,32,59,.1);font-size:15.5px;line-height:1.45}
.ccc-table table th{background:var(--e-global-color-secondary);color:#fff;text-align:left;padding:14px 20px;border:0;font-weight:700;letter-spacing:.05em;text-transform:uppercase;font-size:13.5px}
.ccc-table table td{padding:12px 20px;vertical-align:top;border:0;border-top:1px solid var(--e-global-color-ccc_divide)}
.ccc-table table tbody tr:nth-child(odd) td{background:#fff}
.ccc-table table tbody tr:nth-child(even) td{background:var(--e-global-color-ccc_linen)}
.ccc-table table td:first-child{font-weight:600;width:44%}
.ccc-table table strong{color:var(--e-global-color-primary);font-weight:800}
@media (max-width:767px){
 .ccc-table table,.ccc-table table tbody,.ccc-table table tr,.ccc-table table td{display:block;width:100%}
 .ccc-table table thead{display:none}
 .ccc-table table td{padding:10px 14px;font-size:15px}
 .ccc-table table td:first-child{width:100%;padding-bottom:2px}
 .ccc-table table td+td{border-top:0;padding-top:0;padding-bottom:12px}
}

/* Comparison version (CSS classes "ccc-table ccc-table-cmp"): 4 equal columns on desktop.
   On phones each value shows its column name, from <span class="lbl"> inside the cell. */
.ccc-table-cmp table{table-layout:fixed}
.ccc-table-cmp table th,.ccc-table-cmp table td,.ccc-table-cmp table td:first-child{width:25%}
.ccc-table .lbl{display:none}
@media (max-width:767px){
 .ccc-table-cmp table{table-layout:auto}
 .ccc-table-cmp table th,.ccc-table-cmp table td,.ccc-table-cmp table td:first-child{width:100%}
 .ccc-table .lbl{display:block;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--e-global-color-primary);margin-bottom:1px}
 .ccc-table-cmp table td+td{padding-top:6px}
}
/* ===== END CUSTOM: Cleaning checklist tables ===== */

/* ===== CUSTOM: Horizontal (inline) icon lists =====
   Elementor's "Space Between" only spaces items side to side, so when an inline list
   wraps onto more lines (mostly on phones) the rows touch. This adds space between rows. */
.elementor-widget-icon-list .elementor-icon-list-items.elementor-inline-items{row-gap:12px}
/* ===== END CUSTOM: Horizontal icon lists ===== */

/* ===== CUSTOM: Before/after photos (Reviews page) =====
   Elementor's image widget has no aspect-ratio setting. Image widgets with CSS class
   "ccc-ba-photo" get a 4:3 frame; the photo fills it (Object Fit: Cover, set on the widget).
   Change what stays in view with the widget's Object Position setting. */
.ccc-ba-photo img{aspect-ratio:4/3;width:100%}
/* ===== END CUSTOM: Before/after photos ===== */

/* ===== CUSTOM: Blog Load More button (Blog Archive template) =====
   Elementor's Loop Grid has no alignment control for its Load More button,
   so this makes it full width on mobile like the site's other buttons. */
@media (max-width: 767px) {
	.ccc-post-loop .e-loop__load-more .elementor-button { width: 100%; }
}
/* ===== END CUSTOM: Blog Load More button ===== */

/* ===== CUSTOM: Inline content links, no underline on hover =====
   Only links inside body text: Text Editor widgets (incl. accordion answers)
   and blog Post Content. Buttons, menus and Text Link headings are not affected.
   The underline comes from a <u> tag inside the link, so that is reset too. */
.elementor-widget-text-editor a:hover,
.elementor-widget-text-editor a:hover u,
.elementor-widget-theme-post-content a:hover,
.elementor-widget-theme-post-content a:hover u {
	text-decoration: none;
}
/* ===== END CUSTOM: Inline content links ===== */

/* ===== CUSTOM: Accordion titles set to an h3 tag (Service Areas town cards) =====
   The kit gives every h3 the Midnight Navy color, which overrides the
   accordion title color set in the widget. This lets the widget color show. */
.elementor-widget-n-accordion h3.e-n-accordion-item-title-text {
	color: inherit;
}
/* ===== END CUSTOM: Accordion h3 titles ===== */

/* ===== CUSTOM: Lists in blog posts (Blog Post Single template) =====
   The theme resets list margins to 0, so a list ran straight into the
   next paragraph. This gives it the same space below as a paragraph. */
.elementor-widget-theme-post-content ul {
	margin-block-end: 0.9rem;
}
/* ===== END CUSTOM: Lists in blog posts ===== */

/* ===== CUSTOM: Print layout (Welcome Packet "Print this page" link) =====
   Hides the site header, footer, buttons, the print link and accordion +/- icons,
   plus the photos on the Welcome Packet.
   The open-all-sections step is in inc/ccc-print.php. */
@media print {
	[data-elementor-type="header"],
	[data-elementor-type="footer"],
	.elementor-widget-button,
	.ccc-print,
	.e-n-accordion-item-title-icon { display: none !important; }
	.e-n-accordion-item { break-inside: avoid; }
	/* The theme prints each link address after the link; skip it for phone and email links. */
	a[href^="tel:"]::after,
	a[href^="mailto:"]::after { content: none !important; }
	/* Welcome Packet prints text only, no photos (Caila's signature, class ccc-print-keep, still prints). */
	.page-id-36 .elementor-widget-image:not(.ccc-print-keep) { display: none !important; }
}

/* ===== CUSTOM: Gravity Forms (Careers job application) =====
   Matches the staging form: tighter rows, navy "(required)" tags, weekdays on one row,
   full-width Citrus button with the Citrus Hover color. Colors and field size are set
   in the form's shortcode (Orbital theme styles); this covers what those settings can't. */
.gform-theme--framework.gform_wrapper {
	--gf-form-gap-y: 16px;
	--gf-form-gap-x: 18px;
	--gf-ctrl-label-color-req: var(--e-global-color-secondary);
	--gf-ctrl-label-font-weight-primary: 700;
	--gf-ctrl-label-font-weight-req: 500;
	--gf-ctrl-textarea-height: 92px;
	--gf-ctrl-btn-bg-color-hover-primary: var(--e-global-color-ccc_tanghv);
	--gf-ctrl-btn-color-hover-primary: var(--e-global-color-secondary);
	--gf-ctrl-btn-font-weight: 700;
	--gf-ctrl-btn-letter-spacing: .05em;
	--gf-ctrl-btn-text-transform: uppercase;
	--gf-form-footer-margin-y-start: 20px;
}
.gform-theme--framework .gform_required_legend { display: none; }
.gform-theme--framework .ccc-inline-choices .gfield_checkbox { flex-direction: row; flex-wrap: wrap; gap: 10px 22px; }
.gform-theme--framework .ccc-optional .gfield_label::after { content: " (optional)"; font-weight: 500; font-size: 12.5px; margin-inline-start: 6px; }
.gform-theme.gform-theme--framework.gform_wrapper .gform_footer .gform_button { flex: 1 1 100%; min-height: 56px; font-size: 16px; border-radius: 6px; }
/* The kit adds top/bottom padding to all inputs, which pushes the file button down. */
.gform-theme.gform-theme--framework.gform_wrapper input[type="file"] { padding-block: 0; line-height: 44px; }
/* ===== END CUSTOM: Gravity Forms ===== */
