/*
Theme Name:   Haleema Child
Theme URI:    https://haleemainternational.com
Description:  Child theme for Haleema International, built on Astra. Holds security hardening, performance clean-up, the Haleema light design system (tokens, utility classes, icon set), the custom footer, contact settings and the WhatsApp button — safe from parent theme updates.
Author:       HN Solutions
Template:     astra
Version:      1.6.0
Requires PHP: 7.4
Text Domain:  haleema-child
*/

/* ==========================================================================
   1. Design tokens (light theme) — mirror Elementor > Site Settings
   ========================================================================== */
:root {
	--hi-ivory: #FBF8F3;       /* page background */
	--hi-cream: #F3ECE1;       /* alternate sections, footer */
	--hi-sand: #E6DCCD;        /* borders */
	--hi-white: #FFFFFF;       /* cards, header */
	--hi-ink: #1A1612;         /* headings */
	--hi-text: #4A433B;        /* body text */
	--hi-muted: #6F665B;       /* secondary text */
	--hi-gold: #C9A36A;        /* buttons, lines, decoration */
	--hi-gold-light: #E2C79A;
	--hi-gold-mid: #8C6A36;    /* icons + accent words (AA on light) */
	--hi-gold-deep: #7D5F30;   /* gold text & links (AA on light) */
	--hi-burgundy: #7A1F2B;
	--hi-espresso: #211C17;    /* optional dark sections */
	--hi-text-on-dark: #CFC6B8;
	--hi-cream-on-dark: #F5F0E8;
	--hi-line: rgba(125, 95, 48, 0.16);
	--hi-line-strong: rgba(125, 95, 48, 0.4);
	--hi-line-dark: rgba(201, 163, 106, 0.22);

	--hi-font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--hi-font-sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

	--hi-radius: 2px;
	--hi-radius-card: 4px;
	--hi-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--hi-speed: 0.35s;
	--hi-space-section: clamp(64px, 9vw, 120px);
	--hi-space-section-sm: clamp(48px, 6vw, 80px);
	--hi-shadow: 0 24px 48px -28px rgba(58, 45, 30, 0.28);
	--hi-header-h: 84px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hi-header-h) + 16px); }
body { background-color: var(--hi-ivory); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: var(--hi-gold-light); color: var(--hi-ink); }
:focus-visible { outline: 2px solid var(--hi-gold-deep); outline-offset: 3px; }
img { height: auto; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@supports (scrollbar-color: auto) { html { scrollbar-color: var(--hi-sand) var(--hi-ivory); scrollbar-width: thin; } }

/* ==========================================================================
   3. Sections  (Elementor: Container > Advanced > CSS Classes)
   ========================================================================== */
.hi-section { padding-top: var(--hi-space-section) !important; padding-bottom: var(--hi-space-section) !important; }
.hi-section--sm { padding-top: var(--hi-space-section-sm) !important; padding-bottom: var(--hi-space-section-sm) !important; }
.hi-bg-ivory { background-color: var(--hi-ivory); }
.hi-bg-cream { background-color: var(--hi-cream); }
.hi-bg-white { background-color: var(--hi-white); }
.hi-bg-espresso, .hi-bg-ink { background-color: var(--hi-espresso); }

/* Optional dark section: add "hi-dark" — everything inside flips to light-on-dark. */
.hi-dark { color: var(--hi-text-on-dark); }
.hi-dark .elementor-widget .elementor-heading-title,
.hi-dark h1, .hi-dark h2, .hi-dark h3, .hi-dark h4, .hi-dark h5 { color: var(--hi-cream-on-dark); }
.hi-dark .elementor-widget-text-editor,
.hi-dark .elementor-widget .elementor-icon-list-text { color: var(--hi-text-on-dark); }
.hi-dark .elementor-widget.hi-eyebrow .elementor-heading-title, .hi-dark .hi-eyebrow,
.hi-dark .hi-accent, .hi-dark .hi-accent-italic, .hi-dark .hi-link-arrow, .hi-dark .hi-link-arrow a { color: var(--hi-gold); }
.hi-dark .hi-icon { color: var(--hi-gold); }
.hi-dark .hi-divider { background: var(--hi-gold); }

/* ==========================================================================
   4. Typography helpers
   ========================================================================== */
.hi-eyebrow,
.elementor-widget.hi-eyebrow .elementor-heading-title {
	font-family: var(--hi-font-sans) !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	letter-spacing: 3.5px !important;
	text-transform: uppercase !important;
	line-height: 1.4 !important;
	color: var(--hi-gold-deep);
}
.hi-eyebrow--line .elementor-heading-title, span.hi-eyebrow--line { display: inline-flex; align-items: center; gap: 14px; }
.hi-eyebrow--line .elementor-heading-title::before, span.hi-eyebrow--line::before { content: ""; width: 32px; height: 1px; background: var(--hi-gold); }

.elementor-widget-heading h4.elementor-heading-title,
.elementor-widget-heading h5.elementor-heading-title { font-family: var(--hi-font-sans); font-weight: 500; letter-spacing: 0; }
.elementor-widget-heading h4.elementor-heading-title { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.3; }
.elementor-widget-heading h5.elementor-heading-title { font-size: 16px; line-height: 1.4; }

.hi-accent { color: var(--hi-gold-mid); }
.hi-accent-italic { color: var(--hi-gold-mid); font-style: italic; }
.hi-lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; }
.hi-balance .elementor-heading-title, .hi-balance { text-wrap: balance; }
.hi-measure { max-width: 60ch; }
.hi-divider { display: block; width: 48px; height: 1px; background: var(--hi-gold); border: 0; margin: 0; }
.hi-divider--center { margin-left: auto; margin-right: auto; }
.hi-stat .elementor-counter-number-wrapper, .hi-stat .elementor-heading-title { font-family: var(--hi-font-serif); color: var(--hi-gold-deep); font-weight: 500; }

