/* =============================================================================
   medical.css — Medical Negligence Experts landing page
   CSS with native nesting (Chrome 112+ compatible — all nested selectors use & prefix).
   ============================================================================= */

@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,700&display=swap');

/* ─────────────────────────────────────────
   Design tokens
───────────────────────────────────────── */
:root {
	--color-primary:      #032759;
	--color-primary-dark: #01132c;
	--color-accent:       #ff0299;
	--color-accent-blue:  #0770db;
	--color-accent-teal:  #1a8aaf;
	--color-link:         #47647a;
	--color-dark:         #232323;
	--color-muted:        #767676;
	--color-white:        #ffffff;
	--font-base:          'Poppins', sans-serif;
	--max-width:          1400px;
	--header-height:      7.8rem;
}

/* ─────────────────────────────────────────
   Accessibility
───────────────────────────────────────── */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ─────────────────────────────────────────
   Base / Reset
───────────────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body {
	font-family: var(--font-base);
	line-height: 1.5;
	color: var(--color-dark);
	position: relative;
	margin: 0;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.2;
	word-break: break-word;
}

a {
	font-style: normal;
	font-weight: 400;
	cursor: pointer;
	text-decoration: none;
}

strong, b {
	font-weight: bold;
}

img {
	max-width: 100%;
	height: auto;
}

/* ─────────────────────────────────────────
   Site Header / Navigation
───────────────────────────────────────── */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: var(--color-white);
}

.site-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 2rem;
	max-width: var(--max-width);
	margin: 0 auto;

	& .site-nav__logo {
		max-width: 300px;

		& img {
			height: var(--header-height);
			display: block;
			object-fit: contain;
		}
	}

	& .site-nav__contact {
		text-align: center;
		color: var(--color-muted);
		margin-top: 1rem;
		
		@media(min-width: 1024px) {
			margin-top: 0;
		}

		& .ruler-click-text {
			color: var(--color-muted);
		}

		& .rulertel {
			display: block;
			font-weight: bold;
			color: var(--color-accent);
			font-size: 2em;
		}

		@media (max-width: 768px) {
			margin-right: 0.1em;
			font-size: 0.8em;

			& .rulertel {
				font-size: 1.5em;
			}
		}

		@media (max-width: 400px) {
			font-size: 0.65em;
		}
	}

	@media (max-width: 600px) {
		flex-direction: column;
		align-items: center;
		padding: 0.5rem 1rem;

		& .site-nav__logo {
			max-width: 200px;

			& img {
				height: auto;
				max-height: 4rem;
			}
		}

		& .site-nav__contact {
			margin-right: 0;
			font-size: 0.75em;
			color: #888;
		}
	}
}

