/*
 * Serepta dynamic components (events, stories, doctors, detail and archive pages).
 * Values come from the Figma Events and Medical Center frames and match the Elementor
 * global classes; colours use the Elementor variables with Figma fallbacks.
 * Breakpoints match Elementor: tablet ≤ 1024px, mobile ≤ 767px.
 */

/* ---------- Base ---------- */
body {
	background-color: var(--walnut-100, #F9F4EE);
	font-family: var(--font-body, "Instrument Sans"), system-ui, sans-serif;
	color: var(--text-body, #717171);
}

.srp-main { padding: 40px 0 40px; }
.srp-wrap {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 31px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}
.srp-section {
	background: var(--walnut-50, #FDFCFB);
	border-radius: 20px;
	padding: 40px 30px 30px;
	display: flex;
	flex-direction: column;
	gap: 30px;
	box-shadow: 0 4px 34px rgba(0, 0, 0, 0.06);
}
.srp-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.srp-h1,
.srp-h2,
.srp-featured__title,
.srp-hero__title {
	font-family: var(--font-heading, "Thmanyah Serif Display"), Georgia, serif;
	color: var(--navy-700, #012656);
	margin: 0;
}
.srp-h1 { font-size: 50px; line-height: 62px; font-weight: 500; letter-spacing: -0.5px; }
.srp-h2 { font-size: 32px; line-height: 40px; font-weight: 700; }
.srp-lead { font-size: 22px; line-height: 27px; color: var(--text-body, #717171); margin: 0; }
.srp-divider { border: 0; border-top: 1px solid var(--black-200, #E0DDD9); margin: 0; width: 100%; }
.srp-empty {
	margin: 0;
	padding: 20px;
	border-radius: 10px;
	background: var(--black-100, #F1F0EE);
	font-size: 18px;
	line-height: 22px;
}

/* ---------- Icons ---------- */
.srp-icon { display: inline-flex; flex: none; line-height: 0; }
.srp-icon svg { width: 100%; height: 100%; }

/* ---------- Buttons ----------
   Selectors on links use two classes on purpose: an Elementor V4 Paragraph resets every
   link inside it (.e-paragraph-base a { all: unset }), and blocks are placed in Paragraphs. */
.srp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.srp-btn.srp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 10px 20px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-family: var(--font-body, "Instrument Sans"), sans-serif;
	font-size: 18px;
	line-height: 22px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.srp-btn.srp-btn:hover { text-decoration: none; }
.srp-btn.srp-btn:focus-visible { outline: 2px solid var(--navy-600, #0251B8); outline-offset: 2px; }
.srp-btn.srp-btn--olive { background: var(--olive-button, #7A763C); color: #fff; }
.srp-btn.srp-btn--olive:hover { background: var(--olive-800, #535129); color: #fff; }
.srp-btn.srp-btn--navy { background: var(--navy-700, #012656); color: var(--navy-50, #F8FBFF); }
.srp-btn.srp-btn--navy:hover { background: var(--navy-600, #0251B8); color: #fff; }
.srp-btn.srp-btn--outline {
	align-self: flex-start;
	border-color: var(--olive-button, #7A763C);
	color: var(--olive-button, #7A763C);
	font-size: 16px;
	line-height: 20px;
}
.srp-btn.srp-btn--outline:hover { background: var(--olive-button, #7A763C); color: #fff; }
.srp-btn.srp-btn--light-outline { border-color: var(--navy-700, #012656); color: var(--navy-700, #012656); background: transparent; }
.srp-btn.srp-btn--light-outline:hover { background: var(--navy-100, #E5F0FF); color: var(--navy-700, #012656); }

/* ---------- Badges and tags ---------- */
.srp-badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	padding: 10px 20px;
	border-radius: 60px;
	background: var(--navy-600, #0251B8);
	color: #fff;
	font-size: 16px;
	line-height: 20px;
	font-weight: 600;
}
.srp-badge .srp-icon { width: 18px; height: 18px; }
.srp-card__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.srp-tag {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border-radius: 60px;
	background: var(--navy-200, #C4DDFE);
	color: var(--navy-600, #0251B8);
	font-size: 14px;
	line-height: 19px;
	font-weight: 700;
}
.srp-tag .srp-icon { width: 19px; height: 19px; }
.srp-tag--past { background: var(--black-200, #E0DDD9); color: #4A4A4A; padding: 10px 15px; }

/* ---------- Meta (date, location) ---------- */
.srp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.srp-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 18px;
	line-height: 22px;
	font-weight: 500;
	color: var(--black-700, #0B0A09);
}
.srp-meta__item .srp-icon { width: 20px; height: 20px; color: var(--navy-400, #5BA2FD); }

/* ---------- Grid and cards ---------- */
.srp-block { display: flex; flex-direction: column; gap: 20px; }
.srp-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.srp-card { display: flex; flex-direction: column; min-width: 0; }
.srp-card .srp-card__media {
	display: block;
	height: 250px;
	border-radius: 10px 10px 0 0;
	overflow: hidden;
	background: var(--black-200, #E0DDD9);
}
.srp-card--story .srp-card__media.srp-card__media { height: 262px; }
.srp-card__img,
.srp-card__placeholder { display: block; width: 100%; height: 100%; object-fit: cover; }
.srp-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
	padding: 25px;
	border-radius: 0 0 10px 10px;
	background: var(--black-100, #F1F0EE);
}
.srp-card--story .srp-card__body { padding: 20px; gap: 35px; }
.srp-block--stories .srp-card--story .srp-card__body { min-height: 274px; } /* Events page stories (Figma: body 274 px, button at the bottom) */
.srp-card__top { display: flex; flex-direction: column; gap: 20px; }
.srp-card__text { display: flex; flex-direction: column; gap: 10px; }
.srp-card__title {
	margin: 0;
	font-family: var(--font-body, "Instrument Sans"), sans-serif;
	font-size: 22px;
	line-height: 27px;
	font-weight: 600;
	color: var(--navy-700, #012656);
}
.srp-card .srp-card__title a { color: inherit; text-decoration: none; }
.srp-card .srp-card__title a:hover { text-decoration: underline; }
.srp-card__date { margin: 0; font-size: 18px; line-height: 22px; color: var(--text-body, #717171); }
.srp-card__excerpt { margin: 0; font-size: 16px; line-height: 19px; color: var(--text-muted, #8B8B8B); }

/* ---------- Program tabs ---------- */
.srp-tabs {
	display: flex;
	gap: 10px;
	padding: 12px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 4px 18px rgba(40, 56, 79, 0.04);
	overflow-x: auto;
}
.srp-tabs .srp-tabs__item {
	flex: 1 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 48px;
	padding: 0 20px;
	border-radius: 9px;
	background: var(--navy-100, #E5F0FF);
	color: #193965;
	font-size: 16px;
	line-height: 22px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(16, 40, 75, 0.03);
}
.srp-tabs__item .srp-icon { width: 24px; height: 24px; color: var(--navy-400, #5BA2FD); }
.srp-tabs .srp-tabs__item:hover { background: var(--navy-200, #C4DDFE); color: #193965; text-decoration: none; }
.srp-tabs .srp-tabs__item.is-active { background: #062957; color: #fff; font-weight: 700; }

/* ---------- Featured event ---------- */
.srp-featured {
	display: flex;
	align-items: center;
	gap: 30px;
	padding: 30px;
	border-radius: 20px;
	background: var(--walnut-50, #FDFCFB);
}
.srp-featured__content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 30px; }
.srp-featured__head { display: flex; flex-direction: column; gap: 20px; }
.srp-featured__title { font-size: 36px; line-height: 45px; font-weight: 700; }
.srp-featured .srp-featured__title a { color: inherit; text-decoration: none; }
.srp-featured__excerpt { margin: 0; font-size: 22px; line-height: 27px; color: var(--text-body, #717171); }
.srp-featured .srp-featured__media { flex: 0 0 456px; height: 362px; border-radius: 10px; overflow: hidden; }
.srp-featured__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Hero (detail pages) ---------- */
.srp-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 382px;
	padding: 40px;
	border-radius: 20px;
	overflow: hidden;
	background-color: var(--navy-700, #012656);
	background-size: cover;
	background-position: center;
}
.srp-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 95%);
}
.srp-hero--plain { min-height: 240px; }
.srp-hero--plain::before { display: none; }
.srp-hero__content { position: relative; display: flex; flex-direction: column; gap: 20px; max-width: 900px; }
.srp-hero__title { color: var(--navy-50, #F8FBFF); font-size: 50px; line-height: 62px; font-weight: 500; letter-spacing: -0.5px; }
.srp-hero__intro { margin: 0; color: var(--navy-50, #F8FBFF); font-size: 22px; line-height: 27px; }

/* ---------- Article (event and story pages) ---------- */
.srp-article__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.srp-prose { max-width: 860px; font-size: 18px; line-height: 1.5; color: #4F4F4F; }
.srp-prose > * { margin: 0 0 1em; }
.srp-prose > *:last-child { margin-bottom: 0; }
.srp-prose h2,
.srp-prose h3 { color: var(--navy-700, #012656); font-family: var(--font-body, "Instrument Sans"), sans-serif; font-weight: 600; line-height: 1.25; }
.srp-prose h2 { font-size: 26px; }
.srp-prose h3 { font-size: 22px; }
.srp-prose a { color: var(--navy-600, #0251B8); }
.srp-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.srp-prose ul,
.srp-prose ol { padding-left: 1.3em; }

/* ---------- Doctors carousel ---------- */
.srp-carousel {
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) 36px;
	align-items: center;
	gap: 20px 20px;
}
.srp-carousel__track {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.srp-carousel__track::-webkit-scrollbar { display: none; }
.srp-carousel__track:focus-visible { outline: 2px solid var(--navy-200, #C4DDFE); outline-offset: 4px; }
.srp-doctor {
	flex: 0 0 calc((100% - 80px) / 5);
	min-width: 0; /* a long word must not widen the card */
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	text-align: center;
	overflow-wrap: break-word; /* only breaks a word that can't fit at all */
	hyphens: auto;
}
.srp-doctor__photo {
	position: relative;
	width: 125px;
	height: 125px;
	border-radius: 50%;
	border: 2px solid #fff;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.2);
}
.srp-doctor__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.srp-doctor__name { display: block; color: #fff; font-size: 20px; line-height: 24px; font-weight: 600; }
.srp-doctor__specialty { display: block; margin-top: -10px; color: var(--navy-200, #C4DDFE); font-size: 18px; line-height: 22px; }
.srp-doctor__desc { display: block; margin-top: -10px; color: var(--navy-200, #C4DDFE); opacity: 0.8; font-size: 16px; line-height: 20px; max-width: 260px; }
.srp-carousel__arrow {
	width: 36px;
	height: 36px;
	padding: 3px;
	border: 0;
	background: none;
	color: var(--olive-500, #C8C590);
	cursor: pointer;
}
.srp-carousel__arrow:disabled { opacity: 0.35; cursor: default; }
.srp-carousel__arrow:focus-visible { outline: 2px solid var(--navy-200, #C4DDFE); border-radius: 50%; }
.srp-carousel__arrow .srp-icon { width: 30px; height: 30px; }
.srp-carousel__dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 6px; }
.srp-carousel__dots span { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #1378FD; }
.srp-carousel__dots span.is-active { background: #B4B067; border-color: #B4B067; }
.srp-carousel.is-static .srp-carousel__arrow,
.srp-carousel.is-static .srp-carousel__dots { visibility: hidden; }

/* Doctors, 1–5 shown: static grid (no arrows/dots). Desktop keeps the carousel's
   5-per-row positions (36px arrow column + 20px gap reserved on each side). */
.srp-doctors-grid { width: 100%; padding: 0 56px 32px; }
.srp-doctors-grid__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 30px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.srp-doctors-grid .srp-doctor { flex: 0 0 calc((100% - 80px) / 5); }

/* Anchor target for "See Our Upcoming Events" and the tabs: keep the section title in view. */
#upcoming-events { scroll-margin-top: 110px; }

/* Events page "Load More Events" */
.srp-more { display: flex; justify-content: center; margin-top: 30px; }
.srp-more__btn[hidden], .srp-grid > [hidden] { display: none; }

/* ---------- Contact form (WPForms Lite) ---------- */
.e-paragraph-base:has(> .srp-contact-form) { display: block; width: 100%; }
.srp-contact-form .wpforms-container {
	--wpforms-field-border-radius: 10px;
	--wpforms-field-border-color: var(--black-200, #E0DDD9);
	--wpforms-field-background-color: #fff;
	--wpforms-field-text-color: var(--navy-700, #012656);
	--wpforms-field-size-input-height: 48px;
	--wpforms-label-color: var(--navy-700, #012656);
	--wpforms-label-size-font-size: 16px;
	--wpforms-button-background-color: var(--olive-button, #7A763C);
	--wpforms-button-text-color: #fff;
	--wpforms-button-border-radius: 10px;
	--wpforms-button-size-height: 42px;
	--wpforms-label-error-color: #B42318;
	margin: 0;
	font-family: var(--font-body, "Instrument Sans"), sans-serif;
}
.srp-contact-form .wpforms-container .wpforms-field { padding: 0 0 20px; }
.srp-contact-form .wpforms-container .wpforms-field-label { font-weight: 600; font-size: 16px; line-height: 20px; color: var(--navy-700, #012656); margin-bottom: 8px; }
.srp-contact-form .wpforms-container .wpforms-required-label { color: #B42318; }
.srp-contact-form .wpforms-container input[type="text"],
.srp-contact-form .wpforms-container input[type="email"],
.srp-contact-form .wpforms-container textarea {
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--black-200, #E0DDD9);
	border-radius: 10px;
	background: #fff;
	padding: 12px 15px;
	font: 400 18px/22px var(--font-body, "Instrument Sans"), sans-serif;
	color: var(--navy-700, #012656);
	box-shadow: none;
}
.srp-contact-form .wpforms-container textarea { min-height: 160px; }
.srp-contact-form .wpforms-container input:focus,
.srp-contact-form .wpforms-container textarea:focus { border-color: var(--navy-600, #0251B8); outline: 2px solid var(--navy-200, #C4DDFE); outline-offset: 0; }
.srp-contact-form .wpforms-container .wpforms-field.wpforms-has-error input,
.srp-contact-form .wpforms-container .wpforms-field.wpforms-has-error textarea { border-color: #B42318; }
.srp-contact-form .wpforms-container label.wpforms-error,
.srp-contact-form .wpforms-container em.wpforms-error { color: #B42318; font-size: 14px; line-height: 18px; margin-top: 6px; }
.srp-contact-form .wpforms-container .wpforms-field-limit-text { color: var(--text-muted, #8B8B8B); font-size: 14px; }
.srp-contact-form .wpforms-container .wpforms-submit-container { padding-top: 5px; }
.srp-contact-form .wpforms-container button[type="submit"].wpforms-submit {
	height: auto;
	padding: 10px 20px;
	border: 0;
	border-radius: 10px;
	background: var(--olive-button, #7A763C);
	color: #fff;
	font: 600 18px/22px var(--font-body, "Instrument Sans"), sans-serif;
	cursor: pointer;
}
.srp-contact-form .wpforms-container button[type="submit"].wpforms-submit:hover,
.srp-contact-form .wpforms-container button[type="submit"].wpforms-submit:focus { background: var(--olive-800, #535129); }
.srp-contact-form .wpforms-container button[type="submit"].wpforms-submit:focus-visible { outline: 2px solid var(--navy-600, #0251B8); outline-offset: 2px; }
.srp-contact-form .wpforms-confirmation-container-full {
	margin: 0;
	padding: 20px;
	border: 1px solid var(--navy-200, #C4DDFE);
	border-radius: 10px;
	background: var(--navy-100, #E5F0FF);
	color: var(--navy-700, #012656);
	font-size: 18px;
	line-height: 22px;
}
.srp-contact-form .wpforms-confirmation-container-full p { margin: 0; }

/* ---------- Pagination, 404 ---------- */
.srp-pagination .nav-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.srp-pagination .page-numbers {
	display: inline-flex;
	min-width: 42px;
	justify-content: center;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--navy-100, #E5F0FF);
	color: var(--navy-700, #012656);
	text-decoration: none;
	font-weight: 600;
}
.srp-pagination .page-numbers.current { background: var(--navy-700, #012656); color: #fff; }
.srp-notfound { align-items: flex-start; }

/* Shortcodes typed into an Elementor Paragraph: let the block use full width. */
.e-paragraph-base:has(> .srp-block),
.e-paragraph-base:has(> .srp-featured),
.e-paragraph-base:has(> .srp-carousel),
.e-paragraph-base:has(> .srp-doctors-grid) { display: block; width: 100%; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.srp-wrap { padding: 0 20px; }
	.srp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.srp-featured { flex-direction: column-reverse; align-items: stretch; }
	.srp-featured .srp-featured__media { flex-basis: auto; height: 320px; }
	.srp-doctor { flex-basis: calc((100% - 40px) / 3); }
	.srp-doctors-grid { padding: 0; }
	.srp-doctors-grid .srp-doctor { flex: 0 0 calc((100% - 40px) / 3); }
	.srp-tabs .srp-tabs__item { flex: 0 0 auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.srp-main { padding: 0; }
	.srp-wrap { padding: 0; gap: 0; }
	.srp-section { border-radius: 0; padding: 40px 30px 30px; box-shadow: none; }
	.srp-hero { border-radius: 0; padding: 30px; min-height: 320px; }
	.srp-h1,
	.srp-hero__title { font-size: 40px; line-height: 50px; letter-spacing: -0.4px; }
	.srp-featured { padding: 30px; border-radius: 0; }
	.srp-featured__title { font-size: 32px; line-height: 40px; }
	.srp-featured .srp-featured__media { height: 240px; }
	.srp-grid { grid-template-columns: minmax(0, 1fr); }
	.srp-tabs { margin: 0 -30px; border-radius: 0; padding-left: 30px; padding-right: 30px; scroll-padding-inline: 30px; scrollbar-width: none; } /* audit 1.2.7: first tab lines up with the content; no scrollbar line */
	.srp-tabs::-webkit-scrollbar { display: none; }
	.srp-doctor { flex-basis: calc((100% - 20px) / 2); }
	.srp-doctors-grid .srp-doctor { flex: 0 0 calc((100% - 20px) / 2); }
	.srp-doctor__photo { width: 110px; height: 110px; }
	/* 1.2.9: on phones the arrows sit under the cards, beside the dots (‹ • • • ›), so the cards get the full width (same size as the 1–5 grid). */
	.srp-carousel { grid-template-columns: 30px minmax(0, 1fr) 30px; grid-template-areas: "track track track" "prev dots next"; gap: 20px 8px; }
	.srp-carousel .srp-carousel__track { grid-area: track; }
	.srp-carousel .srp-carousel__arrow--prev { grid-area: prev; }
	.srp-carousel .srp-carousel__arrow--next { grid-area: next; }
	.srp-carousel .srp-carousel__dots { grid-area: dots; align-self: center; }
	.srp-carousel__arrow { width: 30px; height: 30px; padding: 0; }
	.srp-actions .srp-btn.srp-btn { flex: 1 1 auto; }
}

/* Elementor pages set ".elementor img { height: auto }"; keep images filling their frames. */
.srp-featured .srp-featured__img, .srp-card .srp-card__img, .srp-card .srp-card__placeholder, .srp-doctor .srp-doctor__photo img { height: 100%; }

/* ---------- Home ---------- */
/* History slider dots (added by assets/js/history.js under ".history-track"). */
.srp-history-dots { display: flex; justify-content: center; gap: 6px; }
.srp-history-dots button {
	width: 12px;
	height: 12px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--dark-olive-600, #A09E26);
	background: transparent;
	cursor: pointer;
}
.srp-history-dots button.is-active { background: var(--dark-olive-600, #A09E26); }
.srp-history-dots button:focus-visible { outline: 2px solid var(--navy-600, #0251B8); outline-offset: 2px; }
.history-track::-webkit-scrollbar { display: none; }
/* Home "Latest Events/News" cards show title + button only (Figma). */
.srp-block--latest .srp-card__excerpt { display: none; }
