/*
Theme Name: Winch Club
Theme URI: https://winch.club/
Description: Lightweight RTL theme for the winch.club towing and moving directory. Road-sign identity, call-first layout.
Version: 1.1.0
Requires PHP: 8.1
Text Domain: winchclub
*/

:root {
	--green: #0e5b3f;
	--green-deep: #0a4430;
	--white: #ffffff;
	--ink: #1f2427;
	--ink-soft: #4a5357;
	--amber: #f2b200;
	--amber-deep: #d99f00;
	--concrete: #edf0ee;
	--line: #cdd3cf;
	--wa: #128c4a;
	--radius-sign: 14px;
	--radius-small: 8px;
	--wrap: 1120px;
	--gutter: 16px;
	--font: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.75;
	text-align: right;
}

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

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }

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

.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; right: 8px; z-index: 100; background: var(--amber); color: var(--ink); padding: 8px 14px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 7px; background: var(--green); box-shadow: inset 0 0 0 2px var(--green), inset 0 0 0 4px var(--white); display: grid; place-items: center; color: var(--white); font-size: .95rem; }
.site-header .wrap { flex-wrap: wrap; }
.main-nav { order: 3; width: 100%; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav ul { list-style: none; margin: 0; padding: 4px 0; display: flex; gap: 4px; flex-wrap: nowrap; }
.main-nav a { display: block; padding: 6px 10px; color: var(--ink-soft); text-decoration: none; border-radius: 6px; font-size: .95rem; white-space: nowrap; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--green); background: var(--concrete); }
.btn.header-call { display: none; }
.brand span:last-child { white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-call { background: var(--amber); color: var(--ink); }
.btn-call:hover { background: var(--amber-deep); color: var(--ink); }
.btn-wa { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-wa:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-wa-light { color: var(--wa); border-color: var(--wa); background: var(--white); }
.btn-wa-light:hover { background: #eaf6ef; color: var(--wa); }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* Road sign hero */
.hero { padding: 20px 0 8px; }
.sign {
	background: var(--green);
	color: var(--white);
	border-radius: var(--radius-sign);
	padding: 6px;
}
.sign-inner {
	border: 3px solid var(--white);
	border-radius: calc(var(--radius-sign) - 5px);
	padding: 28px 20px 24px;
}
.sign h1 { margin: 0 0 10px; font-size: clamp(1.75rem, 6vw, 3.1rem); line-height: 1.25; font-weight: 700; }
.sign p { margin: 0 0 20px; font-size: 1.1rem; max-width: 34em; opacity: .95; }
.sign .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sign .btn-call { font-size: 1.1rem; }

/* Sections */
.section { padding: 36px 0; }
.section-quiet { background: var(--concrete); }
.section h2 { margin: 0 0 6px; font-size: clamp(1.35rem, 3.6vw, 1.75rem); line-height: 1.4; }
.section .lead { margin: 0 0 20px; color: var(--ink-soft); max-width: 44em; }

/* Area finder: exit signs */
.finder { margin: 0 0 18px; max-width: 420px; }
.finder label { display: block; font-weight: 600; margin-bottom: 6px; }
.finder input { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); }
.finder input:focus { border-color: var(--green); outline: none; }
.plates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.plate a {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	min-height: 54px; padding: 8px 12px;
	background: var(--green); color: var(--white); text-decoration: none;
	border-radius: 9px; box-shadow: inset 0 0 0 2px var(--green), inset 0 0 0 4px rgba(255,255,255,.85);
	font-weight: 600; line-height: 1.35;
}
.plate a:hover { background: var(--green-deep); box-shadow: inset 0 0 0 2px var(--green-deep), inset 0 0 0 4px var(--white); }
.plate svg { width: 18px; height: 18px; flex: none; }
.plates-empty { color: var(--ink-soft); }

/* Section hubs: big signs on the home page, street index on the hub */
.sections { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.sections a {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 16px 18px; border-radius: 12px; text-decoration: none;
	background: var(--green); color: var(--white); font-weight: 700; font-size: 1.15rem; line-height: 1.4;
	box-shadow: inset 0 0 0 3px var(--green), inset 0 0 0 5px var(--white);
}
.sections a:hover { background: var(--green-deep); color: var(--white); }
.sections small { display: block; font-weight: 400; font-size: .9rem; opacity: .9; }
.sections svg { width: 22px; height: 22px; flex: none; }
.streets { columns: 1; column-gap: 32px; }
.street-group { break-inside: avoid; margin-bottom: 18px; }
.street-group h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--green); }
.street-group ul { list-style: none; margin: 0; padding: 0; }
.street-group li { padding: 5px 0; border-bottom: 1px solid var(--line); }

/* Phone book rows */
.book { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.book-row { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.book-name { font-weight: 700; font-size: 1.1rem; line-height: 1.45; }
.book-name a { color: var(--ink); text-decoration: none; }
.book-name a:hover { color: var(--green); text-decoration: underline; }
.book-area { color: var(--ink-soft); font-size: .95rem; }
.book-phone { font-size: 1.35rem; font-weight: 700; }
.book-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.book-actions .btn { min-height: 44px; padding: 8px 16px; }

/* Post lists */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-list a { font-weight: 600; text-decoration: none; color: var(--ink); }
.post-list a:hover { color: var(--green); text-decoration: underline; }
.post-list .excerpt { margin: 4px 0 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.65; }
.post-list .phone-inline { color: var(--green); font-weight: 600; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); max-width: 46em; }

/* Article */
.crumbs { font-size: .9rem; color: var(--ink-soft); padding: 16px 0 0; }
.crumbs a { color: var(--ink-soft); }
.article { max-width: 760px; }
.article-head h1 { margin: 10px 0 8px; font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.35; }
.article-meta { color: var(--ink-soft); font-size: .9rem; }
.callcard { margin: 20px 0 28px; background: var(--green); color: var(--white); border-radius: var(--radius-sign); padding: 5px; }
.callcard-inner { border: 2px solid rgba(255,255,255,.85); border-radius: 10px; padding: 16px; display: grid; gap: 12px; }
.callcard .label { font-size: .95rem; opacity: .9; }
.callcard .book-phone { color: var(--white); font-size: 1.6rem; }
.callcard .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.entry { font-size: 1.075rem; }
.entry h2 { font-size: 1.4rem; line-height: 1.45; margin: 1.8em 0 .5em; }
.entry h3 { font-size: 1.2rem; margin: 1.5em 0 .4em; }
.entry p, .entry ul, .entry ol { margin: 0 0 1em; }
.entry img { border-radius: var(--radius-small); }
.entry table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry td, .entry th { border: 1px solid var(--line); padding: 6px 10px; }
.entry a.tel { font-weight: 700; white-space: nowrap; }
.entry .wp-caption { max-width: 100%; }
.entry iframe { max-width: 100%; }
.related { margin-top: 36px; }

/* Archive */
.archive-head { padding: 24px 0 8px; }
.archive-head h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.35; }
.archive-head .lead { color: var(--ink-soft); margin: 0; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; padding: 24px 0; }
.pagination .page-numbers { min-width: 42px; min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); padding: 0 10px; }
.pagination .current { background: var(--green); color: var(--white); border-color: var(--green); }

