/*
Theme Name: Rentall
Theme URI: https://www.rentall.me/
Author: Rentall Kotor
Description: Jednostavna tema za Rentall Kotor: apartmani (property), crnogorski i engleski (uz Rentall Lang), bez page buildera.
Version: 1.1.1
Requires at least: 6.4
Requires PHP: 8.1
License: GPL v2 or later
Text Domain: rentall
*/

:root {
	--rt-red: #ff2d2d;
	--rt-red-dark: #e02020;
	--rt-dark: #1a1a1a;
	--rt-text: #333333;
	--rt-grey: #808080;
	--rt-light: #f6f6f6;
	--rt-line: #e6e6e6;
	--rt-white: #ffffff;
	--rt-radius: 6px;
	--rt-wide: 1200px;
	--rt-content: 760px;
	--rt-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
	margin: 0;
	font-family: var(--rt-font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--rt-text);
	background: var(--rt-white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rt-red); text-decoration: none; }
a:hover { color: var(--rt-red-dark); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--rt-dark); line-height: 1.2; font-weight: 600; margin: 1.6em 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1.1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; }

.rt-wrap { max-width: var(--rt-wide); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.rt-header { position: sticky; top: 0; z-index: 50; background: var(--rt-white); border-bottom: 1px solid var(--rt-line); }
.admin-bar .rt-header { top: 32px; }
.rt-header__in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.rt-logo { display: flex; align-items: center; font-weight: 700; font-size: 1.3rem; color: var(--rt-red); letter-spacing: .04em; }
.rt-logo:hover { text-decoration: none; }
.rt-logo img { height: 34px; width: auto; }
.rt-nav { margin-left: auto; }
.rt-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.rt-nav a { display: block; padding: 8px 12px; color: var(--rt-dark); font-size: .95rem; border-radius: var(--rt-radius); }
.rt-nav a:hover { background: var(--rt-light); text-decoration: none; }
.rt-nav .current-menu-item > a, .rt-nav .current_page_item > a { color: var(--rt-red); }
.rt-nav .rl-switch > a { border: 1px solid var(--rt-line); }
.rt-call { white-space: nowrap; }
.rt-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); padding: 8px 12px; font: inherit; cursor: pointer; }

/* ---------- Buttons ---------- */
.rt-btn, .wp-block-button__link {
	display: inline-block;
	padding: 12px 22px;
	border-radius: var(--rt-radius);
	background: var(--rt-red);
	color: #fff;
	font-weight: 600;
	font-size: .98rem;
	line-height: 1.3;
	border: 2px solid var(--rt-red);
	text-align: center;
}
.rt-btn:hover, .wp-block-button__link:hover { background: var(--rt-red-dark); border-color: var(--rt-red-dark); color: #fff; text-decoration: none; }
.rt-btn--ghost, .is-style-outline .wp-block-button__link { background: transparent; color: var(--rt-red); }
.rt-btn--ghost:hover, .is-style-outline .wp-block-button__link:hover { background: var(--rt-red); color: #fff; }
.rt-btn--small { padding: 8px 14px; font-size: .9rem; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }

/* ---------- Content ---------- */
.rt-main { padding: 48px 0 72px; }
.rt-page-head { max-width: var(--rt-content); margin: 0 auto 28px; padding: 0 20px; }
.rt-content { max-width: var(--rt-content); margin: 0 auto; padding: 0 20px; }
.rt-content > .alignwide { width: min(var(--rt-wide), 100vw - 40px); max-width: none; position: relative; left: 50%; transform: translateX(-50%); }
.rt-content > .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0; }
.rt-content > .alignfull:first-child { margin-top: 0; }
.alignfull .alignwide { width: 100%; max-width: var(--rt-wide); margin-left: auto; margin-right: auto; }
.rt-front .rt-main { padding-top: 0; }
.rt-content ul li { margin-bottom: .3em; }
.rt-content hr { border: 0; border-top: 1px solid var(--rt-line); margin: 2.5em 0; }
.has-text-align-center { text-align: center; }
.rt-muted, .has-grey-color { color: var(--rt-grey); }

/* Cover / hero */
.wp-block-cover { position: relative; display: flex; align-items: center; justify-content: center; min-height: 480px; padding: 64px 20px; overflow: hidden; color: #fff; }
.wp-block-cover__image-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.wp-block-cover__background { position: absolute; inset: 0; background: var(--rt-dark); }
.wp-block-cover__background.has-background-dim { opacity: .55; }
.wp-block-cover__inner-container { position: relative; z-index: 1; width: 100%; max-width: var(--rt-content); }
.wp-block-cover h1, .wp-block-cover h2, .wp-block-cover p { color: #fff; }
.wp-block-cover p { font-size: 1.1rem; }
.wp-block-cover a:not(.wp-block-button__link) { color: #fff; text-decoration: underline; }

/* Sections */
.rt-section, .wp-block-group.is-style-rt-light { padding: 56px 20px; }
.wp-block-group.has-light-background-color, .is-style-rt-light { background: var(--rt-light); }
.wp-block-group.alignfull > .wp-block-group__inner-container,
.wp-block-group.alignfull.is-layout-constrained > * { max-width: var(--rt-wide); margin-left: auto; margin-right: auto; }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 28px; margin: 1.5em 0; }
.wp-block-column { flex: 1 1 220px; }
.wp-block-column h3 { margin-top: 0; }
.rt-kicker { color: var(--rt-red); font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3em; }

/* ---------- Property cards ---------- */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; margin: 28px 0; }
.rt-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); overflow: hidden; color: var(--rt-text); transition: box-shadow .15s, transform .15s; }
.rt-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); text-decoration: none; color: var(--rt-text); }
.rt-card__img { aspect-ratio: 3 / 2; background: var(--rt-light); overflow: hidden; }
.rt-card__img img { width: 100%; height: 100%; object-fit: cover; }
.rt-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rt-card__title { font-size: 1.1rem; font-weight: 600; color: var(--rt-dark); margin: 0; }
.rt-card__meta { font-size: .9rem; color: var(--rt-grey); }
.rt-card__price { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--rt-dark); }
.rt-card__price span { color: var(--rt-grey); font-weight: 400; font-size: .9rem; }

