/*
Theme Name: Houzez Agency (Stanovi i Nekretnine)
Template: houzez
Description: Skeleton child theme for agency websites — home page, brand tokens, XML feed for the portal.
Version: 1.0
*/

:root {
  --pn-primary: #0E5E6F;
  --pn-primary-hover: #0A4A58;
  --pn-dark: #10232F;
  --pn-accent: #C08A3E;
  --pn-bg: #F7F8F6;
  --pn-surface: #FFFFFF;
  --pn-line: #E1E7E5;
  --pn-text: #1B2A33;
  --pn-muted: #5A6A72;
  --pn-tint: #E6F0F1;
  --pn-wa: #0F7A3E;
  --pn-radius: 10px;
  --pn-head: "Fraunces", Georgia, "Times New Roman", serif;
  --pn-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body, .btn, input, select, textarea, .form-control { font-family: var(--pn-body); }
body { background: var(--pn-bg); color: var(--pn-text); }
h1, h2, h3, .page-title h1, .item-title, .property-title-price-wrap h1, .block-title-wrap h2 {
  font-family: var(--pn-head); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; text-transform: none;
}
.pn-home h1, .pn-home h2, .pn-home h3 { text-transform: none !important; }
.btn { border-radius: 8px; }
a { color: var(--pn-primary); }

/* ---------- demo bar ---------- */
.pn-demo-bar { background: var(--pn-dark); color: #DDE6E8; font-size: 14px; line-height: 1.4; text-align: center;
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
.pn-demo-bar a { color: #E7C48E; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.pn-demo-bar .pn-short { display: none; }
@media (max-width: 600px) { .pn-demo-bar .pn-long { display: none; } .pn-demo-bar .pn-short { display: inline; } }

/* ---------- shared ---------- */
.pn-wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.pn-section { padding-block: 56px; }
.pn-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pn-section-head h2 { font-size: clamp(24px, 3vw, 32px); margin: 0; color: var(--pn-dark); }
.pn-section-head p { margin: 6px 0 0; color: var(--pn-muted); }
.pn-eyebrow { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pn-accent); margin-bottom: 6px; }
.pn-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.pn-link:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.pn-hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; color: #fff; background: var(--pn-dark); }
.pn-hero img.pn-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pn-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,35,47,.15) 0%, rgba(16,35,47,.35) 45%, rgba(16,35,47,.85) 100%); }
.pn-hero .pn-wrap { position: relative; z-index: 1; width: 100%; padding-block: 56px 40px; }
.pn-hero h1 { color: #fff; font-size: clamp(32px, 5vw, 54px); line-height: 1.08; margin: 0 0 12px; max-width: 16ch; }
.pn-hero p.pn-lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 52ch; margin: 0 0 28px; color: #E8EFF0; }
.pn-credit { position: absolute; right: 12px; top: 10px; z-index: 1; font-size: 11px; color: rgba(255,255,255,.75); }
.pn-credit a { color: inherit; }

/* search */
.pn-search { background: var(--pn-surface); color: var(--pn-text); border-radius: 14px; padding: 16px; box-shadow: 0 18px 40px rgba(6,20,28,.28); max-width: 980px; }
.pn-tabs { display: inline-flex; background: var(--pn-tint); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.pn-tabs label { margin: 0; cursor: pointer; }
.pn-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.pn-tabs span { display: block; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--pn-primary); }
.pn-tabs input:checked + span { background: var(--pn-primary); color: #fff; }
.pn-tabs input:focus-visible + span { outline: 3px solid #7FB8C2; outline-offset: 2px; }
.pn-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.pn-field label { display: block; font-size: 13px; font-weight: 600; color: var(--pn-muted); margin-bottom: 4px; }
.pn-field select, .pn-field input { width: 100%; height: 48px; border: 1px solid var(--pn-line); border-radius: 8px; padding: 0 12px; font-size: 16px; background: #fff; color: var(--pn-text); }
.pn-field select:focus, .pn-field input:focus { outline: 3px solid #7FB8C2; outline-offset: 0; border-color: var(--pn-primary); }
.pn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 8px; border: 1px solid var(--pn-primary);
  background: var(--pn-primary); color: #fff !important; font-weight: 600; font-size: 16px; text-decoration: none !important; cursor: pointer; }
.pn-btn:hover { background: var(--pn-primary-hover); border-color: var(--pn-primary-hover); }
.pn-btn-ghost { background: transparent; color: var(--pn-primary) !important; }
.pn-btn-ghost:hover { background: var(--pn-tint); }
.pn-btn-wa { background: var(--pn-wa); border-color: var(--pn-wa); }
.pn-btn-wa:hover { background: #0B6332; border-color: #0B6332; }
.pn-btn-light { background: #fff; border-color: #fff; color: var(--pn-dark) !important; }
.pn-btn-light:hover { background: #EEF3F3; }

/* stats */
.pn-stats { background: var(--pn-surface); border-bottom: 1px solid var(--pn-line); }
.pn-stats .pn-wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-block: 22px; }
.pn-stat strong { display: block; font-family: var(--pn-head); font-size: 28px; color: var(--pn-dark); line-height: 1.1; }
.pn-stat span { color: var(--pn-muted); font-size: 14px; }

/* cards */
.pn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pn-card { background: var(--pn-surface); border: 1px solid var(--pn-line); border-radius: var(--pn-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.pn-card:hover { box-shadow: 0 12px 28px rgba(16,35,47,.12); transform: translateY(-2px); }
.pn-card a.pn-card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.pn-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--pn-tint); max-width: 100%; }
.pn-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pn-badge { position: absolute; left: 12px; top: 12px; background: rgba(16,35,47,.82); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pn-badge.is-featured { left: auto; right: 12px; background: var(--pn-accent); }
.pn-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pn-price { font-size: 22px; font-weight: 700; color: var(--pn-dark); font-variant-numeric: tabular-nums; }
.pn-price small { font-size: 14px; font-weight: 500; color: var(--pn-muted); }
.pn-card h3 { font-size: 18px; line-height: 1.3; margin: 0; color: var(--pn-text); }
.pn-place { color: var(--pn-muted); font-size: 14px; }
.pn-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--pn-line); font-size: 14px; color: var(--pn-text); }
.pn-facts span { white-space: nowrap; }

/* cities */
.pn-cities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pn-city { position: relative; border-radius: var(--pn-radius); overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; display: block; color: #fff !important; text-decoration: none !important; background: var(--pn-dark); }
.pn-city img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .4s; }
.pn-city:hover img { transform: scale(1.04); }
.pn-city::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(16,35,47,.85)); }
.pn-city span { position: absolute; left: 16px; bottom: 14px; z-index: 1; }
.pn-city strong { display: block; font-family: var(--pn-head); font-size: 22px; }
.pn-city em { font-style: normal; font-size: 14px; color: #DCE6E8; }

/* why */
.pn-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pn-why div { background: var(--pn-surface); border: 1px solid var(--pn-line); border-radius: var(--pn-radius); padding: 22px; }
.pn-why h3 { font-size: 20px; margin: 10px 0 6px; color: var(--pn-dark); }
.pn-why p { margin: 0; color: var(--pn-muted); line-height: 1.6; }
.pn-why i { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--pn-tint); color: var(--pn-primary); font-style: normal; font-size: 20px; }

/* contact band */
.pn-cta { background: var(--pn-dark); color: #fff; }
.pn-cta .pn-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 48px; }
.pn-cta h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); margin: 0 0 10px; }
.pn-cta p { color: #C9D6D9; margin: 0; max-width: 52ch; line-height: 1.6; }
.pn-cta-actions { display: flex; flex-direction: column; gap: 10px; }
.pn-cta-actions .pn-btn { width: 100%; }
.pn-cta-phone { color: #E7C48E; font-size: 15px; text-align: center; margin-top: 4px; }

/* floating WhatsApp */
.pn-wa-float { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 999;
  width: 56px; height: 56px; border-radius: 50%; background: var(--pn-wa); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.pn-wa-float svg { width: 30px; height: 30px; fill: #fff; }
body.single-property .pn-wa-float { display: none; }

/* page content (O nama, Kontakt) */
.pn-page { max-width: 760px; }
.pn-page h2 { font-size: 26px; margin-top: 32px; color: var(--pn-dark); }
.pn-page p, .pn-page li { line-height: 1.7; font-size: 17px; }
.pn-contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.pn-contact-cards a, .pn-contact-cards div { background: var(--pn-surface); border: 1px solid var(--pn-line); border-radius: var(--pn-radius); padding: 16px; text-decoration: none; color: var(--pn-text); }
.pn-contact-cards strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--pn-muted); margin-bottom: 4px; }
.pn-credits { font-size: 14px; }
.pn-credits li { line-height: 1.5; margin-bottom: 6px; word-break: break-word; }

/* Houzez overrides */
.header-main-wrap .main-nav .nav-link { font-weight: 600; text-transform: none; font-size: 15px; letter-spacing: 0; }
.item-wrap .item-title a, .item-price { font-variant-numeric: tabular-nums; }
.label-featured { background: var(--pn-accent) !important; }
.footer-top-wrap { padding-top: 40px; }

@media (max-width: 991px) {
  .pn-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-fields .pn-submit { grid-column: 1 / -1; }
  .pn-fields .pn-submit .pn-btn { width: 100%; }
  .pn-grid, .pn-cities, .pn-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-cta .pn-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .pn-hero { min-height: 0; }
  .pn-hero .pn-wrap { padding-block: 120px 24px; }
  .pn-section { padding-block: 40px; }
  .pn-grid, .pn-why { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pn-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pn-city strong { font-size: 18px; }
  .pn-stats .pn-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn-contact-cards { grid-template-columns: minmax(0, 1fr); }
  .pn-search { padding: 14px; }
}

/* listing page (same fixes as on the portal) */
.page-title h1, .property-title-wrap h1, .item-title, .item-title a, .property-title h1, .block-title-wrap h2, .block-title-wrap h3, h1, h2, h3 { text-transform: none !important; }
.agent-phone-wrap .agent-phone a { white-space: nowrap; }
@media (max-width: 767.98px) {
  .agent-phone-wrap { flex-wrap: wrap; row-gap: 10px; }
  .agent-phone-wrap .agent-phone { flex: 0 0 calc(100% - 32px); margin-right: 0 !important; }
  .agent-phone-wrap a { display: inline-block; padding: 4px 0; font-size: 17px; }
  .single-property .back-to-top-wrap { display: none !important; }
}
.label-featured, .label.label-featured { background: var(--pn-accent) !important; }
