/*
 * elementor.css — Elementor compatibility for Vitalcare theme
 * Loaded only when Elementor is active.
 */

/* ─── Font registration ─── */
.elementor-widget-text-editor,
.elementor-widget-heading,
.elementor-widget-button { font-family: var(--vc-font-body); }

/* Expose Vitalcare CSS variables to Elementor's context */
:root {
	--e-global-color-primary: #1B2E6B;
	--e-global-color-secondary: #D4A843;
	--e-global-color-text: #374151;
	--e-global-color-accent: #1B2E6B;
	--e-global-typography-primary-font-family: 'Playfair Display';
	--e-global-typography-secondary-font-family: 'DM Sans';
}

/* ─── Blank canvas template (no restrictions) ─── */
.vc-main--blank .elementor { max-width: none; }

.vc-main--blank .elementor-section.elementor-section-full_width { max-width: none; }

/* ─── Elementor sections inside themed pages ─── */
.elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--vc-container-max);
}

/* ─── Typography harmonisation ─── */
.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3 {
	font-family: var(--vc-font-display);
	color: var(--vc-navy);
	line-height: 1.2;
}

.elementor-widget-heading h4,
.elementor-widget-heading h5,
.elementor-widget-heading h6 {
	font-family: var(--vc-font-body);
	color: var(--vc-navy);
}

/* ─── Button harmonisation ─── */
.elementor-button {
	font-family: var(--vc-font-body) !important;
	font-weight: 600 !important;
	border-radius: var(--vc-radius-md) !important;
	transition: background var(--vc-transition), transform var(--vc-transition) !important;
}

.elementor-button:hover { transform: translateY(-2px); }

/* Navy button variant */
.elementor-button.vc-btn-navy,
.elementor-button[data-vc-btn="navy"] {
	background: var(--vc-navy) !important;
	color: #fff !important;
}

.elementor-button.vc-btn-navy:hover,
.elementor-button[data-vc-btn="navy"]:hover { background: #162457 !important; }

/* Gold button variant */
.elementor-button.vc-btn-gold,
.elementor-button[data-vc-btn="gold"] {
	background: var(--vc-gold) !important;
	color: var(--vc-navy) !important;
}

.elementor-button.vc-btn-gold:hover,
.elementor-button[data-vc-btn="gold"]:hover { background: #c49630 !important; }

/* ─── Image widget ─── */
.elementor-widget-image img {
	border-radius: var(--vc-radius-md);
}

/* ─── Divider ─── */
.elementor-widget-divider .elementor-divider-separator { border-color: var(--vc-border); }

/* ─── Icon box ─── */
.elementor-widget-icon-box .elementor-icon-box-icon .elementor-icon {
	color: var(--vc-navy);
	transition: color var(--vc-transition), transform var(--vc-transition);
}

.elementor-widget-icon-box:hover .elementor-icon-box-icon .elementor-icon {
	color: var(--vc-gold);
	transform: scale(1.1);
}

.elementor-widget-icon-box .elementor-icon-box-title {
	font-family: var(--vc-font-display);
	color: var(--vc-navy);
}

/* ─── Testimonials / Slides ─── */
.elementor-testimonial__content { font-style: italic; color: var(--vc-text-secondary); }
.elementor-testimonial__name { font-weight: 700; color: var(--vc-navy); }

/* ─── Counter widget ─── */
.elementor-counter .elementor-counter-number-wrapper {
	font-family: var(--vc-font-display);
	color: var(--vc-navy);
	font-weight: 700;
}

/* ─── Accordion / Toggle ─── */
.elementor-accordion .elementor-accordion-item {
	border: 1px solid var(--vc-border);
	border-radius: var(--vc-radius-md);
	margin-bottom: 0.625rem;
	overflow: hidden;
}

.elementor-accordion .elementor-tab-title {
	background: var(--vc-surface);
	color: var(--vc-navy);
	font-weight: 600;
	padding: 1rem 1.25rem;
}

.elementor-accordion .elementor-tab-title.elementor-active {
	background: var(--vc-navy);
	color: #fff;
}

.elementor-accordion .elementor-tab-content {
	padding: 1rem 1.25rem;
	color: var(--vc-text-secondary);
	background: #fff;
}

/* ─── Tabs ─── */
.elementor-tabs .elementor-tab-mobile-title { display: none; }

.elementor-tabs .elementor-tabs-wrapper {
	border-bottom: 2px solid var(--vc-border);
	display: flex;
	gap: 0;
}

.elementor-tabs .elementor-tab-title a {
	display: block;
	padding: 0.75rem 1.5rem;
	color: var(--vc-text-muted);
	font-weight: 600;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	text-decoration: none;
	transition: color var(--vc-transition), border-color var(--vc-transition);
}

.elementor-tabs .elementor-tab-title.elementor-active a {
	color: var(--vc-navy);
	border-bottom-color: var(--vc-navy);
}

/* ─── Form widget ─── */
.elementor-form .elementor-field-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--vc-navy);
	margin-bottom: 0.375rem;
}

.elementor-form .elementor-field {
	border: 1.5px solid var(--vc-border) !important;
	border-radius: var(--vc-radius-md) !important;
	padding: 0.75rem 1rem !important;
	font-family: var(--vc-font-body) !important;
}

.elementor-form .elementor-field:focus {
	border-color: var(--vc-navy) !important;
	box-shadow: 0 0 0 3px rgba(27,46,107,0.1) !important;
}

.elementor-form .elementor-button {
	background: var(--vc-navy) !important;
	color: #fff !important;
}

/* ─── Section backgrounds ─── */
.elementor-section.elementor-section--navy { background: var(--vc-navy) !important; }
.elementor-section.elementor-section--surface { background: var(--vc-surface) !important; }

/* ─── Flex / Grid column gap fix ─── */
.elementor-column .elementor-widget-wrap { gap: 0; }

/* ─── Popup / modal ─── */
.elementor-popup-modal .elementor-popup-modal__overlay { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }

.elementor-popup-modal .dialog-widget-content {
	border-radius: var(--vc-radius-lg);
	overflow: hidden;
}

/* ─── z-index fix for sticky header ─── */
.elementor-sticky--effects { z-index: 997; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
	.elementor-section.elementor-section-boxed > .elementor-container {
		padding: 0 var(--vc-container-px);
	}
}
