/* Rizelex Academy — supplementary styles
   theme.json handles tokens/typography/colors. This file handles components
   and interactions that theme.json can't express. Mobile-first, minimal. */

:root {
	--rz-radius-card: 16px;
	--rz-radius-pill: 999px;
	--rz-maxw: 1160px;
	--rz-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Accessible focus ring for keyboard users */
:where(a, button, input, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 6px;
}

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

/* ---------- Buttons (extends core button) ---------- */
.wp-block-button__link {
	transition: transform 0.15s var(--rz-ease), background-color 0.15s ease, box-shadow 0.15s ease;
	line-height: 1.2;
}
.wp-block-button__link:hover { transform: translateY(-1px); }

/* WhatsApp button variant: add class "is-style-whatsapp" to a button block */
.is-style-whatsapp > .wp-block-button__link,
.wp-block-button.is-style-whatsapp .wp-block-button__link {
	background-color: var(--wp--preset--color--whatsapp) !important;
	color: #ffffff !important;
	box-shadow: 0 10px 24px rgba(37, 211, 102, 0.28);
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}
.is-style-whatsapp > .wp-block-button__link:hover,
.wp-block-button.is-style-whatsapp .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--whatsapp-dark) !important;
}
.is-style-whatsapp .wp-block-button__link::before {
	content: "";
	width: 20px; height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.46 1.32 4.97L2 22l5.25-1.38c1.45.79 3.08 1.21 4.79 1.21 5.46 0 9.91-4.45 9.91-9.91C21.95 6.45 17.5 2 12.04 2zm5.8 14.04c-.24.68-1.42 1.32-1.96 1.36-.5.05-1.13.27-3.8-.79-3.2-1.26-5.24-4.5-5.4-4.71-.16-.21-1.29-1.71-1.29-3.26 0-1.55.81-2.31 1.1-2.63.29-.32.63-.4.84-.4.21 0 .42 0 .6.01.19.01.45-.07.7.53.24.6.83 2.07.9 2.22.07.15.12.32.02.53-.1.21-.15.32-.29.5-.15.18-.31.4-.44.53-.15.15-.3.31-.13.6.16.29.73 1.2 1.57 1.95 1.08.96 1.99 1.26 2.28 1.4.29.15.46.13.63-.08.18-.21.73-.85.92-1.14.19-.29.39-.24.65-.15.27.1 1.71.81 2 .96.29.15.49.22.56.34.07.12.07.71-.17 1.39z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.46 1.32 4.97L2 22l5.25-1.38c1.45.79 3.08 1.21 4.79 1.21 5.46 0 9.91-4.45 9.91-9.91C21.95 6.45 17.5 2 12.04 2zm5.8 14.04c-.24.68-1.42 1.32-1.96 1.36-.5.05-1.13.27-3.8-.79-3.2-1.26-5.24-4.5-5.4-4.71-.16-.21-1.29-1.71-1.29-3.26 0-1.55.81-2.31 1.1-2.63.29-.32.63-.4.84-.4.21 0 .42 0 .6.01.19.01.45-.07.7.53.24.6.83 2.07.9 2.22.07.15.12.32.02.53-.1.21-.15.32-.29.5-.15.18-.31.4-.44.53-.15.15-.3.31-.13.6.16.29.73 1.2 1.57 1.95 1.08.96 1.99 1.26 2.28 1.4.29.15.46.13.63-.08.18-.21.73-.85.92-1.14.19-.29.39-.24.65-.15.27.1 1.71.81 2 .96.29.15.49.22.56.34.07.12.07.71-.17 1.39z'/%3E%3C/svg%3E") center / contain no-repeat;
	flex: 0 0 auto;
}

/* Outline / secondary button: is-style-outline */
.is-style-outline .wp-block-button__link {
	background: transparent !important;
	color: var(--wp--preset--color--primary) !important;
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--primary);
}
.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary-light) !important;
}

