/*
 * Shared layout pieces that theme.json cannot express: header, footer,
 * section shell, cards, buttons, checklists, carousel controls.
 * Colors, type and spacing come from theme.json presets.
 */

:root {
	--rankclub-radius: var(--wp--custom--radius, 12px);
	--rankclub-shadow: var(--wp--custom--shadow);
	--rankclub-gutter: 16px;
	--rankclub-wide: var(--wp--style--global--wide-size, 1180px);
}

body {
	-webkit-font-smoothing: antialiased;
}

.has-capitalize {
	text-transform: capitalize;
}

/* Header */
.rankclub-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.admin-bar .rankclub-header {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.rankclub-header__bar {
	min-height: 72px;
	gap: 1.5rem;
}

.rankclub-logo {
	display: inline-flex;
	flex-shrink: 0;
}

.rankclub-logo img {
	display: block;
	width: clamp(150px, 22vw, 210px);
	height: auto;
}

.rankclub-header .wp-block-navigation {
	gap: 0.25rem 1.5rem;
}

.rankclub-header .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	padding: 0.5rem 0;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.rankclub-header .wp-block-navigation-item__content:hover,
.rankclub-header .wp-block-navigation-item__content:focus-visible,
.rankclub-header .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--brand);
	border-bottom-color: currentColor;
}

.rankclub-header .wp-block-navigation__responsive-container-open,
.rankclub-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--ink);
}

.rankclub-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
}

.rankclub-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.125rem;
}

/* Footer */
.rankclub-footer {
	background: var(--wp--preset--color--ink);
	color: #D5DEE9;
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--40);
}

.rankclub-footer__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	padding-bottom: var(--wp--preset--spacing--40);
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.rankclub-footer .rankclub-footer__heading {
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.08em;
	margin: 0;
}

.rankclub-footer__nav.wp-block-navigation .wp-block-navigation__container {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem 2rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.rankclub-footer__nav .wp-block-navigation-item__content {
	color: #D5DEE9;
	text-decoration: none;
}

.rankclub-footer__nav .wp-block-navigation-item__content:hover,
.rankclub-footer__nav .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}

.rankclub-footer-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem 2rem;
	padding-top: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
}

.rankclub-footer-meta p {
	margin: 0;
}

.rankclub-footer-meta__social {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
}

.rankclub-footer-meta__facebook {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
}

.rankclub-footer-meta__facebook:hover,
.rankclub-footer-meta__facebook:focus-visible {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--brand);
}

@media (min-width: 782px) {
	.rankclub-footer__top {
		grid-template-columns: 1fr 2fr;
	}
}

/* Section shell */
.rankclub-main {
	margin-top: 0;
}

.rankclub-main > .wp-block-post-content > * {
	margin-block: 0;
}

.rankclub-section {
	padding: var(--wp--preset--spacing--60) var(--rankclub-gutter);
	margin: 0;
	scroll-margin-top: 96px;
}

.rankclub-section.is-tone-white {
	background: var(--wp--preset--color--white);
}

.rankclub-section.is-tone-muted {
	background: var(--wp--preset--color--surface);
}

.rankclub-section.is-tone-light {
	background: linear-gradient(180deg, var(--wp--preset--color--light) 0%, var(--wp--preset--color--surface) 100%);
}

.rankclub-section.is-tone-brand {
	background: linear-gradient(135deg, var(--wp--preset--color--brand-dark) 0%, var(--wp--preset--color--brand) 100%);
	color: var(--wp--preset--color--white);
}

.rankclub-section__inner {
	max-width: var(--rankclub-wide);
	margin: 0 auto;
}

.rankclub-section__heading {
	text-align: center;
	margin: 0 auto var(--wp--preset--spacing--40);
	max-width: 46rem;
}

.rankclub-section__intro {
	text-align: center;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--large);
	max-width: 46rem;
	margin: calc(-1 * var(--wp--preset--spacing--30)) auto var(--wp--preset--spacing--50);
}

