/*
 * Arnav Infosystem - homepage, Elementor layout adapter (Phase 4C).
 *
 * home.css styles the homepage through ai-* classes. In the Elementor layout those
 * same classes are set on Elementor containers and widgets (Advanced > CSS
 * Classes), so the design tokens, grids and hover behaviour are unchanged. This
 * file only (1) zeroes Elementor's own defaults that would change the spacing and
 * (2) maps classes that used to sit on a bare tag (h2, p, a, img) onto the
 * wrapper + inner element Elementor renders.
 *
 * Specificity is deliberately kept at 3 classes or fewer: the rules Elementor
 * generates from the editor controls use 4 (.elementor-{id} .elementor-element
 * .elementor-element-{id} .elementor-button), so anything an editor changes in
 * Elementor (typography, colours, padding, borders, shadows...) still wins.
 * Loaded only when the page is flagged as the Elementor homepage.
 */

/* ---------- Elementor defaults neutralised ---------- */

.ai-home {
	--kit-widget-spacing: 0px;
	--widgets-spacing: 0px;
	--widgets-spacing-row: 0px;
	--widgets-spacing-column: 0px;
}

.ai-home .e-con {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--gap: 0px;
	--row-gap: 0px;
	--column-gap: 0px;
}

/* Elementor makes every flex container 100% wide and wrapping on mobile; the layout's own CSS decides both. */
.ai-home .e-con.e-flex {
	--width: auto;
	--flex-wrap-mobile: nowrap;
}

.ai-home .elementor-widget {
	width: auto;
}

/* Elementor puts a bottom margin on every widget but the last; the layout sets its own. */
.ai-home .ai-eyebrow.elementor-widget { margin-bottom: 6px; }
.ai-home .ai-eyebrow--cat.elementor-widget { margin-bottom: 0; }
.ai-home .ai-popular__label.elementor-widget { margin-bottom: 8px; }

.ai-home .elementor-widget-text-editor {
	font-family: inherit;
}

/* The kit sets a typography on list items and their links; the layout's own typography is inherited instead. */
.ai-home .elementor-widget-icon-list .elementor-icon-list-item > a,
.ai-home .elementor-widget-icon-list .elementor-icon-list-item > .elementor-icon-list-text {
	font: inherit;
}

.ai-home .elementor-widget-text-editor {
	font-weight: inherit;
}

/* max-width set on a text widget in home.css (loses to Elementor's .e-con > .elementor-widget rule at equal specificity). */
.ai-home .elementor .e-con > .ai-hero__sub.elementor-widget { max-width: 28rem; }
.ai-home .elementor .e-con > .ai-refurb__text.elementor-widget { max-width: 28rem; }
.ai-home .elementor .e-con > .ai-cover__text.elementor-widget { max-width: 42rem; }

.ai-home a.e-con {
	color: inherit;
	text-decoration: none;
}

/* Auto side margins on a flex item switch off stretching: give them the full width back. */
.ai-home .ai-wrap,
.ai-home .ai-news,
.ai-home .ai-popular {
	width: 100%;
}

/* Headings are rendered as <hN class="elementor-heading-title"> inside the widget: inherit the ai-* typography set on the wrapper. */
.ai-home .elementor-widget-heading .elementor-heading-title {
	margin: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-decoration: inherit;
}

.ai-home .elementor-widget-text-editor p {
	margin: 0;
	color: inherit;
}

.ai-home .elementor-widget-html {
	flex: none;
}

/* A bare icon SVG in an HTML widget would sit in a text line box; the old markup had it as a flex item. */
.ai-home .elementor-widget-html .ai-icon {
	display: block;
}

.ai-home .elementor-widget-html,
.ai-home .elementor-widget-shortcode {
	max-width: 100%;
}

