/* ==========================================================================
   Jed Glick Law Firm – Services Layout Styles
   Covers: Service Detail · Process / Steps · FAQ · Testimonials
   Requires global.css + home.css for CSS custom properties and animations.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared section heading (reusable underline style)
   -------------------------------------------------------------------------- */
.section-svcs-detail__heading,
.section-svcs-process__heading,
.section-svcs-faq__heading,
.section-svcs-testimonials__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.9rem, 3.5vw, 2.75rem);
	font-weight: 500;
	color: var(--color-navy);
	margin: 0 0 1.5rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
	position: relative;
	padding-bottom: 1.5rem;
}

.section-svcs-detail__heading::after,
.section-svcs-process__heading::after,
.section-svcs-faq__heading::after,
.section-svcs-testimonials__heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 44px;
	height: 2px;
	background: var(--color-navy-2);
}

/* Centre the underline on centered headings */
.section-svcs-process__heading::after,
.section-svcs-faq__heading::after,
.section-svcs-testimonials__heading::after {
	left: 50%;
	transform: translateX(-50%);
}

/* ==========================================================================
   Layout: Service Detail
   Two-column text + image, image can be left or right.
   ========================================================================== */
.section-svcs-detail {
	padding: var(--section-v-pad) 2rem;
	background: var(--color-white);
}

/* Alternate background for consecutive detail sections */
.section-svcs-detail + .section-svcs-detail {
	background: var(--color-warm-bg);
}

.section-svcs-detail__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 5rem;
	align-items: center;
}

/* Text always in DOM first, image second — flip via CSS for left variant */
.section-svcs-detail--image-left .section-svcs-detail__inner {
	direction: rtl;
}
.section-svcs-detail--image-left .section-svcs-detail__text,
.section-svcs-detail--image-left .section-svcs-detail__image-wrap {
	direction: ltr;
}

/* No-image fallback: single column centred text */
.section-svcs-detail--no-image .section-svcs-detail__inner {
	grid-template-columns: 1fr;
	max-width: 780px;
}

/* Text column */
.section-svcs-detail__body {
	font-size: 1.05rem;
	line-height: 1.85;
	color: var(--color-text-md);
	margin: 0 0 2.25rem;
}

.section-svcs-detail__body p { margin: 0 0 1.25rem; }
.section-svcs-detail__body p:last-child { margin-bottom: 0; }

.section-svcs-detail__body ul,
.section-svcs-detail__body ol {
	margin: 0 0 1.25rem 1.25rem;
	padding: 0;
}

.section-svcs-detail__body li { margin-bottom: 0.4rem; }

.section-svcs-detail__cta {
	display: inline-block;
	background: transparent;
	color: var(--color-navy);
	text-decoration: none;
	padding: 0.85rem 2.25rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 1px solid var(--color-navy);
	transition: background 0.2s ease, color 0.2s ease;
}

.section-svcs-detail__cta:hover,
.section-svcs-detail__cta:focus-visible {
	background: var(--color-navy);
	color: var(--color-white);
	outline: none;
}

/* Image column */
.section-svcs-detail__image-wrap {
	overflow: hidden;
	line-height: 0;
}

.section-svcs-detail__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

.section-svcs-detail__image-wrap:hover .section-svcs-detail__image {
	transform: scale(1.03);
}

@media (max-width: 860px) {
	.section-svcs-detail__inner {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}
	.section-svcs-detail--image-left .section-svcs-detail__inner {
		direction: ltr;
	}
	.section-svcs-detail__heading::after { left: 0; transform: none; }
}

/* ==========================================================================
   Layout: Process / Steps
   Two-column rows: left = icon + title, right = large description text.
   Background image crossfades between steps on scroll.
   ========================================================================== */
.section-svcs-process {
	background: var(--color-white);
	padding: var(--section-v-pad) 2rem 0;
	color: var(--color-text);
	position: relative;
	overflow: hidden;
}

/* Background image stack */
.process-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.process-bg__slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 0.9s ease;
}

.process-bg__slide.is-active {
	opacity: 1;
}

.process-bg__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		160deg,
		rgba(10, 18, 28, 0.80) 0%,
		rgba(15, 30, 48, 0.70) 100%
	);
}

.section-svcs-process__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	text-align: center;
	position: relative;
	z-index: 1;
}

.section-svcs-process__heading {
	color: #DC5848;
}

