/**
 * Home page hero carousel (front-page.html).
 *
 * Each slide is a core Cover block (real photo + dimRatio scrim),
 * editable/replaceable from the Site Editor. This file only styles
 * the text content placed inside each cover and recolors the
 * carousel-block plugin's nav/pagination controls.
 */

.chennai-world-hero-carousel .cb-slide {
	display: flex;
}

.chennai-world-hero-carousel .cb-slide .wp-block-cover {
	width: 100%;
}

/* max-width matches the 1100px contentSize other alignfull sections use
   (see e.g. front-page.html's "Everything the city..." section) so the
   hero content sits at the same standard left edge as the rest of the
   page, instead of being centered as a narrow block. The heading/copy
   elements below still cap their own line length via ch units. */
.chennai-world-hero-panel .wp-block-cover__inner-container {
	/* Cover blocks default this to content-box (for their own
	   aspect-ratio math), so max-width was only capping the content
	   area, with padding added on top of it — meaning any *change* to
	   the padding values changed the box's total rendered width, which
	   this box's own centering (the Cover's justify-content:center)
	   is sensitive to. border-box makes max-width mean the box's total
	   width, padding included, matching what HOME-001's measurement
	   below actually assumed. */
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	max-width: 1100px;
	margin: 0;
	/*
	 * Left is 0, not spacing--40: with border-box, this box's own left
	 * edge already lands at the exact same 170px standard content edge
	 * the rest of the page uses (verified live) — any left padding here
	 * would just add a second, redundant inset on top of that and push
	 * the heading past where every other section's heading starts.
	 * Right is intentionally larger than top/bottom — a deliberate
	 * deviation from the design — to keep the heading/copy clear of the
	 * prev/next arrows, which sit ~2rem+ in from the slide's actual edge
	 * (not this box's edge) at viewports where this 1100px box is close
	 * to the slide's full width.
	 */
	padding: var(--wp--preset--spacing--40) 5.5rem var(--wp--preset--spacing--40) 0;
}

.chennai-world-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	background-color: rgba(16, 18, 21, 0.45);
	color: #f2ede3;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
}

.chennai-world-hero-eyebrow > * {
	margin: 0;
}

.chennai-world-hero-eyebrow-dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent-gold);
}

.chennai-world-hero-heading {
	max-width: 20ch;
	margin: 0 0 1.5rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxx-large);
	font-weight: 300;
	line-height: 0.94;
	letter-spacing: -0.03em;
	color: #f2ede3;
	text-align: left;
}

.chennai-world-hero-heading em {
	color: var(--wp--preset--color--accent-gold);
	font-style: italic;
}

.chennai-world-hero-copy {
	max-width: 42ch;
	margin: 0 0 2rem;
	color: rgba(242, 237, 227, 0.85);
	font-size: var(--wp--preset--font-size--large);
	text-align: left;
}

.chennai-world-hero-ctas {
	gap: 1rem;
}

.chennai-world-hero-ctas .chennai-world-cta-button--outline {
	color: #f2ede3;
	border-color: #f2ede3;
}

/*
 * WP's own "constrained" layout support centers each direct child
 * individually via `margin-left/right: auto !important` (generated
 * per-block in the global-styles stylesheet) — !important is required
 * here too, matching specificity/order alone can't win against it.
 * Heading/copy are excluded: this blanket rule was also forcing their
 * own deliberate `max-width: 20ch`/`42ch` caps up to `100% !important`
 * (of the now-1100px-wide container from the HOME-001 fix above),
 * which let the paragraph stretch nearly full-slide-width and read
 * into the carousel arrows at viewports around ~1024–1200px wide —
 * confirmed live before this exclusion was added.
 */
