/* ============================================================
 * EverydayProtect — Costs & Cover page
 *
 * Scoped to the .content-page-template main element only, so
 * adding this file to the theme doesn't touch any other page.
 * Loaded by template-content.php on pages using the "Content
 * Page" template.
 * ============================================================ */

/* ---- Page container --------------------------------------- */
.content-page-template .full-width-content-block.content-page-block {
	max-width: 920px;
	margin: 0 auto;
}

/* Breathing room above the footer (desktop). Tightened on mobile below. */
.content-page-template .full-width-content {
	margin-bottom: 100px;
}

.content-page-template .entry-header {
	margin-bottom: 0.5rem;
}

.content-page-template .entry-title {
	margin-bottom: 1.25rem;
}

.content-page-template .entry-content > p:first-child {
	font-size: 1.05rem;
	color: #1a2b55;
}

/* ---- Section wrappers ------------------------------------- */
.content-page-template .ep-section {
	margin-top: 2.5rem;
}

.content-page-template .ep-section h2.wp-block-heading {
	padding-bottom: 0.4rem;
	margin-bottom: 1rem;
	border-bottom: 3px solid currentColor;
	display: inline-block;
}

.content-page-template .ep-section-core h2.wp-block-heading { color: #1a2b55; }
.content-page-template .ep-section-child h2.wp-block-heading { color: #3f7d3a; }
.content-page-template .ep-section-active h2.wp-block-heading { color: #6b4ea3; }

.content-page-template .ep-section h3.wp-block-heading {
	font-size: 1.15rem;
	margin-top: 2rem;
	margin-bottom: 0.6rem;
	color: #0c1427;
}

/* ---- Tables: base ----------------------------------------- */
.content-page-template .wp-block-table {
	margin: 1.5rem 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background:
		linear-gradient(to right, #ffffff 30%, rgba(255,255,255,0)) 0 0,
		linear-gradient(to right, rgba(255,255,255,0), #ffffff 70%) 100% 0,
		radial-gradient(ellipse at 0 50%, rgba(12,20,39,0.12), rgba(12,20,39,0) 75%) 0 50%,
		radial-gradient(ellipse at 100% 50%, rgba(12,20,39,0.12), rgba(12,20,39,0) 75%) 100% 50%;
	background-repeat: no-repeat;
	background-size: 32px 100%, 32px 100%, 14px 60%, 14px 60%;
	background-attachment: local, local, scroll, scroll;
	background-color: #ffffff;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(12,20,39,0.06);
}

.content-page-template .wp-block-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.95rem;
	line-height: 1.4;
	background: #ffffff;
	overflow: hidden;
	border-radius: 10px;
}

.content-page-template .wp-block-table th,
.content-page-template .wp-block-table td {
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid #eef0f5;
	text-align: center;
	vertical-align: top;
}

.content-page-template .wp-block-table th:first-child,
.content-page-template .wp-block-table td:first-child {
	text-align: left;
}

.content-page-template .wp-block-table thead th {
	background: #1a2b55; /* navy default */
	color: #ffffff;
	font-weight: 600;
	font-size: 0.78rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	border-bottom: none;
	white-space: nowrap;
	position: relative;
}

.content-page-template .wp-block-table thead th:first-child {
	text-align: left;
}

.content-page-template .wp-block-table tbody tr:nth-child(even) td {
	background: #f7f9fc;
}

.content-page-template .wp-block-table tbody tr:last-child td {
	border-bottom: none;
}

.content-page-template .wp-block-table tbody tr td strong {
	color: #0c1427;
}

.content-page-template .wp-block-table figcaption {
	font-size: 0.82rem;
	color: #788198;
	margin: 0.6rem 0.25rem 0;
	text-align: left;
	font-style: italic;
}

/* ---- Per-section branded headers -------------------------- */
.content-page-template .ep-section-core .wp-block-table thead th { background: #1a2b55; }
.content-page-template .ep-section-child .wp-block-table thead th { background: #3f7d3a; }
.content-page-template .ep-section-active .wp-block-table thead th { background: #6b4ea3; }

/* Pricing matrix at the top — coloured row labels to preview the section colours */
.content-page-template .ep-cost-table tbody tr:nth-child(1) td:first-child { border-left: 4px solid #1a2b55; }
.content-page-template .ep-cost-table tbody tr:nth-child(2) td:first-child { border-left: 4px solid #3f7d3a; }
.content-page-template .ep-cost-table tbody tr:nth-child(3) td:first-child { border-left: 4px solid #6b4ea3; }

.content-page-template .ep-cost-table tbody td {
	font-size: 1.05rem;
	font-weight: 500;
}

.content-page-template .ep-cost-table tbody td:first-child {
	font-weight: 400;
}

/* ---- Callouts (the £50k cap + footnotes + Active limits) -- */
.content-page-template .ep-callout {
	margin: 1.5rem 0;
	background-color: #eef3ff !important;
	border-left: 4px solid #1a2b55;
	border-radius: 8px;
}

.content-page-template .ep-section-child .ep-callout {
	border-left-color: #3f7d3a;
}

.content-page-template .ep-section-active .ep-callout {
	border-left-color: #6b4ea3;
}

.content-page-template .ep-callout h4 {
	margin-top: 0;
	font-size: 1rem;
	color: #1a2b55;
}

.content-page-template .ep-callout ul {
	margin: 0;
	padding-left: 1.25rem;
}

.content-page-template .ep-callout li + li {
	margin-top: 0.5rem;
}

/* ============================================================
 * Landing page sections (used on /everydayprotect/)
 * ============================================================ */

/* ---- Hero ------------------------------------------------- */
.content-page-template .ep-hero {
	margin: 0 0 2.5rem;
	padding: 2rem 2rem 1.75rem;
	background: linear-gradient(135deg, #eef3ff 0%, #ffffff 60%);
	border-left: 4px solid #4fc0a2;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(12,20,39,0.06);
}

.content-page-template .ep-hero__lead {
	font-size: 1.15rem;
	line-height: 1.55;
	color: #0c1427;
	margin: 0 0 1.1rem;
}

.content-page-template .ep-hero__lead strong {
	color: #1a2b55;
}

.content-page-template .ep-hero__bullets {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.content-page-template .ep-hero__bullets li {
	padding-left: 1.75rem;
	position: relative;
	margin-bottom: 0.45rem;
	font-size: 0.98rem;
	color: #1a2b55;
}

.content-page-template .ep-hero__bullets li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45rem;
	width: 1.1rem;
	height: 1.1rem;
	background: #4fc0a2;
	border-radius: 50%;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><polyline points='3 7 6 10 11 4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-position: center;
	background-repeat: no-repeat;
}

.content-page-template .ep-hero__buttons {
	gap: 0.75rem;
	margin: 0;
}

.content-page-template .ep-hero__btn--primary .wp-block-button__link {
	background-color: #4fc0a2;
	color: #ffffff;
	font-weight: 600;
	padding: 0.85rem 1.6rem;
	border-radius: 8px;
	border: none;
	box-shadow: 0 2px 6px rgba(79,192,162,0.35);
	transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
	text-decoration: none;
}

.content-page-template .ep-hero__btn--primary .wp-block-button__link:hover,
.content-page-template .ep-hero__btn--primary .wp-block-button__link:focus {
	background-color: #42b493;
	box-shadow: 0 4px 10px rgba(66,180,147,0.4);
	transform: translateY(-1px);
	color: #ffffff;
}

.content-page-template .ep-hero__btn--secondary .wp-block-button__link {
	background: transparent;
	color: #1a2b55;
	font-weight: 600;
	padding: 0.85rem 1.6rem;
	border-radius: 8px;
	border: 2px solid #1a2b55;
	transition: background-color 0.18s ease, color 0.18s ease;
	text-decoration: none;
}

.content-page-template .ep-hero__btn--secondary .wp-block-button__link:hover,
.content-page-template .ep-hero__btn--secondary .wp-block-button__link:focus {
	background-color: #1a2b55;
	color: #ffffff;
}

/* ---- Feature grid (6 cards: "Why people choose") --------- */
.content-page-template .ep-feature-grid {
	margin: 1rem 0 0.5rem;
	gap: 1rem;
}

.content-page-template .ep-feature-grid + .ep-feature-grid {
	margin-top: 0.5rem;
}

.content-page-template .ep-feature-card {
	background: #ffffff;
	border: 1px solid #e3e6ee;
	border-radius: 10px;
	padding: 1.25rem 1.25rem;
	height: 100%;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
	border-top: 3px solid #4fc0a2;
}

.content-page-template .ep-feature-card:hover {
	box-shadow: 0 4px 14px rgba(12,20,39,0.08);
	transform: translateY(-2px);
}

.content-page-template .ep-feature-card h3 {
	margin: 0 0 0.4rem;
	font-size: 1.1rem;
	color: #1a2b55;
}

.content-page-template .ep-feature-card p {
	margin: 0;
	color: #4a5670;
	font-size: 0.95rem;
	line-height: 1.5;
}

/* ---- Audience grid (3 cards) ----------------------------- */
.content-page-template .ep-audience-grid {
	margin: 1.25rem 0;
	gap: 1rem;
}

.content-page-template .ep-audience-card {
	background: #ffffff;
	border-radius: 10px;
	padding: 1.5rem;
	height: 100%;
	border-top: 4px solid #1a2b55;
	box-shadow: 0 1px 3px rgba(12,20,39,0.06);
}

.content-page-template .ep-audience-card--sport { border-top-color: #6b4ea3; }
.content-page-template .ep-audience-card--selfemp { border-top-color: #1a2b55; }
.content-page-template .ep-audience-card--family { border-top-color: #3f7d3a; }

.content-page-template .ep-audience-card h3 {
	margin: 0 0 0.6rem;
	font-size: 1.15rem;
	color: #1a2b55;
}

.content-page-template .ep-audience-card p {
	margin: 0;
	color: #4a5670;
	font-size: 0.97rem;
	line-height: 1.55;
}

/* ---- Stat grid (4 cards: MetLife stats) ------------------ */
.content-page-template .ep-stat-grid {
	margin: 1.25rem 0;
	gap: 0.85rem;
}

.content-page-template .ep-stat-card {
	background: linear-gradient(135deg, #1a2b55 0%, #2d3f6f 100%);
	color: #ffffff;
	border-radius: 10px;
	padding: 1.25rem 1rem;
	text-align: center;
	height: 100%;
}

.content-page-template .ep-stat-card__number {
	margin: 0 0 0.25rem;
	font-size: 2.1rem;
	font-weight: 700;
	color: #4fc0a2;
	line-height: 1.1;
	letter-spacing: -0.5px;
}

.content-page-template .ep-stat-card__label {
	margin: 0;
	font-size: 0.82rem;
	color: rgba(255,255,255,0.85);
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

/* ---- FAQ (HTML5 details) --------------------------------- */
.content-page-template .ep-faq {
	background: #ffffff;
	border: 1px solid #e3e6ee;
	border-radius: 10px;
	margin: 0 0 0.75rem;
	overflow: hidden;
	transition: box-shadow 0.18s ease;
}

.content-page-template .ep-faq[open] {
	box-shadow: 0 2px 8px rgba(12,20,39,0.07);
}

.content-page-template .ep-faq summary {
	padding: 1rem 3rem 1rem 1.25rem;
	cursor: pointer;
	font-weight: 600;
	color: #1a2b55;
	font-size: 1rem;
	position: relative;
	list-style: none;
	transition: background-color 0.15s ease;
}

.content-page-template .ep-faq summary::-webkit-details-marker {
	display: none;
}

.content-page-template .ep-faq summary:hover {
	background-color: #f7f9fc;
}

.content-page-template .ep-faq summary::after {
	content: "";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	width: 0.85rem;
	height: 0.85rem;
	margin-top: -0.45rem;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><polyline points='3 5 7 9 11 5' fill='none' stroke='%231a2b55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.2s ease;
}

.content-page-template .ep-faq[open] summary::after {
	transform: rotate(180deg);
}

.content-page-template .ep-faq > p,
.content-page-template .ep-faq > div > p {
	margin: 0;
	padding: 0 1.25rem 1.1rem;
	color: #4a5670;
	font-size: 0.97rem;
	line-height: 1.55;
}

.content-page-template .ep-faq p strong {
	color: #1a2b55;
}

/* ---- Disclaimer + fineprint ------------------------------ */
.content-page-template .ep-fineprint,
.content-page-template .ep-disclaimer {
	color: #788198;
	font-size: 0.82rem;
	line-height: 1.5;
	margin-top: 0.75rem;
}

.content-page-template .ep-disclaimer {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e3e6ee;
}

/* ---- Apply CTA -------------------------------------------- */
.content-page-template .ep-apply-cta {
	margin: 2.5rem auto 0;
	padding: 2rem 1.5rem;
	background: linear-gradient(135deg, #eef3ff 0%, #f7f9fc 100%);
	border-radius: 12px;
	text-align: center;
}

.content-page-template .ep-apply-cta__heading {
	margin: 0 0 0.4rem;
	color: #1a2b55;
	font-size: 1.4rem;
}

.content-page-template .ep-apply-cta__lead {
	margin: 0 0 1.25rem;
	color: #4a5670;
	font-size: 1rem;
}

.content-page-template .ep-apply-cta__buttons {
	margin: 0;
}

.content-page-template .ep-apply-cta__button .wp-block-button__link {
	background-color: #4fc0a2;
	color: #ffffff;
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.2px;
	padding: 0.85rem 1.75rem;
	border-radius: 8px;
	border: none;
	box-shadow: 0 2px 6px rgba(79,192,162,0.35);
	transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
	text-decoration: none;
	display: inline-block;
}

.content-page-template .ep-apply-cta__button .wp-block-button__link:hover,
.content-page-template .ep-apply-cta__button .wp-block-button__link:focus {
	background-color: #42b493;
	box-shadow: 0 4px 10px rgba(66,180,147,0.4);
	transform: translateY(-1px);
	color: #ffffff;
}

/* ---- Mobile (<= 768px) ----------------------------------- */
@media (max-width: 768px) {

	.content-page-template .full-width-content {
		margin-bottom: 50px;
	}

	.content-page-template .full-width-content-block.content-page-block {
		padding: 0 0.25rem;
	}

	.content-page-template .entry-title {
		font-size: 1.6rem;
	}

	.content-page-template .ep-section {
		margin-top: 1.75rem;
	}

	.content-page-template .ep-section h2.wp-block-heading {
		font-size: 1.35rem;
	}

	.content-page-template .ep-section h3.wp-block-heading {
		font-size: 1.05rem;
		margin-top: 1.5rem;
	}

	/* Swipe hint on every scrolling table (cost matrix + benefit tables) */
	.content-page-template .ep-benefit-table::before,
	.content-page-template .ep-cost-table::before {
		content: "Swipe table to see all unit levels →";
		display: block;
		font-size: 0.72rem;
		color: #788198;
		text-transform: uppercase;
		letter-spacing: 0.6px;
		margin: 0 0.25rem 0.4rem;
	}

	.content-page-template .wp-block-table table {
		font-size: 0.82rem;
		min-width: 540px;
	}

	.content-page-template .wp-block-table th,
	.content-page-template .wp-block-table td {
		padding: 0.55rem 0.55rem;
	}

	.content-page-template .wp-block-table thead th {
		font-size: 0.7rem;
	}

	/* Sticky first column so the row label stays visible while scrolling £ columns.
	 * Applies to both the pricing matrix and the benefit tables so labels like
	 * "Active Lifestyle Cover (optional)" stay readable. */
	.content-page-template .ep-benefit-table th:first-child,
	.content-page-template .ep-benefit-table td:first-child,
	.content-page-template .ep-cost-table th:first-child,
	.content-page-template .ep-cost-table td:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		min-width: 180px;
		max-width: 220px;
		box-shadow: 2px 0 4px -2px rgba(12,20,39,0.15);
	}

	.content-page-template .ep-benefit-table tbody tr td:first-child,
	.content-page-template .ep-cost-table tbody tr td:first-child {
		background: #ffffff;
	}

	.content-page-template .ep-benefit-table tbody tr:nth-child(even) td:first-child,
	.content-page-template .ep-cost-table tbody tr:nth-child(even) td:first-child {
		background: #f7f9fc;
	}

	.content-page-template .ep-callout {
		padding: 1rem 1.1rem !important;
	}

	.content-page-template .ep-callout p,
	.content-page-template .ep-callout li {
		font-size: 0.92rem;
	}

	.content-page-template .ep-apply-cta {
		padding: 1.5rem 1rem;
		margin-top: 2rem;
	}

	.content-page-template .ep-apply-cta__heading {
		font-size: 1.25rem;
	}

	.content-page-template .ep-apply-cta__lead {
		font-size: 0.95rem;
	}

	.content-page-template .ep-apply-cta__button .wp-block-button__link {
		padding: 0.8rem 1.4rem;
		font-size: 0.95rem;
	}

	/* Hero */
	.content-page-template .ep-hero {
		padding: 1.5rem 1.25rem 1.25rem;
		border-radius: 12px;
	}

	.content-page-template .ep-hero__lead {
		font-size: 1.05rem;
	}

	.content-page-template .ep-hero__bullets li {
		font-size: 0.95rem;
	}

	.content-page-template .ep-hero__buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.content-page-template .ep-hero__btn--primary .wp-block-button__link,
	.content-page-template .ep-hero__btn--secondary .wp-block-button__link {
		display: block;
		text-align: center;
		padding: 0.85rem 1rem;
	}

	/* Feature + audience grids — let WP columns stack naturally,
	 * but tighten cards */
	.content-page-template .ep-feature-card,
	.content-page-template .ep-audience-card {
		padding: 1.1rem;
	}

	.content-page-template .ep-feature-grid,
	.content-page-template .ep-audience-grid,
	.content-page-template .ep-stat-grid {
		gap: 0.85rem;
	}

	/* Stat numbers a bit smaller */
	.content-page-template .ep-stat-card__number {
		font-size: 1.75rem;
	}

	.content-page-template .ep-stat-card__label {
		font-size: 0.78rem;
	}

	/* FAQ tighter padding */
	.content-page-template .ep-faq summary {
		padding: 0.85rem 2.5rem 0.85rem 1rem;
		font-size: 0.95rem;
	}

	.content-page-template .ep-faq summary::after {
		right: 1rem;
	}

	.content-page-template .ep-faq > p,
	.content-page-template .ep-faq > div > p {
		padding: 0 1rem 1rem;
		font-size: 0.93rem;
	}
}

/* ---- Tighter still on very narrow screens ---------------- */
@media (max-width: 420px) {
	.content-page-template .wp-block-table table {
		font-size: 0.78rem;
	}

	.content-page-template .ep-benefit-table th:first-child,
	.content-page-template .ep-benefit-table td:first-child,
	.content-page-template .ep-cost-table th:first-child,
	.content-page-template .ep-cost-table td:first-child {
		min-width: 150px;
		max-width: 170px;
	}
}