.section-svcs-process__heading::after {
	background: var(--color-navy-2);
}

.section-svcs-process__intro {
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--color-text-md);
	max-width: 560px;
	margin: 0 auto 4rem;
}

/* Step list — stacked rows */
.section-svcs-process__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	text-align: left;
}

/* Each step: 2-column grid — tall enough for scroll trigger */
.section-svcs-process__step {
	display: grid;
	grid-template-columns: 340px 1fr;
	gap: 4rem;
	align-items: center;
	padding: 4rem 0;
	min-height: 65vh;
	border-bottom: 1px solid rgba(15, 25, 35, 0.08);
}

.section-svcs-process__step:last-child {
	border-bottom: none;
}

/* ── Left column ─────────────────────────────────────────────────────── */
.section-svcs-process__step-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
}

.section-svcs-process__step-icon-wrap {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
}

.section-svcs-process__step-icon {
	width: 80px;
	height: 80px;
	object-fit: contain;
	display: block;
	filter: none;
	opacity: 0.9;
}

/* Fallback step number (shown when no icon is uploaded) */
.section-svcs-process__step-num {
	font-family: var(--font-serif);
	font-size: clamp(3.5rem, 6vw, 5.5rem);
	font-weight: 300;
	line-height: 1;
	color: var(--color-navy);
	opacity: 0.15;
	letter-spacing: -0.02em;
}

.section-svcs-process__step-title {
	font-family: var(--font-serif);
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 500;
	color: #DC5848;
	margin: 0;
	line-height: 1.25;
}

/* ── Right column ────────────────────────────────────────────────────── */
.section-svcs-process__step-right {
	display: flex;
	align-items: center;
}

.section-svcs-process__step-desc {
	font-family: var(--font-serif);
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	line-height: 1.7;
	color: var(--color-text-md);
	margin: 0;
	font-weight: 300;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
	.section-svcs-process__step {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding: 3rem 0;
	}
}

@media (max-width: 580px) {
	.section-svcs-process__step {
		padding: 2.5rem 0;
	}
	.section-svcs-process__step-desc {
		font-size: 1.1rem;
	}
}

/* ==========================================================================
   Layout: Process Step (single, scroll-animated arrow)
   ========================================================================== */
.section-process-step {
	position: relative;
	background: var(--color-white);
	padding: var(--section-v-pad) 2rem;
	border-bottom: 1px solid rgba(15, 25, 35, 0.07);
	transition: background 0.8s ease;
	overflow: hidden;
}

/* Edge fade — always white at the sides regardless of bg color */
.section-process-step::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		white 0%,
		transparent 18%,
		transparent 82%,
		white 100%
	);
	pointer-events: none;
	z-index: 2;
}