/* ---------- Single property ---------- */
.rt-prop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.rt-prop-head h1 { margin: 0 0 6px; }
.rt-prop-head .rt-card__meta { font-size: 1rem; }
.rt-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 200px; gap: 8px; margin-bottom: 32px; border-radius: var(--rt-radius); overflow: hidden; }
.rt-gallery a { display: block; overflow: hidden; background: var(--rt-light); }
.rt-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.rt-gallery a:hover img { transform: scale(1.03); }
.rt-gallery a:first-child { grid-row: span 2; }
.rt-gallery--more { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 160px; }
.rt-gallery--more a:first-child { grid-column: span 2; grid-row: span 2; }
.rt-prop { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.rt-prop .rt-content { max-width: none; padding: 0; margin: 0; }
.rt-box { position: sticky; top: 100px; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); padding: 22px; background: #fff; }
.rt-box__price { font-size: 1.6rem; font-weight: 700; color: var(--rt-dark); line-height: 1.2; }
.rt-box__price span { font-size: .95rem; font-weight: 400; color: var(--rt-grey); }
.rt-facts { list-style: none; padding: 0; margin: 16px 0; border-top: 1px solid var(--rt-line); }
.rt-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rt-line); font-size: .95rem; }
.rt-facts li span:first-child { color: var(--rt-grey); }
.rt-box .rt-btn { display: block; width: 100%; margin-top: 10px; }
.rt-box small { display: block; margin-top: 10px; color: var(--rt-grey); font-size: .85rem; }

