/* Redwan Mobile House — main stylesheet (mobile first) */

:root {
	--rmh-primary: #0f6fff;
	--rmh-primary-dark: #0a55c9;
	--rmh-ink: #0d1420;
	--rmh-slate: #4a5568;
	--rmh-mist: #f4f7fb;
	--rmh-border: #e2e8f0;
	--rmh-white: #ffffff;
	--rmh-accent: #00b894;
	--rmh-radius: 14px;
	--rmh-shadow: 0 10px 30px rgba(13, 20, 32, 0.08);
	--rmh-container: 1140px;
	--rmh-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--rmh-font);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--rmh-ink);
	background: var(--rmh-white);
	-webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

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

a { color: var(--rmh-primary); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

:focus-visible {
	outline: 3px solid var(--rmh-primary);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed;
	top: 10px; left: 10px;
	z-index: 999;
	width: auto; height: auto;
	clip: auto; clip-path: none;
	padding: 0.7rem 1rem;
	background: var(--rmh-ink);
	color: #fff;
	border-radius: 8px;
}

.container {
	width: 100%;
	max-width: var(--rmh-container);
	margin: 0 auto;
	padding: 0 1.1rem;
}
.container.narrow { max-width: 780px; }

/* Buttons */
.button,
.wp-block-button__link,
input[type="submit"],
button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.78rem 1.4rem;
	border-radius: 999px;
	border: 2px solid transparent;
	font-weight: 600;
	font-size: 0.98rem;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
	text-decoration: none;
}
.button:hover, .button:focus { text-decoration: none; transform: translateY(-1px); }

.button-primary { background: var(--rmh-primary); color: #fff; }
.button-primary:hover, .button-primary:focus { background: var(--rmh-primary-dark); color: #fff; }

.button-outline { border-color: var(--rmh-primary); color: var(--rmh-primary); background: transparent; }
.button-outline:hover, .button-outline:focus { background: var(--rmh-primary); color: #fff; }

.button-ghost { color: var(--rmh-ink); background: var(--rmh-mist); }
.button-ghost:hover, .button-ghost:focus { background: var(--rmh-border); }

/* Topbar */
.topbar {
	background: var(--rmh-ink);
	color: #cbd5e1;
	font-size: 0.85rem;
}
.topbar-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.2rem;
	justify-content: center;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	text-align: center;
}
.topbar a { color: #fff; }

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid var(--rmh-border);
}
.site-header.is-stuck { box-shadow: 0 6px 20px rgba(13, 20, 32, 0.07); }

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.85rem;
	padding-bottom: 0.85rem;
}

.site-branding { min-width: 0; }
.site-title {
	display: block;
	font-size: 1.22rem;
	font-weight: 800;
	color: var(--rmh-ink);
	letter-spacing: -0.02em;
}
.site-title:hover { text-decoration: none; color: var(--rmh-primary); }
.site-description {
	margin: 0;
	font-size: 0.78rem;
	color: var(--rmh-slate);
}
.custom-logo { max-height: 56px; width: auto; }

.menu-toggle {
	position: relative;
	width: 44px; height: 40px;
	border: 1px solid var(--rmh-border);
	border-radius: 10px;
	background: var(--rmh-white);
	cursor: pointer;
}
.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
	position: absolute;
	left: 50%;
	width: 20px; height: 2px;
	margin-left: -10px;
	background: var(--rmh-ink);
	content: "";
}
.menu-toggle-bar { top: 50%; margin-top: -1px; }
.menu-toggle-bar::before { top: -6px; margin-left: -10px; }
.menu-toggle-bar::after { top: 6px; margin-left: -10px; }

.main-navigation {
	display: none;
	position: absolute;
	left: 0; right: 0;
	top: 100%;
	background: var(--rmh-white);
	border-bottom: 1px solid var(--rmh-border);
	padding: 0.75rem 1.1rem 1.2rem;
}
.main-navigation.is-open { display: block; }

.nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav-menu li { position: relative; }
.nav-menu a {
	display: block;
	padding: 0.7rem 0.2rem;
	color: var(--rmh-ink);
	font-weight: 600;
	border-bottom: 1px solid var(--rmh-border);
}
.nav-menu a:hover, .nav-menu a:focus { color: var(--rmh-primary); text-decoration: none; }
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a { color: var(--rmh-primary); }
.nav-menu .sub-menu { list-style: none; margin: 0; padding-left: 0.9rem; }

.header-cta { margin-top: 0.9rem; width: 100%; }