/* ─────────────────────────────────────────
   Hero Section
───────────────────────────────────────── */
.hero {
	background-color: var(--color-primary-dark);
	padding-top: 8.5rem;
	padding-bottom: 3rem;

	@media(min-width:1024px) {
		padding-top: 11rem;
	}

	& .hero__inner {
		display: flex;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 1rem;
		max-width: 1200px;
		margin: 0 auto;
		padding: 0 1rem;
	}

	/* Desktop: white panel, left 2/3.
	   Mobile: full-width dark-blue section above the form. */
	& .hero__copy {
		flex: 0 0 calc(66.667% - 0.5rem);
		padding: 1rem 2rem;
		background-color: var(--color-white);
		color: var(--color-dark);
	}

	& .hero__heading {
		font-size: 2rem;
		font-weight: 700;
		color: #000;
		margin-bottom: 1rem;
	}

	& .hero__intro {
		font-size: 0.9em;
		color: #000;
		line-height: 1.6;
		margin-bottom: 1rem;
	}

	& .hero__about {
		font-size: 0.9em;
		color: #000;
		margin-bottom: 1rem;

		& .about-us-label {
			font-weight: bold;
			text-decoration: underline;
		}
	}

	/* Hidden on desktop — shown on mobile */
	& .hero__expect-label,
	& .hero__compliance {
		display: none;
	}

	& .hero__form-col {
		flex: 0 0 calc(33.333% - 0.5rem);
	}

	/* Benefits list:
	   Desktop — numbered circles with descriptions.
	   Mobile  — plain disc bullets, 5 items, no descriptions. */
	& .hero__benefits {
		counter-reset: li;
		margin: 2rem 0 0 0;
		padding: 0;

		& li {
			position: relative;
			margin: 15px 0 6px 2em;
			padding: 4px 35px;
			list-style: none;
			color: #333;
			font-size: 0.9em;

			& strong {
				color: var(--color-link);
				font-weight: 700;
			}

			&::before {
				content: counter(li);
				counter-increment: li;
				position: absolute;
				top: -2px;
				left: -1.4em;
				width: 35px;
				padding: 3px;
				background-color: var(--color-link);
				border-radius: 100px;
				color: #fbf6f6;
				font-size: 25px;
				font-weight: 400;
				text-align: center;
			}
		}

		& .benefit-desc {
			display: block;
		}

		& .mobile-benefit {
			display: none;
		}
	}

	@media (max-width: 767px) {
		padding-top: 10rem;
		padding-bottom: 0;

		& .hero__inner {
			padding: 0;
		}

		& .hero__copy {
			flex: 0 0 100%;
			background-color: var(--color-primary-dark);
			color: var(--color-white);
			margin-top: 0;
			padding: 1.25rem;
		}

		& .hero__heading {
			color: var(--color-white);
			font-size: 1.6rem;
		}

		& .hero__intro {
			color: var(--color-white);
		}

		& .hero__about {
			display: none;
		}

		& .hero__expect-label {
			display: block;
			color: var(--color-white);
			margin-bottom: 0.25rem;
		}

		& .hero__compliance {
			display: block;
			font-size: 0.65rem;
			line-height: 1.6;
			font-weight: 300;
			color: rgba(255, 255, 255, 0.75);
			margin-top: 1rem;
		}

		& .hero__form-col {
			flex: 0 0 100%;
		}

		& .hero__benefits {
			list-style: disc;
			padding-left: 1.5rem;
			margin: 0;

			& li {
				list-style: disc;
				margin: 0 0 0.5rem 0;
				padding: 0;
				color: var(--color-white);

				& strong {
					color: var(--color-white);
					font-weight: 600;
				}

				&::before {
					display: none;
				}
			}

			& .benefit-desc {
				display: none;
			}

			& .mobile-benefit {
				display: list-item;
			}
		}
	}
}

/* ─────────────────────────────────────────
   Form Container (the white card)
───────────────────────────────────────── */
.form-container {
	width: 100%;
	margin: 0 auto;
	padding: 1.75rem 1.75rem 1.25rem;
	background-color: var(--color-white);
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);

	& .form-container__title {
		font-size: 1.1rem;
		text-align: left;
		color: #000;
		font-weight: 700;
		line-height: 1.35;
		margin: 0 0 1rem;
	}

	& .form-container__highlight {
		color: var(--color-accent);
	}

	@media (max-width: 767px) {
		border-radius: 0;
		box-shadow: none;
		padding: 1.5rem 1.25rem 1rem;
	}
}