.chennai-world-hero-panel .wp-block-cover__inner-container > *:not(.chennai-world-hero-heading):not(.chennai-world-hero-copy) {
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/*
 * Heading/copy still need WP's auto-centering margins zeroed out (the
 * same `margin-left/right: auto !important` this file already documents
 * above) — excluding them from the rule above to keep their own
 * max-width also re-exposed them to that centering, which pushed the
 * heading ~355px in from the box's left edge instead of sitting at its
 * padding-left. This keeps the margin reset without forcing max-width.
 */
.chennai-world-hero-panel .wp-block-cover__inner-container > .chennai-world-hero-heading,
.chennai-world-hero-panel .wp-block-cover__inner-container > .chennai-world-hero-copy {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/*
 * The exact 170px edge match only holds up where the 1100px contentSize
 * still leaves a real centering gap (roughly ≥1280px viewports) — below
 * that, the gap shrinks toward 0 and this box's left edge (and the
 * text's, since it has no left padding of its own) approaches the
 * prev/next arrows' fixed ~32–76px position, overlapping them. Confirmed
 * live at 1100px. Since the arrows are only shown above 768px (hidden
 * below by the rule further down), add clearance back just in this
 * band — wide enough that the standard-edge match at 1440px+ (where the
 * audit measured it) is untouched.
 */
@media (min-width: 769px) and (max-width: 1279.98px) {

	.chennai-world-hero-panel .wp-block-cover__inner-container {
		padding-left: 5rem;
	}
}

/*
 * The plugin's own inline stylesheet reserves flow space below the
 * carousel for its pagination dots — `.wp-block-cb-carousel-v2
 * [data-cb-pagination="true"] .swiper-horizontal { margin-bottom:
 * calc(pagination-bullet-size * 4) }`, 32px at this carousel's 8px
 * bullet size — on the assumption the dots sit in normal flow below
 * the slide. Ours instead absolutely-positions them as an overlay
 * inside the slide (see --pagination-bottom below), so that reserved
 * margin is just a dead gap between the carousel and the next
 * section. Chaining both classes ties this rule's specificity with
 * the plugin's 3-class selector above; our stylesheet loading after
 * the plugin's inline one settles it (same tie-breaking approach
 * already used for the plugin's arrow rules in services.css).
 */
.wp-block-cb-carousel-v2.chennai-world-hero-carousel .swiper-horizontal {
	margin-bottom: 0;
}

/* Recolor the carousel-block plugin's default nav/pagination to the
   site's palette via the CSS custom properties its own stylesheet reads. */
.chennai-world-hero-carousel {
	--wp--custom--carousel-block--navigation-alignfull-color: #f2ede3;
	--wp--custom--carousel-block--navigation-hover-color: var(--wp--preset--color--accent-gold);
	--wp--custom--carousel-block--navigation-size: 20px;
	--wp--custom--carousel-block--navigation-sides-offset: 2rem;
	--wp--custom--carousel-block--pagination-bottom: 2.5rem;
	--wp--custom--carousel-block--pagination-bullet-size: 8px;
	--wp--custom--carousel-block--pagination-bullet-active-color: var(--wp--preset--color--accent-gold);
	--wp--custom--carousel-block--pagination-bullet-inactive-color: rgba(242, 237, 227, 0.5);
	--wp--custom--carousel-block--pagination-bullet-inactive-hover-color: #f2ede3;
}

.chennai-world-hero-carousel .cb-button-prev,
.chennai-world-hero-carousel .cb-button-next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin-top: -1.375rem;
	border-radius: 50%;
	background-color: rgba(16, 18, 21, 0.45);
}

@media (max-width: 768px) {

	.chennai-world-hero-heading {
		font-size: var(--wp--preset--font-size--xx-large);
	}

	.chennai-world-hero-copy {
		font-size: var(--wp--preset--font-size--medium);
	}

	.chennai-world-hero-carousel .cb-button-prev,
	.chennai-world-hero-carousel .cb-button-next {
		display: none;
	}

	/*
	 * With the prev/next arrows hidden at this width, the left-aligned
	 * layout (built to share the standard content edge with the rest of
	 * the page, and to stay clear of the now-gone arrows) no longer has
	 * a reason to stay left-aligned — centered reads better for a
	 * single-column mobile hero. Padding goes back to symmetric since
	 * the asymmetric left/right split from the desktop arrow-clearance
	 * fix doesn't apply here either.
	 */
	.chennai-world-hero-panel .wp-block-cover__inner-container {
		align-items: center;
		padding: var(--wp--preset--spacing--40) 1.25rem;
	}

	.chennai-world-hero-eyebrow,
	.chennai-world-hero-heading,
	.chennai-world-hero-copy {
		text-align: center;
	}

	.chennai-world-hero-ctas {
		justify-content: center;
	}
}
