/*
Theme Name: Your new Home
Description: A free rental-listings theme for homes across Europe. Country and city browsing, search filters, an enquiry form that forwards applications to the owner, and ad slots.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: your-new-home
*/

:root {
	--brand: #17324d;
	--brand-2: #24506f;
	--accent: #c9481f;
	--accent-dark: #a93a17;
	--accent-soft: #fde9e1;
	--bg: #faf8f5;
	--card: #ffffff;
	--text: #1f2933;
	--muted: #5b6770;
	--line: #e7e1d8;
	--radius: 14px;
	--shadow: 0 6px 24px rgba(23, 50, 77, .08);
	--serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .5em; color: var(--brand); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.muted-light { color: rgba(255, 255, 255, .72); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: .7em 1.4em; border-radius: 10px; border: 2px solid transparent;
	font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
	transition: background .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-block { display: flex; width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand-name { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--brand); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 1.2rem; }
.custom-logo { max-height: 48px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav .menu { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.site-nav .menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 600; text-decoration: none; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a { background: #eef2f5; color: var(--brand); }
.nav-cta { padding: .5em 1.1em; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 20px; height: 2px; background: var(--text); margin: auto; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 76px 0 100px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); max-width: 16em; }
.hero .lead { font-size: 1.2rem; max-width: 34em; opacity: .93; margin-bottom: 28px; }
.hero-search { background: #fff; color: var(--text); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: -150px; }
.page-hero { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 44px 0; }
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.page-hero .lead { opacity: .9; margin: .5em 0 0; }

/* Search */
.search-form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.sf-field label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: 4px; color: var(--muted); }
.sf-field select, .field input, .field textarea, .field select {
	width: 100%; padding: .65em .8em; border: 1px solid #cdc6b9; border-radius: 10px;
	background: #fff; font: inherit; color: var(--text);
}
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: -30px; box-shadow: var(--shadow); position: relative; }
.results-count { margin: 22px 0 14px; color: var(--muted); }

/* Sections */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0 56px; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.hero + .section-tight { padding-top: 190px; }
.section-title { font-size: 1.7rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.link-more { font-weight: 700; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: .4em 1.1em; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--text); }
.chips a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.chips .count { font-size: .8rem; background: var(--accent-soft); color: #8a2d10; border-radius: 999px; padding: 0 .55em; }

/* Cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(23, 50, 77, .14); }
.card-media { position: relative; display: block; aspect-ratio: 10 / 7; background: #e8edf0; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #8fa3b1; }
.card-placeholder svg { width: 84px; }
.badge { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--brand); font-weight: 700; font-size: .85rem; padding: .15em .8em; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-type { font-size: .82rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.card-title { font-size: 1.15rem; margin: 0; }
.card-title a { color: var(--brand); text-decoration: none; }
.card-address { margin: 0; color: var(--muted); font-size: .93rem; }
.card-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; color: var(--muted); font-size: .95rem; }
.card-facts strong { color: var(--text); }
.card-price { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.card-price strong { font-size: 1.35rem; color: var(--brand); }
.card-price .unit { font-size: .9rem; color: var(--muted); }

/* Steps */
.steps { list-style: none; counter-reset: s; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 22px; }
.steps li { counter-increment: s; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 10px; }
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Forms */
.contact-grid { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel-title { font-size: 1.3rem; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .93rem; margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.hp { position: absolute; left: -9999px; }
.field.consent label { display: flex; gap: 10px; font-weight: 400; font-size: .9rem; align-items: flex-start; }
.field.consent input { width: auto; margin-top: .3em; }
.notice { padding: .8em 1em; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.notice-ok { background: #e6f5ea; color: #19592b; }
.notice-err { background: #fdeaea; color: #8a1c1c; }

/* Single home */
.breadcrumbs { margin: 22px 0 10px; font-size: .92rem; color: var(--muted); }
.sp-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 4px; }
.sp-head .ref { margin-left: 10px; font-size: .85rem; background: var(--accent-soft); color: #8a2d10; border-radius: 999px; padding: .1em .8em; font-weight: 700; }
.sp-jump { margin: 12px 0 0; }
.sp-stack { max-width: 860px; margin-inline: auto; padding: 4px 0 64px; display: grid; gap: 24px; }
.sp-photo { border-radius: var(--radius); overflow: hidden; background: #e8edf0; aspect-ratio: 16 / 10; }
.sp-photo img { width: 100%; height: 100%; object-fit: cover; }
.sp-gallery { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 0; }
.sp-gallery img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.sp-h2 { font-size: 1.35rem; margin-top: 32px; }
.facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fact dt { font-size: .85rem; color: var(--muted); }
.fact dd { margin: 0; font-weight: 700; }
.price-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.pb-main strong { font-family: var(--serif); font-size: 2rem; color: var(--brand); }
.pb-main span, .pb-note { color: var(--muted); font-size: .92rem; }
.pb-row { display: flex; justify-content: space-between; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; font-size: .92rem; }
.apply-panel { border-color: #f0c9b9; scroll-margin-top: 90px; }
.how-box { background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; font-size: .95rem; }
.how-box p { margin: 0 0 6px; }
.how-box ul { padding-left: 1.1em; display: grid; gap: 6px; }
.share { margin: 0; }

/* Ads */
.ad-slot { margin: 28px 0; text-align: center; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-item { overflow: hidden; }

/* Content */
.entry { font-size: 1.05rem; }
.entry h2 { margin-top: 1.6em; }
.entry img { border-radius: 12px; }
.entry-thumb { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.empty { text-align: center; background: #fff; border: 1px dashed #cdc6b9; border-radius: var(--radius); padding: 48px 20px; }
.empty .btn { margin: 4px; }
.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers { padding: .4em 1em; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; }
.page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Footer */
.site-footer { background: var(--brand); color: #fff; padding: 52px 0 0; }
.site-footer a { color: #fff; }
.site-footer h3 { font-size: 1.05rem; color: #ffd2c0; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1.3fr; }
.footer-menu { list-style: none; display: grid; gap: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-block: 18px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .9rem; }

/* Responsive */
@media (max-width: 900px) {
	.contact-grid, .footer-grid { grid-template-columns: 1fr; }
	.hero { padding: 48px 0 72px; }
	.hero-search { margin-bottom: -120px; }
	.hero + .section-tight { padding-top: 150px; }
}
@media (max-width: 820px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 20px 20px; gap: 12px; }
	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; }
}
@media (max-width: 480px) {
	.field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn, .card { transition: none; }
}

/* ---------- Photo slider ---------- */
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: #e8edf0; box-shadow: var(--shadow); }
.slider-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible { outline-offset: -3px; }
.slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 16 / 10; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-empty { display: grid; place-items: center; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--brand); box-shadow: 0 4px 14px rgba(0, 0, 0, .22); cursor: pointer; display: grid; place-items: center; transition: background .15s, transform .15s; }
.slider-btn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.slider-btn .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-count { position: absolute; right: 14px; bottom: 14px; background: rgba(23, 50, 77, .85); color: #fff; font-size: .85rem; font-weight: 600; padding: .2em .85em; border-radius: 999px; }

/* ---------- Key facts strip ---------- */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.summary-item { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: #fff; }
.s-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.s-text dt { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.s-text dd { margin: 2px 0 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 700; line-height: 1.2; color: var(--brand); }
@media (max-width: 480px) {
	.slider-btn { width: 40px; height: 40px; }
	.s-text dd { font-size: 1.25rem; }
}

/* Renting information */
.tips { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.tips h2 { font-size: 1.25rem; margin: 0 0 8px; }
.tips ul { margin: 0 0 8px; padding-left: 1.1em; color: var(--muted); }
.tips li { margin: 6px 0; }
.tips p { margin: 0; }
.tips-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 20px 0; }
.tips-grid > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.tips-grid h3 { font-size: 1.1rem; margin-bottom: 6px; }
.tips-grid p { margin: 0; color: var(--muted); font-size: .98rem; }