/* Hover background color variants */
.section-process-step[data-hover-bg="deep-blue"]:hover   { background: #5B9BD5; }
.section-process-step[data-hover-bg="medium-blue"]:hover { background: #A8C8E8; }
.section-process-step[data-hover-bg="light-blue"]:hover  { background: #D6EAF8; }

/* Hover text color — transition on the text elements */
.process-step__title,
.process-step__subheading,
.process-step__desc,
.process-step__number {
	transition: color 0.8s ease, opacity 0.4s ease;
}

.section-process-step[data-hover-text="white"]:hover .process-step__title,
.section-process-step[data-hover-text="white"]:hover .process-step__subheading,
.section-process-step[data-hover-text="white"]:hover .process-step__desc,
.section-process-step[data-hover-text="white"]:hover .process-step__number {
	color: #ffffff;
}

.section-process-step[data-hover-text="black"]:hover .process-step__title,
.section-process-step[data-hover-text="black"]:hover .process-step__subheading,
.section-process-step[data-hover-text="black"]:hover .process-step__desc,
.section-process-step[data-hover-text="black"]:hover .process-step__number {
	color: #000000;
}

/* Content layout: number left, text right */
.process-step__inner {
	position: relative;
	z-index: 1;
	max-width: 820px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 5rem;
	align-items: center;
}

/* Left column: number and icon stacked, cross-fade on hover */
.process-step__left {
	position: relative;
	width: 180px;
	height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.process-step__number {
	font-family: var(--font-serif);
	font-size: clamp(5.5rem, 10vw, 9rem);
	font-weight: 300;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--color-navy);
	opacity: 0.15;
	transition: opacity 0.4s ease;
}

.process-step__icon-reveal {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.process-step__icon-reveal img {
	width: 130px;
	height: 130px;
	object-fit: contain;
	display: block;
}

/* Cross-fade on hover */
.section-process-step:hover .process-step__number {
	opacity: 0;
}

.section-process-step:hover .process-step__icon-reveal {
	opacity: 1;
}

.process-step__right {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
	.process-step__number,
	.process-step__icon-reveal { transition: none; }
}

.process-step__title {
	font-family: var(--font-serif);
	font-size: clamp(1.5rem, 2.5vw, 2.1rem);
	font-weight: 500;
	color: var(--color-navy);
	margin: 0;
	line-height: 1.2;
}

.process-step__subheading {
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #DC5848;
	margin: 0 0 0.5rem;
}

.process-step__desc {
	font-size: 1rem;
	line-height: 1.85;
	color: var(--color-text-md);
	margin: 0;
}

@media (max-width: 700px) {
	.process-step__inner {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	.process-step__number {
		font-size: 3.5rem;
	}
}

/* ==========================================================================
   Layout: FAQ
   CSS-only accordion via <details> / <summary>
   ========================================================================== */
.section-svcs-faq {
	background: var(--color-white);
	padding: var(--section-v-pad) 2rem;
}

.section-svcs-faq__inner {
	max-width: 820px;
	margin: 0 auto;
	text-align: center;
}

.section-svcs-faq__list {
	margin-top: 3rem;
	text-align: left;
}

.section-svcs-faq__item {
	border-bottom: 1px solid rgba(15, 25, 35, 0.12);
}

.section-svcs-faq__item:first-child {
	border-top: 1px solid rgba(15, 25, 35, 0.12);
}

.section-svcs-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.5rem 0;
	font-family: var(--font-serif);
	font-size: 1.2rem;
	font-weight: 500;
	color: var(--color-navy);
	cursor: pointer;
	list-style: none;
	user-select: none;
	line-height: 1.4;
}

/* Hide default browser marker */
.section-svcs-faq__question::-webkit-details-marker { display: none; }
.section-svcs-faq__question::marker { display: none; }

/* Plus / minus icon */
.section-svcs-faq__question::after {
	content: '+';
	font-family: var(--font-sans);
	font-size: 1.4rem;
	font-weight: 300;
	color: var(--color-navy-2);
	flex-shrink: 0;
	transition: transform 0.25s ease;
	line-height: 1;
}

.section-svcs-faq__item[open] > .section-svcs-faq__question::after {
	transform: rotate(45deg);
}

.section-svcs-faq__question:hover {
	color: var(--color-navy-2);
}

.section-svcs-faq__answer {
	padding: 0 0 1.75rem;
	font-size: 1rem;
	line-height: 1.85;
	color: var(--color-text-md);
}

.section-svcs-faq__answer p { margin: 0 0 1rem; }
.section-svcs-faq__answer p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Layout: Testimonials
   ========================================================================== */
.section-svcs-testimonials {
	background: var(--color-white);
	padding: var(--section-v-pad) 2rem;
}

.section-svcs-testimonials__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	text-align: center;
}

.section-svcs-testimonials__grid {
	list-style: none;
	margin: 3.5rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	text-align: left;
}

.testimonial-card {
	background: var(--color-warm-bg);
	padding: 2.5rem;
	display: flex;
	flex-direction: column;
	position: relative;
}

/* Decorative quote mark */
.testimonial-card::before {
	content: '\201C';
	font-family: var(--font-serif);
	font-size: 5rem;
	line-height: 1;
	color: var(--color-navy);
	opacity: 0.08;
	position: absolute;
	top: 1rem;
	left: 1.75rem;
	pointer-events: none;
}

.testimonial-card__quote {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	flex: 1;
}

.testimonial-card__quote > p {
	font-size: 0.975rem;
	line-height: 1.85;
	color: var(--color-text-md);
	margin: 0;
	font-style: italic;
	position: relative;
	z-index: 1;
}

.testimonial-card__footer {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(15, 25, 35, 0.1);
}

.testimonial-card__author {
	font-family: var(--font-serif);
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--color-navy);
	font-style: normal;
}

.testimonial-card__role {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-gold);
}

@media (max-width: 900px) {
	.section-svcs-testimonials__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 580px) {
	.section-svcs-testimonials__grid {
		grid-template-columns: 1fr;
	}
}