.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type="search"] { flex: 1; font: inherit; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; }
.search-form button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 10px; border: 0; background: var(--green); color: var(--white); cursor: pointer; }

/* Footer */
.site-footer { margin-top: 40px; background: var(--ink); color: #d8dedb; padding: 32px 0 96px; font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 24px; }
.footer-grid h2 { font-size: 1rem; margin: 0 0 8px; color: var(--white); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 3px 0; }
.footer-note { border-top: 1px solid #39413f; margin-top: 24px; padding-top: 16px; color: #9aa6a1; }

/* Mobile call bar */
.callbar {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
	display: grid; grid-template-columns: 1fr auto; gap: 8px;
	padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
	background: var(--white); border-top: 1px solid var(--line);
}
.callbar .btn { min-height: 50px; white-space: nowrap; padding-inline: 14px; }
.callbar .btn-wa-light { padding-inline: 14px; }

@media (min-width: 720px) {
	.sections { grid-template-columns: 1fr 1fr; }
	.streets { columns: 2; }
	.book-row { grid-template-columns: 1.4fr 1fr auto; align-items: center; }
	.footer-grid { grid-template-columns: 2fr 1fr 1fr; }
	.callcard-inner { grid-template-columns: 1fr auto; align-items: center; }
	.sign-inner { padding: 40px 36px 34px; }
}

@media (min-width: 960px) {
	.site-header .wrap { flex-wrap: nowrap; }
	.main-nav { order: 0; width: auto; margin: 0 auto 0 0; margin-inline-start: auto; padding: 0; border: 0; overflow: visible; }
	.callbar { display: none; }
	.site-footer { padding-bottom: 32px; }
}

@media (min-width: 1100px) {
	.btn.header-call { display: inline-flex; min-height: 42px; padding: 6px 16px; white-space: nowrap; }
}

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

@media print {
	.callbar, .site-header nav, .site-footer { display: none; }
}