/* Elementor containers default to a column; these were flex rows in the legacy markup. */
.ai-home .ai-hero,
.ai-home .ai-hero__actions,
.ai-home .ai-chips,
.ai-home .ai-quick,
.ai-home .ai-refurb__points,
.ai-home .ai-why__item,
.ai-home .ai-cover__head,
.ai-home .ai-guide__top,
.ai-home .ai-guide__foot,
.ai-home .ai-promo__cta {
	flex-direction: row;
}

.ai-home .ai-hero {
	justify-content: flex-start;
}

/* ---------- 01 Hero ---------- */

.ai-home .ai-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	opacity: 0.45;
}

.ai-home .ai-hero__img .elementor-widget-container,
.ai-home .ai-hero__img img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ai-home .ai-hero__img img {
	border-radius: 0;
}

.ai-home .ai-hero__content {
	width: 100%;
}

/* ---------- Buttons (Elementor button widget) ---------- */

.ai-home .ai-eb {
	flex: none;
	width: auto;
}

.ai-home .ai-eb .elementor-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-family: inherit;
	line-height: 1.5;
	text-decoration: none;
	white-space: nowrap;
}

.ai-home .ai-eb .elementor-button-content-wrapper {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ai-home .ai-eb .elementor-button-text {
	line-height: inherit;
}

/* Arrow icon after the label (Lucide arrow-right, same path as the PHP icon). */
.ai-home .ai-eb--viewall .elementor-button-text::after,
.ai-home .ai-eb--outline .elementor-button-text::after,
.ai-home .ai-eb--refurb .elementor-button-text::after,
.ai-home .ai-eb--quote .elementor-button-text::before {
	content: "";
	display: inline-block;
	flex: none;
	width: 16px;
	height: 16px;
	margin-left: 6px;
	background: currentColor;
	vertical-align: -3px;
	-webkit-mask: var(--ai-ic-arrow) center / contain no-repeat;
	mask: var(--ai-ic-arrow) center / contain no-repeat;
}

.ai-home .ai-eb--viewall .elementor-button-text::after {
	width: 14px;
	height: 14px;
	margin-left: 4px;
	vertical-align: -2px;
}

.ai-home .ai-eb--quote .elementor-button-text::before {
	margin: 0 6px 0 0;
	-webkit-mask-image: var(--ai-ic-file);
	mask-image: var(--ai-ic-file);
}

.ai-home {
	--ai-ic-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
	--ai-ic-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z'/%3E%3Cpath d='M14 2v5a1 1 0 0 0 1 1h5'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}

/* Hero buttons */
.ai-home .ai-eb--hero .elementor-button {
	height: 44px;
	padding: 0 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--ai-radius);
	font-size: var(--ai-t-base);
	font-weight: 600;
	transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

.ai-home .ai-eb--hero .elementor-button:hover { transform: translateY(-2px); }

.ai-home .ai-eb--hero-primary .elementor-button {
	background: var(--ai-primary);
	color: #fff;
	box-shadow: var(--ai-shadow-elevated);
}

.ai-home .ai-eb--hero-primary .elementor-button:hover {
	background: rgba(0, 87, 217, 0.8);
	color: #fff;
}

.ai-home .ai-eb--hero-outline .elementor-button {
	border-color: rgba(203, 213, 225, 0.4);
	background: transparent;
	color: #f8fafc;
}

.ai-home .ai-eb--hero-outline .elementor-button:hover {
	background: rgba(248, 250, 252, 0.1);
	color: #fff;
}

/* "View All" link (category section) */
.ai-home .ai-eb--viewall .elementor-button {
	gap: 4px;
	color: var(--ai-muted);
	font-size: var(--ai-t-xs);
	font-weight: 500;
}

.ai-home .ai-eb--viewall .elementor-button:hover { color: var(--ai-primary); }

/* "View All" outlined button (product sections): stretches full width when the head stacks on mobile, like the old flex item. */
.ai-home .ai-eb--outline .elementor-button {
	display: flex;
	width: 100%;
	height: 32px;
	padding: 0 10px;
	border: 1px solid var(--ai-border);
	border-radius: 8px;
	background: var(--ai-background);
	color: var(--ai-text);
	font-size: var(--ai-t-sm);
	font-weight: 500;
	transition: box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
}

.ai-home .ai-eb--outline .elementor-button:hover {
	border-color: rgba(31, 99, 240, 0.5);
	background: #f1f5f9;
	color: var(--ai-text);
	box-shadow: var(--ai-glow);
}

/* Category chips */
.ai-home .ai-eb--chip .elementor-button {
	padding: 6px 14px;
	border: 1px solid var(--ai-border);
	border-radius: 9999px;
	color: var(--ai-muted);
	font-size: var(--ai-t-xs);
	font-weight: 600;
	line-height: 1.33;
	transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.ai-home .ai-eb--chip .elementor-button:hover {
	border-color: rgba(31, 99, 240, 0.5);
	background: var(--ai-blue-50);
	color: var(--ai-primary);
}

/* Refurbished banner button */
.ai-home .ai-eb--refurb {
	align-self: flex-start;
	margin-top: 24px;
}

.ai-home .ai-eb--refurb .elementor-button {
	height: 36px;
	padding: 0 11px;
	border-radius: 10px;
	background: var(--ai-orange);
	box-shadow: var(--ai-shadow-elevated);
	color: #fff;
	font-size: var(--ai-t-sm);
	font-weight: 500;
	transition: transform 0.2s, background-color 0.2s;
}

.ai-home .ai-eb--refurb .elementor-button:hover {
	background: var(--ai-orange-dark);
	color: #fff;
	transform: translateY(-2px);
}

/* ---------- Section heads ---------- */

.ai-home .ai-head > .ai-eb {
	flex: none;
}

/*
 * Elementor's own container rule (flex-direction: column) out-ranks the plain .ai-head rules in home.css,
 * so the title block was pushed to the right (column + align-items: flex-end). Restate the intended
 * direction with a selector that includes the container class: title left, "View all" right on tablet and
 * desktop (--plain and --cat are rows at every width), stacked and left-aligned on phones.
 */
.ai-home .e-con.ai-head--plain,
.ai-home .e-con.ai-head--cat {
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
}

@media (min-width: 640px) {
	.ai-home .e-con.ai-head {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
}

@media (max-width: 639px) {
	.ai-home .e-con.ai-head:not(.ai-head--plain):not(.ai-head--cat) {
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
	}
}

/* ---------- 03 Quick access ---------- */

.ai-home .ai-quick__label {
	flex: 1;
	min-width: 0;
}

.ai-home .ai-quick__label .elementor-heading-title {
	display: block;
	line-height: 1.3;
	overflow-wrap: break-word;
	white-space: normal;
}

.ai-home .ai-quick__arrow {
	display: none; /* hover-only decoration; its space is needed for the full category name */
	color: var(--ai-muted);
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity 0.2s, transform 0.2s;
}

.ai-home a.ai-quick:hover .ai-quick__arrow {
	opacity: 1;
	transform: none;
}

.ai-home .ai-quick__arrow .elementor-widget-container {
	display: flex;
}

/* ---------- 09 Enterprise ---------- */

.ai-home .ai-ent__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
}

.ai-home .ai-ent__img .elementor-widget-container {
	width: 100%;
	height: 100%;
}

.ai-home .ai-ent__img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 0.6;
	transition: transform 0.3s;
}

.ai-home a.ai-ent:hover .ai-ent__img img { transform: scale(1.05); }

.ai-home .ai-ent__body {
	position: relative;
	width: 100%;
}

.ai-home .ai-ent__text {
	display: block;
	overflow: visible;
}

.ai-home .ai-ent__text p {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.ai-home .ai-ent__cta {
	align-self: flex-start;
}

.ai-home .ai-ent__cta .elementor-heading-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ai-home .ai-ent__cta .elementor-heading-title::after {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: var(--ai-ic-arrow) center / contain no-repeat;
	mask: var(--ai-ic-arrow) center / contain no-repeat;
}

/* ---------- 10 Refurbished ---------- */

.ai-home .ai-refurb__badge {
	align-self: flex-start;
	flex-direction: row;
	align-items: center;
	margin-top: 1px; /* the old inline-flex badge sat in a text line box that added this much */
}

.ai-home .ai-refurb__badge .elementor-heading-title {
	font: inherit;
}

.ai-home .ai-refurb__badge .ai-icon {
	width: 14px;
	height: 14px;
}

.ai-home .ai-refurb__points {
	flex-direction: row;
}

.ai-home .ai-refurb__pt {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
	color: var(--ai-muted);
	font-size: var(--ai-t-xs);
	font-weight: 500;
	line-height: 1.3333;
}

.ai-home .ai-refurb__pt .ai-icon { color: var(--ai-accent); }

.ai-home .ai-refurb__media > .elementor-widget {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.ai-home .ai-refurb__media .elementor-widget-container {
	width: 100%;
	height: 100%;
}

.ai-home .ai-refurb__media img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	filter: drop-shadow(0 20px 13px rgba(0, 0, 0, 0.03)) drop-shadow(0 8px 5px rgba(0, 0, 0, 0.08));
}

/* ---------- 11 Why choose ---------- */

.ai-home .ai-why__item {
	flex-direction: row;
}

.ai-home .ai-why__item .elementor-widget-html {
	flex: none;
	margin-top: 2px;
	color: var(--ai-accent);
}

/* ---------- 12 India coverage ---------- */

.ai-home .ai-cover__head {
	flex-direction: row;
}

.ai-home .ai-cover__pin {
	display: inline-flex;
}

.ai-home .ai-cover__cities .elementor-icon-list-items {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ai-home .ai-cover__cities .elementor-icon-list-item {
	display: block;
	margin: 0;
	padding: 8px 16px;
	border: 1px solid var(--ai-border);
	border-radius: 9999px;
	background: var(--ai-background);
	box-shadow: var(--ai-shadow-card);
	color: var(--ai-text);
	font-size: var(--ai-t-sm);
	font-weight: 500;
}

.ai-home .ai-cover__cities .elementor-icon-list-text {
	padding: 0;
	color: inherit;
	font: inherit;
}

.ai-home .ai-cover__map > .elementor-widget,
.ai-home .ai-cover__map .elementor-widget-container {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
}

/* ---------- 13 Buying guides ---------- */

.ai-home .ai-guide__top {
	flex-direction: row;
}

.ai-home .ai-guide__pill {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	width: auto;
}

.ai-home .ai-guide__text {
	display: block;
	overflow: visible;
}

.ai-home .ai-guide__text p {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.ai-home .ai-guide__time,
.ai-home .ai-guide__more {
	flex-direction: row;
	align-items: center;
}

.ai-home .ai-guide__foot {
	flex-direction: row;
}

/* ---------- 14 Promos ---------- */

.ai-home .ai-promo__cta {
	flex-direction: row;
	align-items: center;
}

/* ---------- 15 Newsletter ---------- */

.ai-home .ai-news__form-wrap {
	width: 100%;
	text-align: left;
}

/* ---------- 16 Popular categories ---------- */

.ai-home .ai-popular__list .elementor-icon-list-items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ai-home .ai-popular__list .elementor-icon-list-item {
	display: block;
	margin: 0;
	padding: 0;
	line-height: inherit;
}

.ai-home .ai-popular__list .elementor-icon-list-item a {
	display: inline;
	color: var(--ai-text);
}

.ai-home .ai-popular__list .elementor-icon-list-item a:hover {
	color: var(--ai-primary);
	text-decoration: underline;
}

.ai-home .ai-popular__list .elementor-icon-list-text {
	padding: 0;
	color: inherit;
}