/* ---------- Footer ---------- */
.rt-footer { background: var(--rt-dark); color: #bdbdbd; padding: 56px 0 28px; font-size: .95rem; }
.rt-footer a { color: #fff; }
.rt-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.rt-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.rt-footer ul { list-style: none; padding: 0; margin: 0; }
.rt-footer li { margin-bottom: 6px; }
.rt-footer__bottom { border-top: 1px solid #333; margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--rt-grey); }

/* Posts list */
.rt-posts { list-style: none; padding: 0; }
.rt-posts li { padding: 18px 0; border-bottom: 1px solid var(--rt-line); }
.rt-posts h2 { font-size: 1.3rem; margin: 0 0 4px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
	.rt-prop { grid-template-columns: 1fr; gap: 28px; }
	.rt-box { position: static; }
	.rt-footer__cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
	.rt-toggle { display: block; }
	.rt-call { display: none; }
	.rt-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--rt-line); padding: 8px 20px 16px; }
	.rt-nav.is-open { display: block; }
	.rt-nav ul { flex-direction: column; align-items: stretch; }
	.rt-header__in { position: relative; }
	.rt-gallery, .rt-gallery--more { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
	.rt-gallery a:first-child, .rt-gallery--more a:first-child { grid-column: span 2; grid-row: span 2; }
	.wp-block-cover { min-height: 420px; }
	.rt-main { padding-top: 32px; }
}
@media (max-width: 782px) { .admin-bar .rt-header { top: 46px; } }
.wp-block-cover__background.has-background-dim-60 { opacity: .6; }
.wp-block-cover__background.has-background-dim-50 { opacity: .5; }
.wp-block-cover .is-style-outline .wp-block-button__link { color: #fff; border-color: #fff; }
.wp-block-cover .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--rt-dark); }
.rt-prop .rt-content ul { columns: 2; column-gap: 32px; }
.rt-prop .rt-content h2 { font-size: 1.4rem; }
@media (max-width: 600px) { .rt-prop .rt-content ul { columns: 1; } }

/* ===== 1.1.0 — fokus na vlasnike ===== */
.rt-hero-kicker { display: inline-block; background: var(--rt-red); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 4px; margin-bottom: 16px; }
.wp-block-cover .rt-hero-note { font-size: .95rem; opacity: .9; margin-top: 8px; }
.wp-block-cover h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.wp-block-cover .wp-block-cover__inner-container { max-width: 860px; }

/* Brojke */
.rt-stats { background: var(--rt-dark); color: #fff; padding: 28px 20px; }
.rt-stats .wp-block-columns { margin: 0 auto; max-width: var(--rt-wide); gap: 16px; }
.rt-stats .wp-block-column { text-align: center; }
.rt-stats p { margin: 0; color: #bdbdbd; font-size: .92rem; }
.rt-stats p strong { display: block; color: #fff; font-size: 1.5rem; line-height: 1.25; margin-bottom: 2px; }

/* Sekcije */
.rt-sec { padding: 64px 20px; }
.rt-sec--light { background: var(--rt-light); }
.rt-sec > * { max-width: var(--rt-wide); margin-left: auto; margin-right: auto; }
.rt-sec > p, .rt-sec > h2, .rt-sec > .rt-kicker { max-width: var(--rt-content); }
.rt-sec h2 { margin-top: 0; }

/* Kartice usluga */
.rt-cards .wp-block-column { background: #fff; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); padding: 22px; border-top: 3px solid var(--rt-red); }
.rt-sec--light .rt-cards .wp-block-column { border-color: #e9e9e9; border-top-color: var(--rt-red); }
.rt-cards h3 { font-size: 1.08rem; margin: 0 0 8px; }
.rt-cards p { margin: 0; font-size: .95rem; }

/* Koraci */
.rt-steps .wp-block-column { position: relative; padding-top: 8px; }
.rt-steps .rt-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--rt-red); color: #fff; font-weight: 700; margin: 0 0 12px; }
.rt-steps h3 { font-size: 1.05rem; margin: 0 0 6px; }
.rt-steps p { font-size: .95rem; }

/* Lista sa kvačicama */
.rt-check { list-style: none; padding: 0; }
.rt-check li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.rt-check li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 3px solid var(--rt-red); border-bottom: 3px solid var(--rt-red); transform: rotate(-45deg); }

/* Lokacije */
.rt-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; }
.rt-tags li { border: 1px solid var(--rt-line); border-radius: 999px; padding: 6px 16px; background: #fff; font-size: .95rem; }

/* FAQ */
.wp-block-details { border-bottom: 1px solid var(--rt-line); padding: 16px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 600; color: var(--rt-dark); list-style: none; position: relative; padding-right: 28px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 0; top: -2px; color: var(--rt-red); font-size: 1.4rem; line-height: 1; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > *:not(summary) { margin-top: 10px; color: var(--rt-text); }

/* Crveni CTA pojas */
.rt-band { background: var(--rt-red); color: #fff; padding: 56px 20px; text-align: center; }
.rt-band h2, .rt-band p { color: #fff; }
.rt-band h2 { margin-top: 0; }
.rt-band .wp-block-button__link { background: #fff; color: var(--rt-red); border-color: #fff; }
.rt-band .wp-block-button__link:hover { background: var(--rt-dark); border-color: var(--rt-dark); color: #fff; }
.rt-band .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border-color: #fff; }

/* Apartmani u drugom planu */
.rt-secondary h2 { font-size: 1.5rem; }
.rt-grid--small { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rt-grid--small .rt-card__title { font-size: 1rem; }

/* Okvir za vlasnike na stranici apartmana */
.rt-owner-box { margin-top: 48px; padding: 24px; border-radius: var(--rt-radius); background: var(--rt-light); border-left: 4px solid var(--rt-red); }
.rt-owner-box h2 { margin: 0 0 8px; font-size: 1.2rem; }
.rt-owner-box p { margin: 0 0 12px; }

@media (max-width: 820px) {
	.rt-stats .wp-block-column { flex-basis: 45%; }
	.rt-sec { padding: 44px 20px; }
}
