/* ==========================================================================
   EdgePrint block patterns ("EdgePrint sagataves") and block styles.
   Used on content pages built in the block editor (no page builder).
   ========================================================================== */

/* Wide and full-width blocks break out of the 860px text column. */
.ep-page { overflow-x: clip; }
.ep-content > .alignwide {
	width: min(var(--ep-container), calc(100vw - var(--ep-gutter) * 2));
	max-width: none;
	margin-left: calc(50% - min(var(--ep-container), calc(100vw - var(--ep-gutter) * 2)) / 2);
}
.ep-content > .alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
.ep-content > .ep-p + .ep-p,
.ep-content > * + .ep-p,
.ep-content > * + .ep-p-cta,
.ep-content > * + .ep-p-full { margin-top: 0; }

/* Section ------------------------------------------------------------------ */
.ep-p { padding-block: 48px; }
.ep-p > * + * { margin-top: 0; }
.ep-content .ep-p-h2,
.ep-p-h2 {
	color: var(--ep-ink); font-family: var(--ep-font-ui);
	font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; letter-spacing: -1.2px; line-height: 1.08;
	margin: 0 0 16px;
}
.ep-p-lead { color: #5a5f66; font-family: var(--ep-font-ui); font-size: 18px; line-height: 1.5; margin: 0 0 24px; max-width: 680px; }
.ep-p .ep-kicker { margin-bottom: 12px; }
.ep-p-cols { gap: 48px; margin: 0; }

/* Images */
.ep-p-img { margin: 0; }
.ep-p-img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 24px; display: block; }

