/**
 * egerzn.ru — visual refresh (2026-10-08).
 * Tokens, typography, buttons, forms, MFO cards. Content/HTML unchanged.
 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800&display=swap');

:root {
	/* Brand: calm fintech -> Baibol clone */
	--color-primary: #e30613;
	--color-primary-hover: #c40510;
	--color-on-primary: #ffffff;
	--color-cta: #e30613;
	--color-cta-hover: #c40510;
	--color-secondary: #111111;
	--color-on-secondary: #ffffff;
	--color-accent-warm: #ffb81c;
	--color-bg: #ffffff;
	--color-on-bg: #111111;
	--color-surface: #ffffff;
	--color-surface-low: #f4f5f7;
	--color-outline: #8a9aad;
	--color-outline-variant: #dde3ea;
	--color-disclaimer: #5c6b7a;
	--color-link: #e30613;
	--color-link-hover: #c40510;
	--color-success: #047857;
	--color-error: #e30613;

	--font-body: 'Montserrat', sans-serif;
	--font-heading: 'Montserrat', sans-serif;

	--prose-measure: 65ch;
	--text-body: 16px;
	--text-body-sm: 14px;
	--text-caption: 12px;
	--leading-body: 1.5;
	--leading-tight: 1.2;
	--focus-ring: 0 0 0 3px rgba(227, 6, 19, 0.35);
}

body {
	font-family: var(--font-body) !important;
	font-size: var(--text-body) !important;
	line-height: var(--leading-body);
	color: var(--color-on-bg);
	background: var(--color-bg);
}

a {
	color: var(--color-link);
}

a:hover {
	color: var(--color-link-hover);
}

/* Typography scale (text content unchanged) */
h1, h2, h3, h4, h5, h6, .headline-md, .display-lg {
	font-family: var(--font-heading) !important;
	color: var(--color-on-bg);
}

.display-lg {
	font-size: clamp(28px, 5vw, 48px) !important;
	font-weight: 800 !important;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.headline-md {
	font-size: clamp(24px, 4vw, 40px) !important;
	font-weight: 700 !important;
	line-height: var(--leading-tight);
	margin-bottom: 24px;
}

.headline-md--light {
	color: var(--color-on-secondary);
}

h3 {
	font-size: clamp(20px, 3vw, 24px) !important;
	font-weight: 600 !important;
}

.prose,
.landing-prose {
	max-width: 100% !important; /* Allow the wrapper to fill container */
}

.prose > *,
.landing-prose > * {
	max-width: var(--prose-measure);
}

/* Exempt grids and UI elements from prose constraints */
.prose .offers-grid,
.prose .partner-offers,
.prose [data-motion-section],
.landing-prose .offers-grid,
.landing-prose .hub-links,
.landing-prose .editorial-split,
.landing-prose .landing-wide-img,
.partner-offer-widget,
.offers-grid {
	max-width: none !important;
	width: 100%;
}

.prose p,
.landing-prose p {
	line-height: var(--leading-body);
}

/* Buttons */
.btn {
	min-height: 48px;
	padding: 8px 16px;
	font-size: 15px;
	font-family: var(--font-heading) !important;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	transition: all 0.2s ease;
	word-break: break-word;
	white-space: normal;
	line-height: 1.2;
}

.btn--primary {
	background: var(--color-cta);
	color: var(--color-on-primary);
	box-shadow: 0 1px 2px rgba(26, 35, 50, 0.06);
}

.btn--primary:hover {
	background: var(--color-cta-hover);
	color: var(--color-on-primary);
	box-shadow: var(--shadow-card);
}

.btn--primary:active {
	transform: translateY(1px);
}

.btn--secondary {
	background: var(--color-surface);
	color: var(--color-secondary);
	border-color: var(--color-outline-variant);
}

.btn--secondary:hover {
	border-color: var(--color-outline);
	background: var(--color-surface-low);
}

.btn--ghost {
	background: transparent;
	color: #111;
	border: 1px solid #dde3ea;
}

.btn--ghost:hover {
	background: #f4f5f7;
	border-color: #8a9aad;
	color: #e30613;
}

/* Beautiful red link buttons (Читать материал) */
.blog-slot-card__read,
.blog-archive-card__read {
	font-size: 14px;
	font-weight: 600;
	color: #e30613;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color 0.2s ease;
}

.blog-slot-card__read:hover,
.blog-archive-card__read:hover {
	color: #c40510;
}

.blog-slot-card__read::after,
.blog-archive-card__read::after {
	content: "→";
	font-size: 16px;
	line-height: 1;
	transition: transform 0.2s ease;
}

.blog-slot-card__read:hover::after,
.blog-archive-card__read:hover::after {
	transform: translateX(4px);
}

/* Fix "Подобрать займ" ghost button in blog cards to be perfectly aligned */
.blog-slot-card__actions {
	margin-top: auto;
	padding-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: flex-start;
}

.blog-slot-card__actions .btn {
	width: 100%;
}

.btn:focus-visible {
	outline: 2px solid var(--color-cta);
	outline-offset: 2px;
	box-shadow: var(--focus-ring);
}

.btn--sm {
	min-height: 40px;
	padding: 0 1rem;
	font-size: var(--text-body-sm);
}

/* Cards & surfaces */
.card-shell {
	border-radius: var(--radius-lg);
	border-color: var(--color-outline-variant);
	box-shadow: 0 1px 3px rgba(26, 35, 50, 0.06), 0 8px 24px rgba(26, 35, 50, 0.05);
}

/* Header styling to match Baibol (Red logo text) */
.site-header__logo-text {
	font-family: var(--font-heading) !important;
	font-weight: 800 !important;
	font-size: 20px !important;
	color: #e30613 !important;
	text-transform: uppercase;
	letter-spacing: -0.02em;
}

/* Compact and beautiful footer */
.site-footer {
	margin-top: 60px !important;
	background: #111 !important; /* Dark footer like Baibol */
	color: #fff !important;
	border: none !important;
}

.site-footer__cta-band {
    display: none !important; /* Hide massive CTA band in footer to make it compact */
}

.site-footer__grid {
	padding-block: 40px 20px !important;
	gap: 32px !important;
}

.site-footer__col-title {
	color: #fff !important;
	font-weight: 700 !important;
	font-family: var(--font-heading) !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	font-size: 16px !important;
}

.site-footer .nav-fallback a,
.site-footer .footer-contacts a,
.site-footer__operator {
	color: #a0a0a0 !important;
	font-size: 13px !important;
	min-height: 28px !important;
	padding: 2px 0 !important;
}

.site-footer .nav-fallback a:hover,
.site-footer .footer-contacts a:hover {
	color: #fff !important;
}

.site-footer__legal {
	padding-block: 20px 40px !important;
	border-top: 1px solid #333 !important;
}

.site-footer__disclaimer,
.site-footer__copy {
	color: #666 !important;
	font-size: 12px !important;
}

.section-band {
	padding-block: clamp(2rem, 5vw, 3rem);
}

/* MFO partner cards */
.partner-offer-widget.card-shell {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	padding: clamp(1rem, 3vw, 1.5rem);
}

.partner-offer-widget__brand {
	font-size: var(--text-caption);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-disclaimer);
	margin: 0;
}