.rankclub-section__actions {
	text-align: center;
	margin-top: var(--wp--preset--spacing--50);
}

/* Cards */
.rankclub-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--rankclub-radius);
	box-shadow: var(--rankclub-shadow);
	padding: var(--wp--preset--spacing--40);
}

/* Buttons */
.rankclub-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.rankclub-button:hover,
.rankclub-button:focus-visible {
	background: var(--wp--preset--color--brand-dark);
	color: var(--wp--preset--color--white);
	transform: translateY(-1px);
}

.rankclub-button.is-accent {
	background: var(--wp--preset--color--accent);
}

.rankclub-button.is-accent:hover,
.rankclub-button.is-accent:focus-visible {
	background: var(--wp--preset--color--accent-dark);
}

.rankclub-button.is-inverse {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--brand-dark);
}

.rankclub-button.is-large {
	min-height: 52px;
	padding: 0.95rem 2rem;
	font-size: 0.95rem;
}

a.rankclub-button:focus-visible,
.rankclub-carousel__button:focus-visible,
.rankclub-faq__question:focus-visible {
	outline: 3px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
}

.is-tone-brand a.rankclub-button:focus-visible {
	outline-color: var(--wp--preset--color--white);
}

/* Checklists */
.rankclub-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}

.rankclub-checklist li {
	display: grid;
	grid-template-columns: 1.25rem minmax(0, 1fr);
	gap: 0.6rem;
	align-items: start;
}

.rankclub-checklist .rankclub-icon {
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.15rem;
	color: var(--wp--preset--color--success);
}

/* Carousel controls (image carousel, testimonials) */
[data-rankclub-carousel] > ul {
	outline-offset: 4px;
	display: grid;
	grid-auto-flow: column;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	list-style: none;
	margin: 0;
	padding: 0.25rem 0.25rem 1rem;
	gap: 1.25rem;
}

[data-rankclub-carousel] [data-rankclub-slide] {
	scroll-snap-align: start;
}

.rankclub-carousel__controls {
	display: none;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1rem;
}

.is-enhanced > .rankclub-carousel__controls {
	display: flex;
}

.rankclub-carousel__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--brand-dark);
	cursor: pointer;
	box-shadow: var(--rankclub-shadow);
}

.rankclub-carousel__button[data-rankclub-prev] .rankclub-icon {
	transform: rotate(180deg);
}

.rankclub-carousel__button:disabled {
	opacity: 0.4;
	cursor: default;
}

/* Blog and other pages */
.rankclub-meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.rankclub-post-grid .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.rankclub-post-grid .wp-block-post-title a:hover {
	color: var(--wp--preset--color--brand);
}

@media (prefers-reduced-motion: reduce) {
	[data-rankclub-carousel] > ul {
	outline-offset: 4px;
		scroll-behavior: auto;
	}

	.rankclub-button {
		transition: none;
	}
}

/* Forms (Contact Form 7 and other plugin forms on regular pages) */
.rankclub-main input[type="text"],
.rankclub-main input[type="email"],
.rankclub-main input[type="url"],
.rankclub-main input[type="tel"],
.rankclub-main input[type="search"],
.rankclub-main textarea,
.rankclub-main select {
	width: 100%;
	max-width: 36rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text);
	font: inherit;
}

.rankclub-main textarea {
	min-height: 10rem;
}

.rankclub-main input:focus-visible,
.rankclub-main textarea:focus-visible,
.rankclub-main select:focus-visible {
	outline: 3px solid var(--wp--preset--color--brand);
	outline-offset: 1px;
}

.rankclub-main input[type="submit"],
.rankclub-main button[type="submit"] {
	min-height: 44px;
	padding: 0.75rem 1.75rem;
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
	font: inherit;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.rankclub-main input[type="submit"]:hover,
.rankclub-main button[type="submit"]:hover {
	background: var(--wp--preset--color--brand-dark);
}