/* ---------- Cards ---------- */
.rz-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--rz-radius-card);
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--wp--preset--shadow--soft);
	transition: transform 0.2s var(--rz-ease), box-shadow 0.2s ease;
	height: 100%;
}
.rz-card:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--card); }

/* Eyebrow / kicker label */
.rz-eyebrow {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-dark);
	background: var(--wp--preset--color--accent-light);
	padding: 0.35rem 0.75rem;
	border-radius: var(--rz-radius-pill);
}

/* Pill / chip */
.rz-pill {
	display: inline-flex; align-items: center; gap: 0.4rem;
	font-size: 0.95rem; font-weight: 500;
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
	padding: 0.45rem 0.9rem;
	border-radius: var(--rz-radius-pill);
}

/* ---------- Hero ---------- */
.rz-hero {
	position: relative;
	border-radius: 22px;
	overflow: hidden;
	isolation: isolate;
}
.rz-hero__media { position: absolute; inset: 0; z-index: -2; }
.rz-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.rz-hero__veil {
	position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgba(17,28,53,0.25) 0%, rgba(17,28,53,0.78) 100%);
}

/* ---------- FAQ accordion (uses <details>) ---------- */
.rz-faq { border: 1px solid var(--wp--preset--color--line); border-radius: var(--rz-radius-card); overflow: hidden; background: var(--wp--preset--color--base); }
.rz-faq details { border-bottom: 1px solid var(--wp--preset--color--line); }
.rz-faq details:last-child { border-bottom: 0; }
.rz-faq summary {
	list-style: none; cursor: pointer;
	display: flex; justify-content: space-between; align-items: center; gap: 1rem;
	padding: 1.15rem 1.35rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600; font-size: 1.075rem;
	color: var(--wp--preset--color--ink);
}
.rz-faq summary::-webkit-details-marker { display: none; }
.rz-faq summary::after {
	content: "+"; font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--primary);
	transition: transform 0.2s ease;
}
.rz-faq details[open] summary::after { transform: rotate(45deg); }
.rz-faq .rz-faq__a { padding: 0 1.35rem 1.25rem; color: var(--wp--preset--color--body); }

/* ---------- Sticky mobile WhatsApp CTA ---------- */
.rz-sticky-cta {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
	display: none;
	padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom));
	background: rgba(255,255,255,0.96);
	backdrop-filter: saturate(140%) blur(8px);
	border-top: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 -6px 24px rgba(16,34,63,0.08);
}
.rz-sticky-cta a {
	display: flex; align-items: center; justify-content: center; gap: 0.55rem;
	width: 100%; text-decoration: none;
	background: var(--wp--preset--color--whatsapp); color: #fff;
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.05rem;
	padding: 0.85rem 1rem; border-radius: 12px;
}
.rz-sticky-cta a:active { background: var(--wp--preset--color--whatsapp-dark); }
@media (max-width: 781px) {
	.rz-sticky-cta { display: block; }
	body { padding-bottom: 4.75rem; } /* room for the bar */
}

/* ---------- Header / nav ---------- */
.rz-header { position: sticky; top: 0; z-index: 500; background: rgba(255,255,255,0.92); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--wp--preset--color--line); }

.wp-block-navigation { font-family: var(--wp--preset--font-family--heading); font-weight: 600; }
.wp-block-navigation a { color: var(--wp--preset--color--ink); }
.wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }

/* ---------- Section helpers ---------- */
.rz-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.rz-tint { background: var(--wp--preset--color--tint); }
.rz-surface { background: var(--wp--preset--color--surface); }

/* Stat number */
.rz-stat { font-family: var(--wp--preset--font-family--heading); font-weight: 800; color: var(--wp--preset--color--primary); line-height: 1; }

/* Placeholder marker (used until real assets arrive) */
.rz-placeholder {
	border: 2px dashed var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent-light);
	color: var(--wp--preset--color--accent-dark);
	border-radius: var(--rz-radius-card);
	padding: 1rem 1.25rem; font-size: 0.95rem;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}
