/* =========================================================
   HOMEPAGE ABOUT SECTION — [endo_about]
   Department of Endocrinology, CMC Vellore
   -------------------------------------------------------
   Colour variables (--endo-navy, --endo-gold, --endo-blue-accent,
   --endo-green) are declared once in header.css / quickactions.css
   and reused here — all loaded site-wide, so no need to redeclare.
   ========================================================= */

.endo-about * { box-sizing: border-box; }

.endo-about {
	background: #fff;
	padding: 72px 0;
}

.endo-about-inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1fr 0.85fr 1fr;
	gap: 40px;
	align-items: center;
}

/* ---- Left: welcome line / eyebrow / heading / copy / CTA ---- */
.endo-about-content {
	margin-top: 0;
	padding-top: 0;
}

.endo-about-welcome {
	/* First element in the column — zero top margin/padding so it sits
	   flush against the top of the content block, no gap above it. */
	margin-top: 0;
	padding-top: 0;
	margin-bottom: 12px;
	padding-left: 14px;
	border-left: 3px solid var(--endo-gold);
	font-size: clamp(17px, 1.1vw + 13px, 21px);
	line-height: 1.35;
	font-weight: 700;
	color: var(--endo-navy);
}

.endo-eyebrow {
	display: inline-block;
	color: var(--endo-blue-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.endo-about-desc {
	font-size: clamp(13px, 1vw + 11px, 14.5px);
	line-height: 1.75;
	color: #4B5768;
	margin: 0 0 16px;
	/* Justified body copy per design request. hyphens + a conservative
	   word-spacing cap keep justify from stretching gaps too wide on
	   narrow single-column layouts (phones). */
	text-align: justify;
	text-justify: inter-word;
	hyphens: auto;
}

.endo-about-desc:last-of-type {
	margin-bottom: 26px;
}

/* Colour/border modifier only — sizing, padding, and transitions come
   from the shared .endo-btn base class (declared in hero.css, loaded
   site-wide), same pattern as .endo-btn-gold / .endo-btn-outline. */
.endo-btn-navy-outline {
	color: var(--endo-navy);
	border: 1.5px solid var(--endo-navy);
	background: transparent;
}
.endo-btn-navy-outline:hover {
	background: var(--endo-navy);
	color: #fff;
}

/* ---- Middle: photo + overlay badge ---- */
.endo-about-photo {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	line-height: 0;
	box-shadow: 0 16px 36px rgba(10, 37, 89, 0.16);
}

.endo-about-photo img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 4.6;
	object-fit: cover;
	display: block;
}

.endo-about-badge {
	position: absolute;
	left: 20px;
	bottom: 20px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--endo-green);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 16px;
	border-radius: 8px;
	box-shadow: 0 8px 18px rgba(10, 37, 89, 0.22);
}
.endo-about-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ---- Right: 2x2 feature card grid ---- */
.endo-about-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.endo-about-card {
	background: #F7F9FC;
	border: 1px solid var(--endo-border);
	border-radius: 10px;
	padding: 22px 18px;
	transition: box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.endo-about-card:hover {
	background: #fff;
	box-shadow: 0 10px 24px rgba(10, 37, 89, 0.1);
	transform: translateY(-2px);
}

.endo-about-card .dashicons {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 9px;
	font-size: 20px;
	margin-bottom: 14px;
	color: var(--endo-green);
	background: rgba(29, 158, 117, 0.12);
}

/* Alternate accent colours per card, matching the reference design
   (green / gold / blue / purple), keyed off nth-child order. */
.endo-about-card:nth-child(2) .dashicons {
	color: var(--endo-gold);
	background: rgba(217, 160, 59, 0.14);
}
.endo-about-card:nth-child(3) .dashicons {
	color: var(--endo-blue-accent);
	background: rgba(44, 111, 227, 0.12);
}
.endo-about-card:nth-child(4) .dashicons {
	color: #7C4FD1;
	background: rgba(124, 79, 209, 0.12);
}

.endo-about-card h3 {
	font-size: 15px;
	font-weight: 700;
	color: var(--endo-navy);
	margin: 0 0 8px;
}

.endo-about-card p {
	font-size: 12.5px;
	line-height: 1.6;
	color: #667085;
	margin: 0;
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */

/* ---- Laptops: tighten card grid gap ---- */
@media (max-width: 1199px) {
	.endo-about-inner {
		grid-template-columns: 1fr 0.8fr 1fr;
		gap: 28px;
	}
}

/* ---- Tablets: stack content, photo, cards ---- */
@media (max-width: 991px) {
	.endo-about { padding: 56px 0; }

	.endo-about-inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.endo-about-photo {
		max-width: 420px;
		margin: 0 auto;
	}
	.endo-about-photo img {
		aspect-ratio: 4 / 3.2;
	}

	.endo-about-cards {
		max-width: 560px;
		margin: 0 auto;
	}
}

/* ---- Phones: keep the 2x2 grid (was collapsing to a single
   stacked column here, causing excessive vertical scrolling on
   mobile portrait). Cards get centered content and tightened
   spacing to stay comfortable at 2-up on narrow screens; grid
   items stretch to equal height by default, so all four cards
   in a row match regardless of copy length. ---- */
@media (max-width: 560px) {
	.endo-about { padding: 44px 0; }

	.endo-about-cards {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.endo-about-card {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 18px 14px;
	}

	.endo-about-card .dashicons {
		margin-left: auto;
		margin-right: auto;
	}

	.endo-about-card h3 {
		font-size: 14px;
	}

	.endo-about-card p {
		font-size: 12px;
	}
}

/* ---- Very narrow phones: ease padding/gap a touch further so
   two columns still have breathing room. ---- */
@media (max-width: 360px) {
	.endo-about-cards { gap: 10px; }
	.endo-about-card { padding: 16px 10px; }
}