/* ─────────────────────────────────────────
   Claim Form — multi-step
───────────────────────────────────────── */
#claim-form {

	/* Hidden checkbox drives the CSS step toggle */
	& #step2 {
		opacity: 0;
		position: absolute;
		pointer-events: none;
	}

	/* ── Step progress bar ── */
	& .form-progress {
		margin-bottom: 1.25rem;

		& .form-progress__track {
			height: 5px;
			background: #ebebeb;
			border-radius: 3px;
			overflow: hidden;
			margin-bottom: 0.4rem;
		}

		& .form-progress__fill {
			height: 100%;
			width: 50%;
			background: var(--color-accent);
			border-radius: 3px;
			transition: width 0.4s ease;
		}

		& .form-progress__label {
			font-size: 0.72rem;
			color: var(--color-muted);
			font-weight: 500;
			letter-spacing: 0.02em;
		}

		& .step-num::before {
			content: "1";
		}
	}

	& #step2:checked ~ .form-progress .form-progress__fill {
		width: 100%;
	}

	& #step2:checked ~ .form-progress .step-num::before {
		content: "2";
	}

	& .form-step {
		display: block;
		height: auto;
		opacity: 1;
		transition: opacity 0.35s ease;
		text-align: left;
	}

	/* Step 2 hidden by default */
	& #part2 {
		opacity: 0;
		height: 0;
		overflow: hidden;
	}

	/* Checked: show step 2, hide step 1 */
	& #step2:checked ~ #part2 {
		opacity: 1;
		height: auto;
		overflow: visible;
	}

	& #step2:checked ~ #part1 {
		opacity: 0;
		height: 0;
		overflow: hidden;
		display: none;
	}

	& fieldset {
		border: none;
		padding: 0;
		margin: 0;
	}

	& legend {
		display: block;
		width: 100%;
		font-size: 0.9rem;
		font-weight: 600;
		color: #1a1a1a;
		margin-bottom: 0.5rem;
		line-height: 1.4;
	}

	& .radio-question {
		margin-bottom: 0.875rem;
		padding-bottom: 0.875rem;
		border-bottom: 1px solid #f0f0f0;

		&:last-of-type {
			border-bottom: none;
		}
	}

	& .radio-options {
		display: flex;
		gap: 0.5rem;
		margin: 0.5rem 0 0;

		& input[type="radio"] {
			position: absolute;
			opacity: 0;
			width: 0;
			height: 0;
			pointer-events: none;
		}

		& label {
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 0.6rem 1rem;
			border: 2px solid #e0e0e0;
			border-radius: 8px;
			cursor: pointer;
			font-weight: 600;
			font-size: 0.9rem;
			color: #555;
			background: #fafafa;
			transition: border-color 0.15s, background 0.15s, color 0.15s;
			user-select: none;

			&:hover {
				border-color: var(--color-accent);
				color: var(--color-accent);
			}
		}

		& input[type="radio"]:checked + label {
			background: var(--color-accent);
			border-color: var(--color-accent);
			color: #fff;
			box-shadow: 0 2px 10px rgba(255, 2, 153, 0.22);
		}
	}

	& .claim-type-question {
		margin-bottom: 0.875rem;
		padding-bottom: 0.875rem;
		border-bottom: 1px solid #f0f0f0;

		& legend {
			margin-bottom: 0.5rem;
		}

		& select {
			display: block;
			width: 100%;
			height: 44px;
			margin-top: 0.4rem;
			padding: 0 2.25rem 0 0.75rem;
			border: 2px solid #e0e0e0;
			border-radius: 8px;
			font-family: var(--font-base);
			font-size: 0.9rem;
			color: #333;
			background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
			appearance: none;
			cursor: pointer;
			transition: border-color 0.15s;

			&:focus {
				outline: none;
				border-color: var(--color-accent);
			}
		}
	}

	& .form-field {
		display: block;
		width: 100%;
		height: 44px;
		margin-bottom: 0.6rem;
		padding: 0 0.75rem;
		border: 2px solid #e0e0e0;
		border-radius: 8px;
		font-family: var(--font-base);
		font-size: 0.9rem;
		color: #333;
		background: #fafafa;
		transition: border-color 0.15s;

		&::placeholder {
			color: #aaa;
		}

		&:focus {
			outline: none;
			border-color: var(--color-accent);
			background: #fff;
		}
	}

	& .consent-text {
		color: var(--color-muted);
		font-size: 0.72rem;
		line-height: 1.5;
		margin: 0.6rem 0;
		text-align: left;

		& a {
			color: var(--color-accent-blue);
			text-decoration: underline;
		}
	}

	& .consent-checkbox {
		width: 16px;
		height: 16px;
		vertical-align: middle;
		margin-left: 4px;
		accent-color: var(--color-accent);
		cursor: pointer;
	}

	& .form-submit {
		display: block;
		width: 100%;
		padding: 0.9rem 1rem;
		background-color: var(--color-accent);
		color: var(--color-white);
		font-family: var(--font-base);
		font-size: 1.1rem;
		font-weight: 700;
		border: none;
		border-radius: 8px;
		cursor: pointer;
		margin-top: 0.75rem;
		letter-spacing: 0.01em;
		transition: background-color 0.2s, transform 0.1s;

		&:hover {
			background-color: #d6007f;
		}

		&:active {
			transform: scale(0.99);
		}
	}

	& .form-step__next,
	& .form-step__back {
		margin: 0.75rem 0;
	}

	& .continue {
		display: block;
		width: 100%;
		padding: 0.9rem 1rem;
		background-color: var(--color-accent);
		color: var(--color-white);
		text-align: center;
		border-radius: 8px;
		cursor: pointer;
		font-weight: 700;
		font-size: 1rem;
		letter-spacing: 0.01em;
		transition: background-color 0.2s, transform 0.1s;

		&:hover {
			background-color: #d6007f;
		}

		&:active {
			transform: scale(0.99);
		}
	}

	& .back {
		display: block;
		text-align: center;
		color: var(--color-muted);
		cursor: pointer;
		font-size: 0.85rem;
		padding: 0.4rem;
		transition: color 0.15s;

		&:hover {
			color: var(--color-primary);
			text-decoration: underline;
		}
	}

	& .form-help-text {
		font-size: 0.72rem;
		color: var(--color-muted);
		margin-top: 0.5rem;
		text-align: left;
		line-height: 1.5;
	}

	/* ── Trustpilot card widget ── */
	& .tp-widget {
		margin-top: 1rem;
		border: 1px solid #e5e5e5;
		border-radius: 10px;
		background: #f9f9f9;
		overflow: hidden;

		& .tp-widget__header {
			display: flex;
			align-items: center;
			justify-content: center;
			gap: 0.5rem;
			padding: 0.65rem 0.9rem;
			border-bottom: 1px solid #d0d0d0;
			background: #e5e5e5;
		}

		& .tp-widget__rated {
			font-size: 0.75rem;
			color: #000;
			font-weight: 500;
		}

		& .tp-widget__score {
			font-size: 1.4rem;
			font-weight: 700;
			color: #000;
			line-height: 1;
		}

		& .tp-widget__logo {
			display: flex;
			align-items: center;
			gap: 0.3rem;

			& svg {
				width: 20px;
				height: 20px;
				flex-shrink: 0;
			}

			& span {
				font-size: 0.8rem;
				font-weight: 700;
				color: #000;
				letter-spacing: -0.01em;
			}
		}

		& .tp-widget__review {
			padding: 0.75rem 0.9rem 0.8rem;
		}

		& .tp-widget__review-meta {
			display: flex;
			align-items: center;
			gap: 0.4rem;
			flex-wrap: nowrap;
			margin-bottom: 0.6rem;
			overflow: hidden;
		}

		& .tp-widget__avatar {
			width: 30px;
			height: 30px;
			border-radius: 50%;
			background: #c8960c;
			color: #fff;
			font-size: 0.7rem;
			font-weight: 700;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-shrink: 0;
			letter-spacing: 0.02em;
		}

		& .tp-widget__name {
			font-size: 0.8rem;
			font-weight: 700;
			color: #1a1a1a;
			white-space: nowrap;
		}

		& .tp-widget__stars {
			display: flex;
			gap: 2px;

			& span {
				display: inline-block;
				width: 18px;
				height: 18px;
				background: #00b67a;
				color: #fff;
				font-size: 11px;
				line-height: 18px;
				text-align: center;
				border-radius: 2px;
			}
		}

		& .tp-widget__verified {
			font-size: 0.72rem;
			color: #00b67a;
			font-weight: 600;
			white-space: nowrap;

			&::before {
				content: "✓ ";
				font-weight: 700;
			}
		}

		& .tp-widget__text {
			font-size: 0.78rem;
			color: #444;
			line-height: 1.55;
			margin: 0;
		}
	}
}