.partner-offer-widget__title {
	margin: 0 0 var(--space-sm);
	font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
	line-height: var(--leading-tight);
}

.partner-offer-widget__specs--teaser {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-sm);
	margin-block: var(--space-sm);
}

.partner-offer-widget__spec {
	padding: var(--space-sm);
	background: var(--color-surface-low);
	border-radius: var(--radius-md);
	border: 1px solid var(--color-outline-variant);
}

.partner-offer-widget__spec dt {
	font-size: var(--text-caption);
	text-transform: none;
	letter-spacing: 0.02em;
	font-weight: 600;
}

.partner-offer-widget__spec dd {
	font-size: 16px;
	font-weight: 700;
	color: #111;
	line-height: 1.3;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.partner-offer-widget__cta {
	margin-top: 24px;
	padding-top: 0;
	width: 100%;
	max-width: none;
	margin-bottom: 24px;
}

.partner-offer-widget__fz-warning {
	display: none;
}

.partner-offer-widget__details {
	border-color: var(--color-outline-variant);
	background: var(--color-surface);
}

.partner-offer-widget__details-summary {
	font-size: var(--text-body-sm);
	font-weight: 600;
	color: var(--color-secondary);
}

.partner-offer-widget__details-summary:focus-visible {
	outline: 2px solid var(--color-cta);
	outline-offset: 2px;
}

.partner-offers__grid {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.partner-offers__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.partner-offers__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 900px) {
	.partner-offer-widget--featured {
		grid-column: 1 / -1;
	}
}

/* Fix inner layout to prevent text squishing on desktop/mobile */
.partner-offer-widget__layout {
	display: flex !important;
	flex-direction: column !important;
	gap: 16px !important;
}

.partner-offer-widget__media {
    max-width: 200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
	.partner-offer-widget--featured .partner-offer-widget__layout {
		flex-direction: row !important;
		align-items: center;
	}
	
	.partner-offer-widget--featured .partner-offer-widget__media {
		flex: 0 0 250px;
		margin: 0;
	}
}
	border-color: rgba(10, 124, 118, 0.35);
	background: linear-gradient(180deg, #ffffff 0%, #f3faf9 100%);
}

/* Lead form UI */
.lead-form-section__grid {
	gap: var(--space-lg);
}

.lead-form {
	display: grid;
	gap: var(--space-md);
}

.lead-form__field {
	margin: 0;
}

.lead-form__field label {
	display: block;
	margin-bottom: 6px;
	font-size: var(--text-body-sm);
	font-weight: 600;
	color: var(--color-secondary);
}

.lead-form__field .required {
	color: var(--color-error);
}

.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form input[type="email"],
.lead-form textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.4;
	color: var(--color-on-bg);
	background: var(--color-surface);
	border: 1px solid var(--color-outline-variant);
	border-radius: var(--radius-md);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lead-form textarea {
	min-height: 120px;
	resize: vertical;
}

.lead-form input:focus-visible,
.lead-form textarea:focus-visible {
	border-color: var(--color-primary);
	box-shadow: var(--focus-ring);
	outline: none;
}

.lead-form__field--checkbox label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
	font-size: var(--text-body-sm);
	line-height: 1.5;
}

