/* =========================================================
   FOOTER — Brand + Link Columns + Contact + Bottom Bar
   Department of Endocrinology, CMC Vellore
   -------------------------------------------------------
   Colour variables (--endo-navy-dark, --endo-gold, --endo-green,
   etc.) are declared once in hero.css / quickactions.css and
   reused here — all loaded site-wide, so no need to redeclare.
   ========================================================= */

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

.endo-footer {
	background: var(--endo-navy-dark);
	color: #C7D0E0;
}

/* ---- Top: brand column + link columns + contact column ----
   4 link columns (Academics — courses + books, Patient Services,
   Department, Research & Publications). */
.endo-footer-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 48px 24px 28px;
	display: grid;
	grid-template-columns: 1.8fr repeat(4, 1fr) 1.3fr;
	gap: 26px;
}

.endo-footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.endo-footer-col li {
	margin-bottom: 10px;
}

.endo-footer-col a {
	color: #B7C1D6;
	text-decoration: none;
	font-size: 13.5px;
	transition: color .15s ease;
}
.endo-footer-col a:hover {
	color: #fff;
	text-decoration: underline;
}

.endo-footer-heading {
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	margin: 0 0 18px;
}

/* ---- Brand column ---- */
.endo-footer-brand {
	padding-right: 8px;
}

.endo-footer-title {
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.4;
	margin: 0 0 4px;
}

.endo-footer-sub {
	color: var(--endo-gold);
	font-size: 12.5px;
	font-weight: 600;
	margin: 0 0 14px;
}

.endo-footer-desc {
	font-size: 13px;
	line-height: 1.7;
	margin: 0 0 20px;
	max-width: 280px;
}

.endo-footer-social {
	display: flex;
	gap: 10px;
}
.endo-footer-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	transition: background .15s ease;
}
.endo-footer-social a:hover {
	background: var(--endo-gold);
	color: var(--endo-navy-dark);
}
.endo-footer-social .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
}
.endo-footer-social a i {
	font-size: 14px;
	line-height: 1;
}

/* ---- Contact column ---- */
.endo-footer-contact address {
	font-style: normal;
	font-size: 13.5px;
	line-height: 1.7;
	color: #B7C1D6;
	margin: 0 0 14px;
}

.endo-footer-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.endo-footer-contact-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	margin-bottom: 10px;
	color: #B7C1D6;
}
.endo-footer-contact-list .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
	margin-top: 1px;
	color: var(--endo-gold);
	flex-shrink: 0;
}
.endo-footer-contact-list a {
	color: #B7C1D6;
	text-decoration: none;
}
.endo-footer-contact-list a:hover {
	color: #fff;
	text-decoration: underline;
}

/* ---- Bottom bar ----
   Single consolidated row: credit/copyright text, legal nav,
   visitor counter — was previously two stacked bars with a
   duplicated copyright line; merged into one. */
.endo-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.endo-footer-bottom-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px 20px;
}

.endo-footer-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}
.endo-footer-legal a {
	color: #96A2BC;
	font-size: 12.5px;
	text-decoration: none;
}
.endo-footer-legal a:hover {
	color: #fff;
	text-decoration: underline;
}

.endo-footer-credit {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: #7C88A5;
	flex: 1 1 auto;
}
.endo-footer-credit a {
	color: #B7C1DB;
	text-decoration: none;
	font-weight: 500;
}
.endo-footer-credit a:hover {
	color: #fff;
	text-decoration: underline;
}
.endo-footer-credit-sep {
	margin: 0 6px;
	color: #4A5578;
}

.endo-footer-visitor-counter {
	font-size: 12px;
	color: #7C88A5;
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.endo-footer-visitor-counter img,
.endo-footer-visitor-counter svg {
	height: 14px;
	width: auto;
	vertical-align: middle;
}

/* ===========================================================
   BACK TO TOP BUTTON
   -----------------------------------------------------------
   Hidden until the page is scrolled a bit (endo-is-visible,
   toggled in header.js), then fades/slides in. Sits above the
   quick-actions rail's z-index (950) so it's never hidden
   behind it in the bottom-right corner on mobile.
   =========================================================== */
.endo-back-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 960;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--endo-green);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(10, 37, 89, 0.28);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, background .15s ease;
}
.endo-back-to-top.endo-is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.endo-back-to-top:hover {
	background: #167E5F;
}
.endo-back-to-top .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

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

@media (max-width: 1199px) {
	.endo-footer-inner {
		grid-template-columns: repeat(4, 1fr);
	}
	.endo-footer-brand {
		grid-column: 1 / -1;
		max-width: 480px;
	}
}

@media (max-width: 767px) {
	.endo-footer-inner {
		grid-template-columns: repeat(2, 1fr);
		padding: 36px 20px 24px;
		gap: 24px 20px;
	}
	.endo-footer-bottom-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	/* Room for the fixed bottom quick-actions bar on phones. */
	.endo-back-to-top {
		bottom: 76px;
	}
}

@media (max-width: 480px) {
	.endo-footer-inner {
		grid-template-columns: 1fr;
	}
	.endo-footer-bottom-inner {
		align-items: center;
		text-align: center;
	}
	.endo-footer-credit {
		text-align: center;
	}
	.endo-footer-credit-sep {
		display: inline-block;
	}
	.endo-footer-legal {
		justify-content: center;
	}
}