/* ─────────────────────────────────────────
   Compensation Examples
───────────────────────────────────────── */
.compensation-examples {
	background-image: url('../../images/mbr-2-1920x1280.jpg');
	background-size: cover;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	padding: 3rem;
	position: relative;

	&::before {
		content: '';
		position: absolute;
		inset: 0;
		background-color: rgb(118, 118, 118);
		opacity: 0.4;
		pointer-events: none;
	}

	& .compensation-examples__grid {
		position: relative;
		z-index: 1;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 1.5rem;
		max-width: var(--max-width);
		margin: 0 auto;
	}

	& .compensation-card {
		flex: 1 1 250px;
		max-width: 400px;
		padding: 3.3rem;
		background-color: var(--color-white);
		color: var(--color-muted);
		text-align: center;

		& .price-value {
			display: block;
			font-size: 1.2rem;
			font-weight: 700;
		}

		& .price-figure {
			display: block;
			font-size: 2rem;
			font-weight: 700;
			color: var(--color-accent);
			margin: 0.5rem 0;

			@media (max-width: 550px) {
				font-size: 3rem;
			}
		}

		& .plan-title {
			font-size: 1.2rem;
			margin-top: 1.4rem;
			color: var(--color-accent-blue);
		}

		& hr {
			margin: 2rem 0;
		}

		& .compensation-disclaimer {
			font-size: 0.8em;
		}

		@media (max-width: 767px) {
			padding: 1.5rem;
		}
	}

	@media (max-width: 767px) {
		padding: 3rem 1rem;
	}
}

