/**
 * StudySA Design Phase 2 — controlled UI/UX fixes.
 * Preserves Elementor editability; no content/URL/SEO changes.
 */
/* ---- Overflow safety ---- */
html, body {
	overflow-x: clip;
	max-width: 100%;
}

/* ---- Accent CTAs: white text on #EE4036 (contrast) ---- */
.elementor-button[style*="238, 64, 54"],
.elementor-button[style*="#EE4036"],
.elementor-button[style*="#ee4036"],
a.elementor-button.elementor-size-sm,
.elementor-element .elementor-button {
	/* do not blanket-override all buttons */
}
/* Homepage AbstractHub / accent-filled buttons */
.elementor-widget-button a.elementor-button:where([style*="background-color:#EE4036"], [style*="background-color: #EE4036"], [style*="background-color:#ee4036"]) {
	color: #fff !important;
}

/* Safer: any button whose computed bg is brand accent gets white text via utility */
.ssa-btn-accent,
.elementor-button.ssa-btn-accent,
a.ssa-btn-accent {
	color: #fff !important;
}

/* When Elementor sets accent as background via kit secondary */
.elementor-button.elementor-button-link {
	/* leave links alone */
}

/* Force white text when Elementor uses secondary/accent fill classes commonly set after colorpass */
.elementor-element[data-widget_type="button.default"] a.elementor-button[class*="elementor-animation"] {
	/* no-op placeholder */
}

/* Explicit fix for known AbstractHub CTA pattern on home: accent bg + dark text */
body.home .elementor-widget-button a.elementor-button {
	/* only upgrade when bg is accent-like — handled below via attribute selectors from common Elementor inline */
}

/* Elementor often stores colors in CSS vars on the button wrapper */
.elementor-button {
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.elementor-button:hover,
.elementor-button:focus {
	text-decoration: none;
}

/* ---- Header: logo + CTA mobile breathing room ---- */
.elementor-location-header .elementor-widget-image img,
.elementor-location-header img[src*="study-logo"] {
	height: auto !important;
	max-height: 72px;
	width: auto !important;
	max-width: 120px;
	object-fit: contain;
}

.elementor-location-header .elementor-button {
	white-space: nowrap;
	padding: 0.65em 1.15em !important;
	font-size: 0.92rem !important;
	line-height: 1.3 !important;
}

@media (max-width: 1024px) {
	.elementor-location-header .elementor-widget-image img,
	.elementor-location-header img[src*="study-logo"] {
		max-height: 56px;
		max-width: 96px;
	}
	.elementor-location-header .elementor-button {
		padding: 0.55em 0.85em !important;
		font-size: 0.82rem !important;
	}
	.elementor-location-header .elementor-nav-menu--dropdown {
		max-width: 100vw;
	}
}

@media (max-width: 767px) {
	.elementor-location-header .elementor-container,
	.elementor-location-header .e-con {
		gap: 0.35rem !important;
	}
	.elementor-location-header .elementor-widget-image img,
	.elementor-location-header img[src*="study-logo"] {
		max-height: 48px;
		max-width: 84px;
	}
	.elementor-location-header .elementor-button {
		padding: 0.5em 0.7em !important;
		font-size: 0.78rem !important;
		border-radius: 8px !important;
	}
	/* Reduce header vertical bulk */
	.elementor-location-header .elementor-widget-image,
	.elementor-location-header .elementor-widget-button,
	.elementor-location-header .elementor-widget-nav-menu {
		margin: 0 !important;
	}
}

/* ---- Footer logo visibility: scoped to logo only (critical repair) ---- */
.elementor-location-footer .ssa-footer-logo img,
.elementor-location-footer img[src*="study-logo"],
.site-footer .footer-logo {
	max-height: 64px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.elementor-location-footer a:hover,
.elementor-location-footer a:focus {
	/* accent hover handled in footer-critical.css for dark footer */
}

/* ---- Cards / service presentation ---- */
.elementor-widget-image-box .elementor-image-box-title,
.elementor-widget-icon-box .elementor-icon-box-title {
	line-height: 1.45;
	overflow-wrap: anywhere;
	color: var(--ssa-color-primary);
}
.elementor-widget-image-box .elementor-image-box-description,
.elementor-widget-icon-box .elementor-icon-box-description {
	color: var(--ssa-color-text);
	line-height: 1.75;
}
.service-card-link,
.elementor-widget-image-box a,
a.elementor-button-link {
	font-weight: 600;
}
.service-card-link:hover,
.service-card-link:focus {
	color: var(--ssa-color-accent);
}

/* ---- Blog cards / long Arabic titles ---- */
.elementor-widget-theme-post-title .elementor-heading-title,
.elementor-post__title,
.elementor-post__title a,
.elementor-loop-container .elementor-heading-title {
	line-height: 1.45;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.elementor-posts-container .elementor-post {
	border-color: var(--ssa-color-border);
}
.elementor-post__read-more,
.elementor-post__meta-data {
	color: var(--ssa-color-text-muted);
}

/* Blog content tables overflow */
.ssa-post-content table,
.elementor-widget-theme-post-content table,
.entry-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ---- Forms ---- */
.elementor-field-group input,
.elementor-field-group textarea,
.elementor-field-group select,
.wpcf7 input,
.wpcf7 textarea,
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
	border-color: var(--ssa-color-border) !important;
	color: var(--ssa-color-text);
	border-radius: var(--ssa-radius-sm);
}
.elementor-field-group input:focus,
.elementor-field-group textarea:focus,
input:focus,
textarea:focus {
	outline: 2px solid var(--ssa-color-primary);
	outline-offset: 1px;
	border-color: var(--ssa-color-primary) !important;
}

/* ---- Hero slides: keep controls touch-friendly; don't fight artwork ---- */
.elementor-widget-slides .elementor-swiper-button {
	width: 44px;
	height: 44px;
}
.elementor-widget-slides .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
}
@media (max-width: 767px) {
	.elementor-widget-slides .elementor-slides-wrapper,
	.elementor-widget-slides .swiper,
	.elementor-widget-slides .swiper-slide {
		min-height: 200px;
	}
	/* Prefer showing more of designed slide art on narrow screens */
	.elementor-widget-slides .swiper-slide-bg {
		background-size: contain !important;
		background-repeat: no-repeat !important;
		background-position: center center !important;
		background-color: var(--ssa-color-primary) !important;
	}
}

/* ---- Section rhythm ---- */
.elementor-top-section,
.e-con.e-parent {
	/* avoid colliding with Elementor spacing controls; light polish only */
}
body .elementor-widget-heading .elementor-heading-title {
	color: inherit;
}

/* ---- CPT / landing related blocks from SEO mu-plugin stay subtle ---- */
.ssa-related-services,
.ssa-service-internal-links,
.ssa-hub-landings {
	border-top-color: var(--ssa-color-border);
}
.ssa-related-services a,
.ssa-service-internal-links a {
	color: var(--ssa-color-primary);
}
.ssa-related-services a:hover,
.ssa-service-internal-links a:hover {
	color: var(--ssa-color-accent);
}

/* ---- WhatsApp green only when marked ---- */
a[href*="wa.me"],
a[href*="whatsapp"],
a[href*="api.whatsapp.com"] {
	/* soft cue without forcing all greens */
}
a.ssa-btn-whatsapp,
.ssa-btn-whatsapp {
	background: var(--ssa-color-whatsapp) !important;
	color: #fff !important;
}