/* Check list */
.ep-p-check { list-style: none; padding: 0 !important; margin: 16px 0 0; }
.ep-p-check li { position: relative; padding-left: 32px; margin-bottom: 10px; font-family: var(--ep-font-ui); font-size: 16px; }
.ep-p-check li::before {
	content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
	background: #fdecea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23d0120c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* Buttons (block styles) */
.wp-block-buttons { gap: 12px; margin-top: 8px; }
.wp-block-button.is-style-ep-accent .wp-block-button__link,
.wp-block-button.is-style-ep-light .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 28px; border-radius: 999px; border: 1px solid var(--ep-line);
	font: 700 15px/1.2 var(--ep-font-ui); text-decoration: none;
	transition: transform .15s ease, background .15s ease;
}
.wp-block-button.is-style-ep-accent .wp-block-button__link {
	background: var(--ep-accent); border-color: var(--ep-accent); color: #fff;
	box-shadow: 0 14px 30px -14px rgb(227 21 15 / .7);
}
.wp-block-button.is-style-ep-accent .wp-block-button__link:hover { background: #c9120d; transform: translateY(-1px); }
.wp-block-button.is-style-ep-light .wp-block-button__link { background: var(--ep-surface); color: var(--ep-ink); }
.wp-block-button.is-style-ep-light .wp-block-button__link:hover { transform: translateY(-1px); }
.ep-content .wp-block-button__link { color: inherit; }
.ep-content .is-style-ep-accent .wp-block-button__link { color: #fff; }

/* White card (group style) */
.wp-block-group.is-style-ep-card {
	height: 100%; background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: 24px; padding: 30px;
	transition: box-shadow .35s ease, border-color .35s ease;
}
.wp-block-group.is-style-ep-card:hover { box-shadow: 0 18px 40px rgb(0 0 0 / .08); border-color: #f2c4c1; }
.is-style-ep-card > * + * { margin-top: 0; }
.is-style-ep-card h3 { color: var(--ep-ink) !important; font-size: 21px; letter-spacing: -.2px; margin: 0 0 10px !important; }
.is-style-ep-card p { color: #5a5f66; font-family: var(--ep-font-ui); font-size: 15px; line-height: 1.6; margin: 0; }
.ep-p-num { color: var(--ep-accent) !important; font: 700 13px/1 var(--ep-font-ui) !important; letter-spacing: 1.4px; margin: 0 0 36px !important; }
.ep-p-cards { gap: 16px; margin: 8px 0 0; }

/* Dark call to action (group style) */
.wp-block-group.is-style-ep-dark {
	background: var(--ep-dark); color: #c4c7cc; border-radius: 28px; padding: 56px 48px; margin-block: 48px;
}
.is-style-ep-dark > * + * { margin-top: 0; }
.is-style-ep-dark h2, .is-style-ep-dark h3, .is-style-ep-dark .ep-p-h2 { color: #fff !important; }
.is-style-ep-dark .ep-p-lead { color: #b9bdc3; }
.is-style-ep-dark .ep-kicker { color: #ff4a44; }

/* Gallery */
.ep-p-gallery.wp-block-gallery { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px !important; margin: 8px 0 32px; }
.ep-p-gallery.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ep-p-gallery.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ep-p-gallery.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ep-p-gallery.wp-block-gallery figure.wp-block-image { width: auto !important; margin: 0 !important; }
.ep-p-gallery.wp-block-gallery img { width: 100%; height: auto !important; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }

/* FAQ (core Details block) */
.ep-p-faq .wp-block-details,
.ep-content .wp-block-details { background: var(--ep-surface); border-radius: 16px; margin: 0 0 10px; }
.wp-block-details summary {
	list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; position: relative;
	font: 700 16px/1.4 var(--ep-font-ui); color: var(--ep-ink);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: 20px; top: 50%; width: 24px; height: 24px; margin-top: -12px;
	border-radius: 50%; border: 1px solid var(--ep-line);
	background: linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 10px no-repeat;
}
.wp-block-details[open] summary::after { background: linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat; }
.wp-block-details > :not(summary) { padding: 0 22px 20px; margin: 0; color: var(--ep-ink-soft); font-size: 16px; }

/* Section blocks (why us, reviews) placed on a content page */
.ep-p-full > * + * { margin-top: 0; }
/* Undo the generic page text styles (.ep-content h2 / a) inside the section blocks. */
.ep-content .ep-p-full h2,
.ep-content .ep-p-full h3 { color: var(--ep-ink); margin-top: 0; }
.ep-content .ep-p-full a { color: inherit; }
.ep-content .ep-p-full .ep-btn--accent { color: #fff; }
.ep-content .ep-p-full .ep-reviews .ep-h2 { font-size: clamp(34px, 4.6vw, 56px); }

@media (max-width: 781px) {
	.ep-p { padding-block: 32px; }
	.ep-p-cols { gap: 28px; }
	.ep-p-img img { aspect-ratio: 4 / 3; }
	.wp-block-group.is-style-ep-dark { padding: 40px 24px; border-radius: 24px; }
	.ep-p-gallery.wp-block-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
}

/* Block editor: blocks inside a wide section use the full section width, as on the site. */
.editor-styles-wrapper .alignwide.ep-p .wp-block,
.editor-styles-wrapper .alignwide.is-style-ep-dark .wp-block { max-width: none; }

/* Text with cards (edgeprint/text-cards) ---------------------------------- */
.ep-tc { padding-block: 72px 32px; }
.ep-tc__head { max-width: 820px; margin-bottom: 36px; }
.ep-tc__head .ep-lead { margin-top: 4px; }
.ep-tc__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ep-tc__item { background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: 24px; padding: 28px 26px; transition: box-shadow .35s ease, border-color .35s ease; }
.ep-tc__item:hover { box-shadow: 0 18px 40px rgb(0 0 0 / .08); border-color: #f2c4c1; }
.ep-tc__num { display: block; color: var(--ep-accent); font: 700 13px/1 var(--ep-font-ui); letter-spacing: 1.4px; margin-bottom: 32px; }
.ep-tc__item h3 { font-size: 20px; letter-spacing: -.2px; margin: 0 0 10px; color: var(--ep-ink); }
.ep-tc__item p { color: #5a5f66; font-family: var(--ep-font-ui); font-size: 15px; line-height: 1.6; margin: 0; }
@media (max-width: 1024px) { .ep-tc__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ep-tc { padding-block: 48px 16px; } .ep-tc__list { grid-template-columns: 1fr; } }