/* ─────────────────────────────────────────
   Why Use Us
───────────────────────────────────────── */
.why-use-us {
	padding: 3rem 1rem;
	background-color: var(--color-white);

	& .why-use-us__inner {
		max-width: var(--max-width);
		margin: 0 auto;
	}

	& .why-use-us__heading {
		font-weight: 400;
		text-align: center;
		color: var(--color-accent-teal);
		margin-bottom: 2rem;

		@media(min-width: 1024px){
			font-size: 32px;
		}
	}

	& .why-use-us__grid {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 1.5rem;
	}

	& .why-card {
		flex: 1 1 250px;
		max-width: 380px;
		padding: 3.3rem;
		color: var(--color-muted);
		text-align: center;

		& .why-card__image {
			margin-bottom: 1rem;

			& img {
				border-radius: 50%;
				width: 200px;
			}
		}

		& .plan-title {
			font-size: 1.2rem;
			margin-top: 1.4rem;
			color: var(--color-accent);
		}

		& hr {
			margin: 2rem 0;
		}

		& .plan-body p {
			font-size: 1rem;
		}

		@media (max-width: 767px) {
			padding: 1.5rem;
		}
	}
}

/* ─────────────────────────────────────────
   Scroll-to-top Button
───────────────────────────────────────── */
#myBtn {
	display: none;
	position: fixed;
	bottom: 20px;
	right: 30px;
	z-index: 99;
	border: none;
	outline: none;
	background-color: var(--color-accent);
	color: var(--color-white);
	cursor: pointer;
	padding: 15px;
	border-radius: 150px;
	font-size: 28px;
	line-height: 1;
	transition: background-color 0.2s;

	&:hover {
		background-color: #555;
	}
}

/* ─────────────────────────────────────────
   Site Footer
───────────────────────────────────────── */
.site-footer {
	padding: 45px 0;
	background-color: var(--color-dark);

	& .site-footer__inner {
		max-width: var(--max-width);
		margin: 0 auto;
		padding: 0 2rem;
	}

	& .site-footer__top {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 2rem;
		margin-bottom: 1rem;
	}

	& .site-footer__logo img {
		height: 6rem;
		display: block;
	}

	& .site-footer__links {
		& ul {
			list-style: none;
			padding: 0;
			margin: 0;
			display: flex;
			flex-wrap: wrap;
			gap: 0.5rem 1rem;
			justify-content: flex-end;
		}

		& li + li::before {
			content: ' | ';
			color: var(--color-white);
		}

		& a {
			color: var(--color-white);
			transition: opacity 0.2s;

			&:hover {
				opacity: 0.7;
			}
		}
	}

	& hr {
		margin: 1rem 0;
		border: none;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	& .site-footer__legal {
		font-size: 0.8em;
		color: var(--color-muted);
	}

	@media (max-width: 767px) {
		& .site-footer__top {
			flex-direction: column;
			text-align: center;
		}

		& .site-footer__logo img {
			margin: 0 auto;
		}

		& .site-footer__links ul {
			justify-content: center;
		}

		& .site-footer__legal {
			text-align: center;
			margin-bottom: 1rem;
		}
	}
}