/* =========================================================
   Matbet theme — main stylesheet
   Brand colors are overridden live via --matbet-primary /
   --matbet-accent custom properties (see inc/customizer.php)
   ========================================================= */

:root {
	--matbet-primary: #12224d;
	--matbet-primary-dark: #0b1730;
	--matbet-accent: #39a845;
	--matbet-accent-dark: #2c8a37;
	--matbet-text: #ffffff;
	--matbet-muted: #b8c2dd;
	--matbet-radius: 10px;
	--matbet-max-width: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: #f4f5f7;
	color: #1a1a1a;
	line-height: 1.5;
}

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

a { color: inherit; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	border: 2px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
	white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--outline {
	background: transparent;
	border-color: var(--matbet-accent);
	color: #fff;
}
.btn--outline:hover { background: rgba(57, 168, 69, .12); }

.btn--solid {
	background: var(--matbet-accent);
	color: #fff;
}
.btn--solid:hover { background: var(--matbet-accent-dark); }

.btn--lg { padding: 16px 30px; font-size: 17px; }

.btn__icon { font-size: 14px; }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.matbet-header {
	background: var(--matbet-primary-dark);
	position: sticky;
	top: 0;
	z-index: 40;
}
.matbet-header__inner {
	max-width: var(--matbet-max-width);
	margin: 0 auto;
	padding: 18px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.matbet-logo { display: inline-flex; align-items: center; text-decoration: none; }
.matbet-logo img { max-height: 42px; width: auto; }
.matbet-logo__text {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 2px;
	color: #fff;
}
.matbet-header__actions { display: flex; align-items: center; gap: 14px; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.matbet-hero {
	position: relative;
	background: linear-gradient(120deg, var(--matbet-primary) 0%, var(--matbet-primary-dark) 100%);
	overflow: hidden;
	padding: 80px 32px 100px;
	min-height: 640px;
	display: flex;
	align-items: center;
}
.matbet-hero__content {
	position: relative;
	z-index: 3;
	max-width: 560px;
	margin: 0 auto 0 max(32px, calc(50% - 640px + 32px));
}
.matbet-hero__title {
	font-size: clamp(46px, 6vw, 78px);
	font-weight: 900;
	color: #fff;
	margin: 0 0 4px;
	line-height: 1;
	letter-spacing: 1px;
}
.matbet-hero__subtitle {
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 800;
	color: var(--matbet-accent);
	margin: 0 0 24px;
}
.matbet-hero__description {
	color: var(--matbet-muted);
	font-size: 17px;
	margin: 0 0 32px;
	max-width: 460px;
}
.matbet-hero__image {
	position: absolute;
	inset: 0;
	background-image: var(--hero-bg-image);
	background-size: cover;
	background-position: center;
	clip-path: polygon(38% 0, 100% 0, 100% 100%, 55% 100%);
	opacity: .55;
	z-index: 1;
}
.matbet-hero__piece {
	position: absolute;
	left: -40px;
	bottom: -20px;
	width: 320px;
	opacity: .35;
	z-index: 2;
	pointer-events: none;
}

@media (max-width: 900px) {
	.matbet-hero { padding: 56px 20px 70px; min-height: auto; }
	.matbet-hero__content { margin: 0 auto; text-align: center; }
	.matbet-hero__description { margin-left: auto; margin-right: auto; }
	.matbet-hero__image { clip-path: none; opacity: .25; }
	.matbet-hero__piece { display: none; }
}

/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */
.matbet-faq {
	background: #eef0f3;
	padding: 60px 24px 90px;
}
.matbet-faq__inner {
	max-width: 900px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.matbet-faq__item {
	background: #fff;
	border-radius: var(--matbet-radius);
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	overflow: hidden;
}
.matbet-faq__question {
	width: 100%;
	background: none;
	border: none;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px 26px;
	text-align: left;
	font-size: 17px;
	font-weight: 700;
	color: var(--matbet-accent);
}
.matbet-faq__caret {
	transition: transform .2s ease;
	color: var(--matbet-accent);
	font-size: 13px;
	flex-shrink: 0;
}
.matbet-faq__item.is-open .matbet-faq__caret { transform: rotate(-180deg); }

.matbet-faq__answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height .25s ease, padding .25s ease;
	padding: 0 26px;
	border-top: 1px solid transparent;
}
.matbet-faq__item.is-open .matbet-faq__answer {
	max-height: 400px;
	padding: 0 26px 22px;
	border-top-color: #eee;
}
.matbet-faq__answer p { margin: 16px 0 0; color: #4a4a4a; font-size: 15.5px; }
.matbet-faq__item.is-open .matbet-faq__answer p { margin-top: 12px; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.matbet-footer {
	background: var(--matbet-primary-dark);
	color: var(--matbet-muted);
	padding: 50px 24px 34px;
}
.matbet-footer__inner {
	max-width: 1000px;
	margin: 0 auto;
	text-align: center;
}
.matbet-footer__logos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 18px;
	margin-bottom: 32px;
}
/* Every uploaded icon — whatever its native size — is constrained to this
   frame and scaled to fit inside it without stretching or distortion. */
.matbet-footer__logo-frame {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 38px;
	flex-shrink: 0;
}
.matbet-footer__logo-frame img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: .9;
}

.matbet-footer__text {
	font-size: 14.5px;
	line-height: 1.7;
	max-width: 820px;
	margin: 0 auto 22px;
}
.matbet-footer__disclaimer {
	font-size: 13.5px;
	color: #ffd873;
	max-width: 820px;
	margin: 0 auto 20px;
	line-height: 1.6;
}
.matbet-footer__disclaimer strong { color: #ffd873; }
.matbet-footer__license {
	font-size: 12.5px;
	color: #8b96b8;
	max-width: 780px;
	margin: 0 auto 10px;
	line-height: 1.6;
}
.matbet-footer__copyright { font-size: 12.5px; color: #6f7aa0; margin: 0; }

.matbet-lang-toggle {
	display: inline-flex;
	gap: 4px;
	margin-top: 18px;
	padding: 3px;
	background: rgba(255,255,255,.06);
	border-radius: 8px;
}
.matbet-lang-btn {
	border: none;
	background: transparent;
	color: var(--matbet-muted);
	font-size: 12.5px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 6px;
	letter-spacing: .5px;
}
.matbet-lang-btn.is-active {
	background: var(--matbet-accent);
	color: #fff;
}

/* ---------------------------------------------------------
   Partnership loading modal
   --------------------------------------------------------- */
.matbet-modal {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	transition: opacity .25s ease, visibility .25s ease;
}
.matbet-modal.is-visible { visibility: visible; opacity: 1; }
body.matbet-modal-open { overflow: hidden; }

.matbet-modal__backdrop {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at center, var(--matbet-primary) 0%, var(--matbet-primary-dark) 100%);
}
.matbet-modal__panel {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 40px;
	max-width: 480px;
}
.matbet-modal__logos {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-bottom: 28px;
}
.matbet-modal__logo {
	max-height: 64px;
	max-width: 140px;
	width: auto;
	object-fit: contain;
	background: var(--matbet-logo-box-bg, #fff);
	border-radius: 10px;
	padding: 10px 16px;
	opacity: 0;
	transform: scale(.8);
	animation: matbet-logo-pop .5s ease forwards;
}
.matbet-modal__logo--a { animation-delay: .1s; }
.matbet-modal__logo--b { animation-delay: .35s; }

/* Connector — only the style matching the modal's modifier class shows */
.matbet-modal__connector {
	display: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	position: relative;
	flex-shrink: 0;
}
.matbet-modal--style-dots .matbet-modal__connector--dots,
.matbet-modal--style-ring .matbet-modal__connector--ring {
	display: flex;
}

/* Style 1: pulsing dots */
.matbet-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--matbet-accent);
	display: inline-block;
	margin: 0 2px;
	animation: matbet-dot-pulse 1.2s ease-in-out infinite;
}
.matbet-dot:nth-child(2) { animation-delay: .2s; }
.matbet-dot:nth-child(3) { animation-delay: .4s; }

/* Style 2: logo cross-fade (connector stays hidden; logos overlap instead) */
.matbet-modal--style-crossfade .matbet-modal__logos {
	position: relative;
	height: 64px;
}
.matbet-modal--style-crossfade .matbet-modal__logo {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	animation: matbet-cross-a 2.4s ease-in-out infinite;
}
.matbet-modal--style-crossfade .matbet-modal__logo--b {
	animation-name: matbet-cross-b;
}

/* Style 3: progress ring, fill duration is set from JS to match the redirect timer */
.matbet-modal__connector--ring svg { transform: rotate(-90deg); }
.matbet-ring-track {
	fill: none;
	stroke: rgba(255,255,255,.2);
	stroke-width: 3;
}
.matbet-ring-fill {
	fill: none;
	stroke: var(--matbet-accent);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 88;
	stroke-dashoffset: 88;
}
.matbet-ring-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 15px;
}

.matbet-modal__message {
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 8px;
	opacity: 0;
	animation: matbet-fade-up .5s ease .6s forwards;
}
.matbet-modal__loading-label {
	color: var(--matbet-muted);
	font-size: 14px;
	margin: 0 0 28px;
	opacity: 0;
	animation: matbet-fade-up .5s ease .75s forwards;
}
.matbet-modal__progress {
	height: 6px;
	border-radius: 6px;
	background: rgba(255,255,255,.15);
	overflow: hidden;
}
.matbet-modal__progress span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--matbet-accent);
	border-radius: 6px;
}

@keyframes matbet-logo-pop {
	to { opacity: 1; transform: scale(1); }
}
@keyframes matbet-fade-up {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes matbet-dot-pulse {
	0%, 80%, 100% { opacity: .3; transform: scale(.8); }
	40% { opacity: 1; transform: scale(1.15); }
}
@keyframes matbet-cross-a {
	0%, 45% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
	50%, 95% { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
	100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes matbet-cross-b {
	0%, 45% { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
	50%, 95% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
}

@media (max-width: 480px) {
	.matbet-header__inner { padding: 14px 16px; }
	.matbet-header__actions { gap: 8px; }
	.btn { padding: 10px 14px; font-size: 13px; }
	.matbet-modal__logo { max-height: 48px; padding: 8px 10px; }
}