.lead-form__field--checkbox input {
	margin-top: 4px;
	min-height: auto;
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
}

.lead-form__notice--success {
	color: var(--color-success);
}

.lead-form__notice--error {
	color: var(--color-error);
}

.lead-form button[type="submit"] {
	width: 100%;
	justify-content: center;
}

@media (min-width: 768px) {
	.lead-form button[type="submit"] {
		width: auto;
		min-width: 220px;
	}
}

/* Landing hero & baibol-like graphics */
.hero {
	background: #ffffff;
	position: relative;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	left: -5%;
	bottom: -10%;
	width: clamp(150px, 30vw, 300px);
	aspect-ratio: 1;
	background: #e30613; /* Baibol bright red */
	clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); /* Diamond */
	transform: rotate(15deg);
	z-index: 0;
	pointer-events: none;
}

.hero::after {
	content: "";
	position: absolute;
	right: -10%;
	top: -5%;
	width: clamp(200px, 40vw, 400px);
	aspect-ratio: 1;
	background: #ffb81c; /* Baibol bright yellow */
	clip-path: polygon(100% 0, 0 0, 100% 100%); /* Right Triangle */
	z-index: 0;
	pointer-events: none;
}

/* Landing hero text-only mode */
.landing-hero__grid--text-only {
	display: block !important;
	max-width: 800px;
	margin-inline: auto;
	text-align: center;
}

.landing-hero__grid--text-only .landing-hero__copy {
	align-items: center;
}

.geo-answer {
	background: #f4f5f7;
	padding: 24px;
	border-radius: 12px;
	margin-block: 24px;
	border-left: 4px solid #e30613;
	text-align: left;
}

.geo-answer .hero__answer-lead {
	margin: 0 !important;
	color: #111;
}

/* Badge for RF only */
.rf-only-badge {
	display: inline-block;
	background: #fff0f0;
	color: #e30613;
	border: 1px solid #ffd0d0;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 4px;
	margin-bottom: 12px;
}

/* Wide image fixes for internal pages */
.landing-wide-img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	margin-block: 24px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.05);
	object-fit: cover;
}

.hero__grid--ux {
	position: relative;
	z-index: 2;
}

.hero__hero-image {
	position: relative;
	z-index: 1;
}

.landing-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.landing-hero__actions .btn {
	flex: 1 1 auto;
}

@media (max-width: 480px) {
	.landing-hero__actions .btn {
		width: 100%;
	}
}

/* Basic Table Styles for Prose Content */
.prose table {
	width: 100%;
	border-collapse: collapse;
	margin-block: 24px;
	font-size: 15px;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.prose th,
.prose td {
	border: 1px solid #dde3ea;
	padding: 12px 16px;
	text-align: left;
}

.prose th {
	background: #f4f5f7;
	font-family: var(--font-heading) !important;
	font-weight: 600;
	color: #111;
}

.prose tr:nth-child(even) {
	background: #fafafa;
}

.prose tr:hover {
	background: #f4f5f7;
}

/* Ensure wide tables scroll horizontally on mobile */
.prose .table-responsive-wrap,
.prose .wp-block-table {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-block: 24px;
}
html,
body {
	overflow-x: clip;
}

@media (max-width: 960px) {
	.container {
		--gutter: 16px;
	}

	.partner-offer-widget__specs--teaser {
		grid-template-columns: 1fr;
	}
}

/* FAQ block matching Baibol */
.faq-section {
    background: #ffffff !important;
}

.faq-list {
	display: flex;
	flex-direction: column;
	gap: 12px !important;
}

.faq-item {
	background-color: #f4f5f7 !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden;
}

.faq-item__question {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px !important;
	cursor: pointer;
	font-size: clamp(16px, 2vw, 18px) !important;
	font-weight: 500 !important;
	color: #111 !important;
	list-style: none; /* remove default triangle */
}

/* Hide native detail marker for Safari/Chrome */
.faq-item__question::-webkit-details-marker {
	display: none;
}

/* Custom red chevron for Baibol look */
.faq-item__chevron {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	background: transparent !important;
}

.faq-item__chevron::before {
    display: none !important;
}

.faq-item__chevron::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 1.5px solid #e30613; /* Baibol red */
	border-bottom: 1.5px solid #e30613;
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
	display: block !important;
	background: transparent !important;
}

.faq-item[open] .faq-item__chevron::after {
	transform: rotate(45deg);
}

.faq-item__answer {
	padding: 0 24px 20px 24px !important;
	font-size: 14px !important;
	color: #444 !important;
	line-height: 1.5 !important;
}

@media (prefers-reduced-motion: reduce) {
	.btn--primary:active {
		transform: none;
	}

	.btn {
		transition: none;
	}
}