/* ==========================================================================
   5. Buttons  (default = solid gold, set in Site Settings)
   ========================================================================== */
.elementor-button { transition: background-color var(--hi-speed) var(--hi-ease), color var(--hi-speed) var(--hi-ease), box-shadow var(--hi-speed) var(--hi-ease); }
.elementor-button .elementor-button-icon svg { fill: currentColor; transition: transform var(--hi-speed) var(--hi-ease); }
.elementor-button:hover .elementor-button-icon svg { transform: translateX(4px); }

.hi-btn-outline .elementor-button { background-color: transparent !important; color: var(--hi-ink) !important; box-shadow: inset 0 0 0 1px var(--hi-ink); }
.hi-btn-outline .elementor-button:hover { background-color: var(--hi-ink) !important; color: #fff !important; }
.hi-btn-dark .elementor-button { background-color: var(--hi-ink) !important; color: #fff !important; }
.hi-btn-dark .elementor-button:hover { background-color: var(--hi-gold) !important; color: var(--hi-ink) !important; }
.hi-dark .hi-btn-outline .elementor-button { color: var(--hi-gold) !important; box-shadow: inset 0 0 0 1px var(--hi-gold); }
.hi-dark .hi-btn-outline .elementor-button:hover { background-color: var(--hi-gold) !important; color: var(--hi-ink) !important; }

.hi-link-arrow, .hi-link-arrow a { display: inline-flex; align-items: center; gap: 10px; font-family: var(--hi-font-sans); font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hi-gold-deep); text-decoration: none; }
.hi-link-arrow::after, .hi-link-arrow a::after { content: "\2192"; transition: transform var(--hi-speed) var(--hi-ease); }
.hi-link-arrow:hover::after, .hi-link-arrow a:hover::after { transform: translateX(5px); }

/* ==========================================================================
   6. Cards & icons
   ========================================================================== */
.hi-card { background-color: var(--hi-white); border: 1px solid var(--hi-line); border-radius: var(--hi-radius-card); transition: border-color var(--hi-speed) var(--hi-ease), transform var(--hi-speed) var(--hi-ease), box-shadow var(--hi-speed) var(--hi-ease); }
.hi-card:hover { border-color: var(--hi-line-strong); transform: translateY(-4px); box-shadow: var(--hi-shadow); }
.hi-card--flat:hover { transform: none; box-shadow: none; }
.hi-card--light { background-color: var(--hi-white); }
.hi-dark .hi-card { background-color: #2A241E; border-color: var(--hi-line-dark); }

.hi-zoom { overflow: hidden; }
.hi-zoom img { transition: transform 0.9s var(--hi-ease); }
.hi-zoom:hover img { transform: scale(1.05); }

@media (min-width: 1025px) {
	.hi-cols-divided > .e-con-inner > .e-con:not(:last-child), .hi-cols-divided > .e-con:not(:last-child) { border-right: 1px solid var(--hi-line); }
}

.hi-icon { color: var(--hi-gold-mid); }
.hi-icon-ring { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border: 1px solid var(--hi-line-strong); border-radius: 50%; background: var(--hi-white); transition: border-color var(--hi-speed) var(--hi-ease), background-color var(--hi-speed) var(--hi-ease); }
.hi-icon-ring .hi-icon { --hi-icon-size: 32px; }
.hi-card:hover .hi-icon-ring, .hi-icon-ring:hover { border-color: var(--hi-gold); background-color: var(--hi-ivory); }

/* ==========================================================================
   7. Form fields (site-wide)
   ========================================================================== */
body input[type="text"], body input[type="email"], body input[type="tel"], body input[type="url"],
body input[type="number"], body input[type="search"], body input[type="password"], body input[type="date"],
body select, body textarea {
	width: 100%; background-color: var(--hi-white); color: var(--hi-ink); border: 1px solid var(--hi-sand); border-radius: var(--hi-radius);
	padding: 14px 16px; font-family: var(--hi-font-sans); font-size: 15px; line-height: 1.5; box-shadow: none;
	transition: border-color var(--hi-speed) var(--hi-ease), box-shadow var(--hi-speed) var(--hi-ease);
}
body input::placeholder, body textarea::placeholder { color: var(--hi-muted); opacity: 1; }
body input:focus, body select:focus, body textarea:focus { border-color: var(--hi-gold-deep); outline: none; box-shadow: 0 0 0 3px rgba(201, 163, 106, 0.2); }
.hi-dark input[type="text"], .hi-dark input[type="email"], .hi-dark input[type="tel"], .hi-dark select, .hi-dark textarea { background-color: #2A241E; color: var(--hi-cream-on-dark); border-color: var(--hi-line-dark); }
#wpadminbar input { width: auto; padding: 0 3px 0 24px; border: 0; background: transparent; box-shadow: none; }

/* ==========================================================================
   8. Header (Astra header builder)
   ========================================================================== */
#masthead { position: sticky; top: 0; z-index: 990; }
.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar #masthead { top: 46px; } }
@media (max-width: 600px) { .admin-bar #masthead { top: 0; } }

#masthead .ast-primary-header-bar,
#masthead .main-header-bar {
	background-color: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--hi-line);
	transition: box-shadow var(--hi-speed) var(--hi-ease), background-color var(--hi-speed) var(--hi-ease);
}
@supports (backdrop-filter: blur(8px)) {
	#masthead .ast-primary-header-bar, #masthead .main-header-bar { background-color: rgba(255, 255, 255, 0.88); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); }
}
.hi-scrolled #masthead .ast-primary-header-bar, .hi-scrolled #masthead .main-header-bar { box-shadow: 0 12px 32px -24px rgba(58, 45, 30, 0.35); }

#masthead .site-logo-img img, #masthead .custom-logo { max-height: 64px; width: auto; }
@media (max-width: 921px) { #masthead .site-logo-img img, #masthead .custom-logo { max-height: 52px; } }

/* Desktop menu links */
#masthead .main-header-menu > .menu-item > .menu-link {
	position: relative;
	font-family: var(--hi-font-sans);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.3px;
	color: var(--hi-ink);
	padding-left: 16px;
	padding-right: 16px;
	transition: color var(--hi-speed) var(--hi-ease);
}
#masthead .main-header-menu > .menu-item > .menu-link::after {
	content: ""; position: absolute; left: 16px; right: 16px; bottom: calc(50% - 15px); height: 1px;
	background: var(--hi-gold); transform: scaleX(0); transform-origin: left; transition: transform var(--hi-speed) var(--hi-ease);
}
#masthead .main-header-menu > .menu-item > .menu-link:hover,
#masthead .main-header-menu > .current-menu-item > .menu-link,
#masthead .main-header-menu > .current_page_item > .menu-link { color: var(--hi-gold-deep); }
#masthead .main-header-menu > .menu-item > .menu-link:hover::after,
#masthead .main-header-menu > .current-menu-item > .menu-link::after,
#masthead .main-header-menu > .current_page_item > .menu-link::after { transform: scaleX(1); }

/* Header "Inquire Now" button */
#masthead .ast-custom-button,
#masthead .ast-builder-button-wrap .ast-custom-button {
	font-family: var(--hi-font-sans); font-size: 12px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase;
	color: var(--hi-ink); background-color: var(--hi-gold); border: 0; border-radius: var(--hi-radius);
	padding: 13px 24px; line-height: 1; transition: background-color var(--hi-speed) var(--hi-ease), color var(--hi-speed) var(--hi-ease);
}
#masthead .ast-custom-button:hover { color: #fff; background-color: var(--hi-ink); }