/* Hero */
.hero {
	background: linear-gradient(160deg, #0d1420 0%, #14294a 55%, #0f6fff 140%);
	color: #fff;
	padding: 3.2rem 0 3.4rem;
}
.hero-inner { display: grid; gap: 2rem; }
.hero-eyebrow {
	margin: 0 0 0.6rem;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: #9fc3ff;
}
.hero-title { margin: 0 0 0.7rem; color: #fff; }
.hero-subtitle { color: #d7e3f5; font-size: 1.05rem; max-width: 55ch; }
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.4rem;
}
.hero .button-ghost { background: rgba(255,255,255,0.12); color: #fff; }
.hero .button-ghost:hover { background: rgba(255,255,255,0.22); }
.hero .button-outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.hero .button-outline:hover { background: #fff; color: var(--rmh-ink); }

.hero-media { display: flex; align-items: center; justify-content: center; }
.hero-image { border-radius: var(--rmh-radius); box-shadow: var(--rmh-shadow); }
.hero-media-placeholder {
	min-height: 190px;
	border: 1px dashed rgba(255,255,255,0.35);
	border-radius: var(--rmh-radius);
	background: rgba(255,255,255,0.06);
}
.hero-badge {
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #cfe0ff;
	padding: 1rem;
	text-align: center;
}

/* Sections */
.section { padding: 3rem 0; }
.section-intro { background: var(--rmh-white); }
.section-categories { background: var(--rmh-mist); }
.section-title { margin-bottom: 0.5rem; }
.section-title.small { font-size: 1.25rem; }
.section-lead { color: var(--rmh-slate); max-width: 65ch; margin-bottom: 1.8rem; }

/* Cards */
.card-grid {
	display: grid;
	gap: 1.1rem;
	grid-template-columns: 1fr;
}
.card {
	background: var(--rmh-white);
	border: 1px solid var(--rmh-border);
	border-radius: var(--rmh-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--rmh-shadow); transform: translateY(-3px); }
.card-media img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 1.2rem; }
.card-title { margin-bottom: 0.35rem; }
.card-text { color: var(--rmh-slate); margin-bottom: 0.8rem; }
.card-link { font-weight: 600; }

/* Features */
.feature-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.feature {
	padding: 1.3rem;
	border-radius: var(--rmh-radius);
	background: var(--rmh-mist);
	border-left: 4px solid var(--rmh-primary);
}
.feature-title { font-size: 1.05rem; margin-bottom: 0.3rem; }
.feature-text { color: var(--rmh-slate); margin: 0; }

/* Contact */
.section-contact { background: var(--rmh-ink); color: #e2e8f0; }
.section-contact .section-title { color: #fff; }
.section-contact a { color: #9fc3ff; }
.contact-band { display: grid; gap: 1.6rem; }
.contact-address { font-style: normal; line-height: 1.8; }
.contact-lines { line-height: 1.9; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-start; }
.section-contact .button-ghost { background: rgba(255,255,255,0.12); color: #fff; }
.section-contact .button-outline { border-color: #9fc3ff; color: #9fc3ff; }
.section-contact .button-outline:hover { background: #9fc3ff; color: var(--rmh-ink); }

.contact-layout { display: grid; gap: 2rem; padding-bottom: 3rem; }

/* Forms */
.form-row { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-row label { font-weight: 600; font-size: 0.92rem; }
.form-honeypot { position: absolute; left: -9999px; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
	width: 100%;
	padding: 0.72rem 0.9rem;
	border: 1px solid var(--rmh-border);
	border-radius: 10px;
	font: inherit;
	color: var(--rmh-ink);
	background: var(--rmh-white);
}
input:focus, textarea:focus, select:focus { border-color: var(--rmh-primary); outline: none; box-shadow: 0 0 0 3px rgba(15,111,255,0.15); }
textarea { resize: vertical; }

.form-notice {
	padding: 0.9rem 1.1rem;
	border-radius: 10px;
	margin-bottom: 1.2rem;
}
.form-notice ul { margin: 0; padding-left: 1.2rem; }
.form-notice-success { background: #e7f8f1; border: 1px solid #9be0c8; color: #04593f; }
.form-notice-error { background: #fdecec; border: 1px solid #f3b6b6; color: #7a1616; }

.search-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.search-form .search-field { flex: 1 1 200px; }

/* Page headers and content */
.page-header { padding: 2.4rem 0 1.2rem; }
.page-title { margin-bottom: 0.2rem; }
.entry-meta { color: var(--rmh-slate); font-size: 0.9rem; }
.single-content { padding-bottom: 3rem; }
.featured-image { margin: 0 0 1.6rem; }
.featured-image img { border-radius: var(--rmh-radius); }
.entry-content > * { margin-bottom: 1.1rem; }
.entry-content h2 { margin-top: 2rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content blockquote {
	margin: 1.5rem 0;
	padding: 0.6rem 1.2rem;
	border-left: 4px solid var(--rmh-primary);
	background: var(--rmh-mist);
}
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--rmh-border); padding: 0.6rem; }

.content-area { display: grid; gap: 2.2rem; padding-bottom: 3rem; }

/* Post cards */
.post-card {
	border: 1px solid var(--rmh-border);
	border-radius: var(--rmh-radius);
	overflow: hidden;
	margin-bottom: 1.4rem;
	background: var(--rmh-white);
}
.post-card-media img { width: 100%; height: 220px; object-fit: cover; }
.post-card-body { padding: 1.2rem; }
.post-card-title { font-size: 1.3rem; margin-bottom: 0.25rem; }
.post-card-title a { color: var(--rmh-ink); }
.post-card-title a:hover { color: var(--rmh-primary); text-decoration: none; }

.pagination { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.pagination .page-numbers {
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--rmh-border);
	border-radius: 8px;
	color: var(--rmh-ink);
}
.pagination .current { background: var(--rmh-primary); color: #fff; border-color: var(--rmh-primary); }

/* Widgets */
.widget-area .widget { margin-bottom: 1.8rem; }
.widget-title { font-size: 1.05rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 0.35rem 0; border-bottom: 1px solid var(--rmh-border); }

/* 404 */
.error-404 { padding: 3.5rem 1.1rem 4rem; text-align: center; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--rmh-primary); margin: 0; line-height: 1; }
.error-404 .hero-actions, .error-404 .search-form { justify-content: center; }

/* Comments */
.comments-area { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rmh-border); }
.comment-list { list-style: none; padding: 0; }
.comment-list ol { list-style: none; }

/* Footer */
.site-footer { background: #0b111c; color: #b8c4d6; padding-top: 3rem; }
.footer-grid { display: grid; gap: 1.8rem; padding-bottom: 2.2rem; }
.footer-title { color: #fff; font-size: 1.05rem; }
.footer-address { font-style: normal; line-height: 1.9; }
.site-footer a { color: #9fc3ff; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { padding: 0.3rem 0; }
.site-info { border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem 0; font-size: 0.87rem; }
.site-info p { margin: 0; }

/* Floating call button (mobile) */
.call-fab {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 70;
	padding: 0.8rem 1.3rem;
	border-radius: 999px;
	background: var(--rmh-accent);
	color: #04241c;
	font-weight: 700;
	box-shadow: 0 12px 26px rgba(0, 184, 148, 0.35);
}
.call-fab:hover, .call-fab:focus { text-decoration: none; background: #00a383; color: #04241c; }

/* Tablet */
@media (min-width: 640px) {
	.card-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
	.section { padding: 3.8rem 0; }
	.contact-band { grid-template-columns: 1.4fr 1fr; align-items: center; }
	.contact-layout { grid-template-columns: 1fr 1fr; }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop */
@media (min-width: 900px) {
	.menu-toggle { display: none; }
	.main-navigation {
		display: flex;
		align-items: center;
		gap: 1.4rem;
		position: static;
		border: 0;
		padding: 0;
		background: transparent;
	}
	.nav-menu { display: flex; align-items: center; gap: 1.3rem; }
	.nav-menu a { padding: 0.35rem 0; border-bottom: 2px solid transparent; }
	.nav-menu .current-menu-item > a { border-bottom-color: var(--rmh-primary); }
	.nav-menu .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 210px;
		padding: 0.4rem 0.8rem;
		background: #fff;
		border: 1px solid var(--rmh-border);
		border-radius: 10px;
		box-shadow: var(--rmh-shadow);
		display: none;
		z-index: 80;
	}
	.nav-menu li:hover > .sub-menu,
	.nav-menu li:focus-within > .sub-menu { display: block; }
	.header-cta { margin-top: 0; width: auto; }

	.hero { padding: 5rem 0 5.4rem; }
	.hero-inner { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 3rem; }
	.hero-media-placeholder { min-height: 300px; }

	.card-grid, .feature-grid { grid-template-columns: repeat(4, 1fr); }
	.feature-grid { gap: 1.3rem; }
	.footer-grid { grid-template-columns: repeat(4, 1fr); }

	body:not(.no-sidebar) .content-area { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
	.call-fab { display: none; }
}

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