/*
Theme Name: Rick's Rubicons
Theme URI: https://ricksrubicons.com
Author: Brandon Barish
Author URI: https://brandonbarish.com
Description: Custom block theme for Rick's Red Rubicons.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ricks-rubicons
Tags: block-theme, full-site-editing, one-column, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/* Custom Styles */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Text Wrap - Improve readability */
p {
	text-wrap: balance;
}

h1, h2, h3, h4, h5, h6 {
	text-wrap: pretty;
}

/* WordPress Block Resets - Override default padding/margin ONLY when no inline styles */
:root :where(.wp-block-group):not([style*="padding"]):not([style*="margin"]) {
	padding: 0 !important;
	margin: 0 !important;
}

:root :where(.wp-block-columns):not([style*="margin"]) {
	margin-bottom: 0 !important;
}

:root :where(.wp-block-column):not([style*="padding"]):not([style*="margin"]) {
	margin: 0 !important;
	padding: 0 !important;
}

:root :where(.is-layout-flow) > *:not([style*="margin"]) {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* Global smooth scrolling */
html { scroll-behavior: smooth; }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.header-logo {
	max-width: 15rem;
}

header .wp-block-navigation__container {
	padding-right: 2rem;
}

header .wp-block-navigation-item.join {
	background-color: #C41E3A;
	color: #000000;
	border-radius: 100px;
}

/* Responsive Sections */
.benefits-section,
.preview-section,
.fleet-section,
.footer-section {
	width: 100%;
	padding-left: clamp(1.5rem, 5vw, 7.5rem);
	padding-right: clamp(1.5rem, 5vw, 7.5rem);
}

.header-section {
	width: 100%;
	padding-top: clamp(1rem, 2vw, 1.5rem);
	padding-bottom: clamp(1rem, 2vw, 1.5rem);
}

.header-inner {
	max-width: 1440px;
	margin: 0 auto;
	padding-left: clamp(1.5rem, 5vw, 7.5rem);
	padding-right: clamp(1.5rem, 5vw, 7.5rem);
	width: 100%;
}

.hero-section .wp-block-cover__inner-container {
	padding-left: clamp(1.5rem, 5vw, 7.5rem);
	padding-right: clamp(1.5rem, 5vw, 7.5rem);
}

/* Hero Headline Responsive */
h1 {
	font-size: clamp(2.6rem, 4vw, 3.688rem) !important;
	line-height: 1.1 !important;
}

/* Badge Component */
.badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.25rem;
	border-radius: 1.25rem;
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.0625rem;
	background-color: var(--wp--preset--color--stone-800);
	color: var(--wp--preset--color--primary);
}

.badge-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.25rem;
	border-radius: 1.5rem;
	background-color: rgba(196, 30, 58, 0.125);
	border: 1px solid var(--wp--preset--color--primary);
	margin: 0 auto;
}