/* Mobile header & menu */
#masthead .ast-mobile-menu-trigger-minimal, #masthead .menu-toggle { color: var(--hi-ink) !important; }
#masthead .ast-mobile-menu-trigger-minimal .ast-mobile-svg, #masthead .menu-toggle .ast-mobile-svg { fill: var(--hi-ink) !important; }
#masthead .ast-mobile-header-content, #masthead .ast-desktop-header-content { background-color: var(--hi-white); border-top: 1px solid var(--hi-line); }
#masthead .ast-mobile-header-content .menu-item > .menu-link, #masthead .ast-header-break-point .main-header-menu .menu-item > .menu-link {
	font-family: var(--hi-font-sans); font-size: 16px; color: var(--hi-ink); padding: 14px 20px; border-bottom: 1px solid var(--hi-line);
}
#masthead .ast-mobile-header-content .menu-item > .menu-link::after { display: none; }
#masthead .ast-mobile-header-content .current-menu-item > .menu-link { color: var(--hi-gold-deep); }

/* ==========================================================================
   9. Footer (inc/layout.php)
   ========================================================================== */
.hi-footer { background-color: var(--hi-cream); color: var(--hi-text); border-top: 1px solid var(--hi-line); font-family: var(--hi-font-sans); }
.hi-footer__inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.hi-footer__main { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; padding: clamp(56px, 7vw, 88px) 0 48px; }
.hi-footer__logo { display: inline-block; }
.hi-footer__logo-img { max-height: 64px; width: auto; }
.hi-footer__logo-text { font-family: var(--hi-font-serif); font-size: 28px; color: var(--hi-ink); }
.hi-footer__tagline { margin: 20px 0 24px; max-width: 34ch; font-size: 15px; line-height: 1.7; color: var(--hi-text); }
.hi-footer__title { margin: 6px 0 20px; font-family: var(--hi-font-sans); font-size: 12px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--hi-ink); }
.hi-footer__menu, .hi-footer__contact, .hi-footer__social, .hi-footer__legal { list-style: none; margin: 0; padding: 0; }
.hi-footer__menu li { margin: 0 0 12px; }
.hi-footer a { color: var(--hi-text); text-decoration: none; transition: color var(--hi-speed) var(--hi-ease); }
.hi-footer a:hover, .hi-footer a:focus-visible { color: var(--hi-gold-deep); }
.hi-footer__menu a { font-size: 15px; }
.hi-footer__contact li { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.hi-footer__contact .hi-icon { margin-top: 1px; }
.hi-footer__social { display: flex; gap: 10px; }
.hi-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--hi-line-strong); border-radius: 50%; color: var(--hi-ink); }
.hi-footer__social a:hover { background: var(--hi-ink); border-color: var(--hi-ink); color: #fff; }
.hi-footer__social svg { width: 17px; height: 17px; }
.hi-footer__signature { margin: 22px 0 0; font-family: var(--hi-font-serif); font-style: italic; font-size: 24px; color: var(--hi-gold-mid); }
.hi-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0 28px; border-top: 1px solid var(--hi-line); font-size: 13px; color: var(--hi-muted); }
.hi-footer__copy { margin: 0; }
.hi-footer__legal { display: flex; gap: 24px; }
.hi-footer__legal a { color: var(--hi-muted); }
@media (max-width: 1024px) {
	.hi-footer__main { grid-template-columns: repeat(2, 1fr); }
	.hi-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 544px) {
	.hi-footer__main { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
	.hi-footer__col:last-child { grid-column: 1 / -1; }
	.hi-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   10. Floating WhatsApp button
   ========================================================================== */
.hi-whatsapp {
	position: fixed; right: 20px; bottom: 20px; z-index: 995;
	display: inline-flex; align-items: center; gap: 10px; height: 56px; min-width: 56px; padding: 0 16px;
	border-radius: 999px; background: #128C7E; color: #fff; text-decoration: none;
	box-shadow: 0 14px 30px -12px rgba(18, 140, 126, 0.6);
	transition: transform var(--hi-speed) var(--hi-ease), box-shadow var(--hi-speed) var(--hi-ease);
}
.hi-whatsapp svg { width: 26px; height: 26px; flex-shrink: 0; }
.hi-whatsapp__label { font-family: var(--hi-font-sans); font-size: 14px; font-weight: 500; white-space: nowrap; max-width: 0; overflow: hidden; transition: max-width 0.45s var(--hi-ease); }
.hi-whatsapp:hover, .hi-whatsapp:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(18, 140, 126, 0.7); }
@media (hover: hover) and (min-width: 922px) { .hi-whatsapp:hover .hi-whatsapp__label { max-width: 120px; } }
@media (max-width: 544px) { .hi-whatsapp { right: 14px; bottom: 14px; height: 52px; min-width: 52px; padding: 0 13px; } }
#ast-scroll-top { bottom: 90px !important; }

/* ==========================================================================
   11. Astra / Elementor housekeeping
   ========================================================================== */
.ast-page-builder-template .site-content > .ast-container { max-width: 100%; padding: 0; }
.ast-page-builder-template .entry-header { display: none; }
.site-footer:empty { display: none; }


/* ==========================================================================
   Legal pages (Privacy Policy, Terms of Use) — plain WordPress content,
   no Elementor, styled to match the design system.
   ========================================================================== */

body.page-template-default .site-content .ast-container {
	background: var(--hi-ivory);
}

.hi-legal {
	max-width: 820px;
	margin: 0 auto;
	color: var(--hi-text);
	font-family: var(--hi-font-sans);
	font-size: 1.0625rem;
	line-height: 1.85;
}

.hi-legal > p:first-child em {
	display: inline-block;
	font-family: var(--hi-font-sans);
	font-style: normal;
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hi-gold-mid);
	border: 1px solid var(--hi-sand);
	border-radius: 999px;
	padding: 0.35em 1em;
	margin-bottom: 0.75rem;
}

.hi-legal h2 {
	font-family: var(--hi-font-serif);
	font-weight: 600;
	font-size: clamp(1.5rem, 3vw, 1.9rem);
	line-height: 1.25;
	color: var(--hi-ink);
	margin: 2.6rem 0 0.35rem;
	padding-top: 1.6rem;
	border-top: 1px solid var(--hi-sand);
}

.hi-legal h2:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.hi-legal h3 {
	font-family: var(--hi-font-sans);
	font-weight: 600;
	font-size: 1.0625rem;
	letter-spacing: 0.02em;
	color: var(--hi-ink);
	margin: 1.6rem 0 0.3rem;
}

.hi-legal p {
	margin: 0 0 1.1rem;
}

.hi-legal ul {
	margin: 0 0 1.4rem;
	padding: 0;
	list-style: none;
}

.hi-legal ul li {
	position: relative;
	padding-left: 1.6rem;
	margin-bottom: 0.6rem;
}

.hi-legal ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--hi-gold);
}

.hi-legal a {
	color: var(--hi-gold-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.hi-legal a:hover,
.hi-legal a:focus {
	color: var(--hi-burgundy);
}

@media (max-width: 782px) {
	.hi-legal {
		font-size: 1rem;
	}
}