/* Inline badge - wraps content only */
.badge-inline {
	max-width: 12rem;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Hero Section */
.hero-section {
	min-height: clamp(500px, 80vh, 700px);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Waitlist Form */
.waitlist-form {
	background-color: rgba(0, 0, 0, 0.125);
	border-radius: 0.75rem;
	padding: 2rem clamp(1.5rem, 4vw, 2.5rem);
	max-width: 600px;
	margin: 0 auto;
}

.form-note {
	opacity: 0.6;
}

/* Benefit Item */
.benefit-item {
	text-align: center;
	padding: 0 1rem;
}

/* Feature Cards */
.feature-card {
	background-color: var(--wp--preset--color--stone-900);
	border-radius: 0.75rem;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	height: 100%;
}

.feature-card h3,
.feature-card h4 {
	color: var(--wp--preset--color--stone-50);
	letter-spacing: 0.125rem;
	margin: 0;
}

.feature-card ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.feature-card li {
	color: var(--wp--preset--color--stone-200);
	font-size: 0.875rem;
	font-weight: 300;
}

.feature-card li::before {
	content: '✓';
	color: var(--wp--preset--color--primary);
	font-weight: bold;
	margin-right: 0.5rem;
}

/* Icon Container */
.icon-container {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

/* Icon Background - Light red tint */
.icon-bg {
	background-color: rgba(196, 30, 58, 0.0625) !important;
	max-width: 80px;
	max-height: 80px;
	margin-left: auto;
	margin-right: auto;
}

.icon-container svg,
.icon-container img {
	width: 2rem;
	height: 2rem;
	color: var(--wp--preset--color--primary);
	fill: var(--wp--preset--color--primary);
}

.feature-card svg {
	width: 2.5rem;
	height: 2.5rem;
}

/* Label Styles */
.label-text {
	font-family: var(--wp--preset--font-family--bebas-neue);
	font-size: 0.875rem;
	letter-spacing: 0.25rem;
	color: var(--wp--preset--color--primary);
	text-transform: uppercase;
}

/* Footer Styles */
.footer-links a {
	color: var(--wp--preset--color--stone-200);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 300;
	transition: color 0.2s ease;
}

.footer-links a:hover {
	color: var(--wp--preset--color--white);
}

/* Vehicle Card */
.vehicle-card {
	border: 1px solid var(--wp--preset--color--stone-200);
	border-radius: 0.5rem;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.vehicle-card img {
	width: 100%;
	height: 15rem;
	object-fit: cover;
}

.vehicle-info {
	padding: 1.5rem;
	background-color: var(--wp--preset--color--white);
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.vehicle-info h4 {
	margin: 0;
}

.vehicle-info p {
	margin: 0;
}

/* Utility Classes */
.text-center {
	text-align: center;
}

.uppercase {
	text-transform: uppercase;
}

/* Mobile Responsive Adjustments */
@media (max-width: 782px) {
	/* Header stacking */
	.header-inner {
		flex-direction: column !important;
		gap: 1rem;
		text-align: center;
	}

	.header-inner .wp-block-heading {
		font-size: clamp(1.25rem, 4vw, 1.875rem) !important;
	}

	/* Hero adjustments */
	.hero-headline {
		font-size: clamp(1.75rem, 6vw, 3rem) !important;
	}

	/* Columns stack on mobile */
	.wp-block-columns {
		flex-direction: column !important;
	}

	.wp-block-column {
		flex-basis: 100% !important;
		margin-bottom: 2rem;
	}

	/* Feature cards mobile spacing */
	.feature-card {
		margin-bottom: 1.5rem;
	}

	/* Footer columns */
	.footer-section .wp-block-columns {
		gap: 2rem;
	}

	.footer-section .footer-links .wp-block-column {
		margin-bottom: 0;
	}

	/* Responsive spacers - reduce height on mobile */
	.wp-block-spacer[style*="100px"] {
		height: 60px !important;
	}

	.wp-block-spacer[style*="80px"] {
		height: 48px !important;
	}

	.wp-block-spacer[style*="64px"] {
		height: 40px !important;
	}
}

/* Tablet breakpoint */
@media (min-width: 783px) and (max-width: 1024px) {
	.header-inner,
	.benefits-section,
	.preview-section,
	.fleet-section,
	.footer-section {
		padding-left: 3rem;
		padding-right: 3rem;
	}

	.hero-section .wp-block-cover__inner-container {
		padding-left: 3rem;
		padding-right: 3rem;
	}

	.hero-headline {
		font-size: 3rem !important;
	}
}

/* Improve text readability */
@media (max-width: 600px) {
	.wp-block-paragraph {
		font-size: 1rem;
	}

	.has-small-font-size {
		font-size: 0.875rem !important;
	}

	.has-large-font-size {
		font-size: 1.125rem !important;
	}
}

/* Ensure cover block is properly sized */
.wp-block-cover {
	min-height: 100%;
}

/* Fix potential overflow issues */
body,
html {
	overflow-x: hidden;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
