/*
Theme Name: NRE Theme
Theme URI: https://nre.ee
Author: NRE Kinnisvara
Author URI: https://nre.ee
Description: NRE Kinnisvara vahenduse koduleht — premium, minimaalne, arhitektuurne kujundus.
Version: 1.2.50
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: nre-theme
Tags: real-estate, minimal, premium, one-page
*/

/* =============================================
   CSS CUSTOM PROPERTIES — NRE COLOR SYSTEM
   ============================================= */
:root {
  /* Responsive hero border — 13px mobiil kuni 40px desktop */
  --hero-border: clamp(13px, 2.5vw, 40px);

  /* Backgrounds */
  --bg-primary:    #F6F3EE;
  --bg-secondary:  #E7E0D6;
  --dark-primary:  #161616;
  --dark-secondary:#222222;

  /* Text */
  --text-primary:  #1A1A1A;
  --text-secondary:#5F5A52;
  --text-light:    #F3EFE8;

  /* Accent */
  --accent:        #6E5A3C;
  --accent-hover:  #5A4931;
  --accent-soft:   #8A7A67;

  /* UI */
  --border:        rgba(0,0,0,0.07);
  --border-light:  rgba(255,255,255,0.1);
  --shadow-sm:     0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:     0 8px 32px rgba(0,0,0,0.10);
  --card-bg:       #ffffff;

  /* Layout */
  --max-width:     1280px;
  --nav-height:    80px;
  --section-pad:   120px;
  --section-pad-sm: 72px;

  /* Typography */
  --font-heading:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --trans-fast:    0.2s ease;
  --trans-mid:     0.35s ease;
  --trans-slow:    0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--trans-fast);
}

a:hover {
  color: var(--accent);
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

p {
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.75;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

.section-pad {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.section-pad-sm {
  padding-top: var(--section-pad-sm);
  padding-bottom: var(--section-pad-sm);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--trans-mid);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--bg-primary);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--text-light);
  border-color: rgba(243,239,232,0.5);
}

.btn-outline-light:hover {
  background-color: var(--text-light);
  color: var(--dark-primary);
  border-color: var(--text-light);
}

.btn-text {
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-text:hover {
  color: var(--accent-hover);
}

.btn-text .arrow {
  transition: transform var(--trans-fast);
}

.btn-text:hover .arrow {
  transform: translateX(4px);
}

/* =============================================
   SITE HEADER & NAVIGATION
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background-color var(--trans-mid),
              box-shadow var(--trans-mid),
              top 0.5s cubic-bezier(0.16,1,0.3,1),
              left 0.5s cubic-bezier(0.16,1,0.3,1),
              right 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* Avaleht: transparent — "pildi sees", raamiga joondatud */
.site-header.transparent {
  background-color: transparent;
  top: var(--hero-border);
  left: var(--hero-border);
  right: var(--hero-border);
}

/* Admin bar */
.admin-bar .site-header.transparent {
  top: calc(32px + var(--hero-border));
}
@media screen and (max-width: 782px) {
  .admin-bar .site-header.transparent {
    top: calc(46px + var(--hero-border));
  }
}

/* Scrollitud: full-width */
.site-header.scrolled {
  background-color: var(--bg-primary);
  box-shadow: 0 1px 0 var(--border);
  top: 0;
  left: 0;
  right: 0;
}
.admin-bar .site-header.scrolled { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header.scrolled { top: 46px; }
}

/* ── Header inner grid ── */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 var(--hero-border);
  gap: 2rem;
}

/* Scrollitud headeris väiksem padding */
.site-header.scrolled .header-inner {
  padding: 0 32px;
}

/* Layout: logo paremal */
.layout-logo-right .header-inner {
  /* nav vasakul, logo + toggle paremal */
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.site-logo img.nre-logo {
  height: 36px;
  width: auto;
  transition: filter var(--trans-mid), opacity var(--trans-fast);
  position: relative;
  z-index: 1;
  /* filter tuleb Customizerist (inline CSS) */
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.main-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243,239,232,0.9);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--trans-fast);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width var(--trans-mid);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.site-header.scrolled .main-nav a {
  color: var(--text-primary);
}

.main-nav a:hover {
  color: inherit;
}

.header-cta {
  flex-shrink: 0;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: rgba(243,239,232,0.9);
  transition: all var(--trans-fast);
}

.site-header.scrolled .menu-toggle span {
  background-color: var(--text-primary);
}

/* Header CTA nupp — valge kontuur transparent headeris */
.site-header.transparent .header-cta {
  color: rgba(243,239,232,0.9);
  border-color: rgba(243,239,232,0.5);
}

.site-header.transparent .header-cta:hover {
  background-color: rgba(243,239,232,0.15);
}

/* =============================================
   HERO WRAPPER — responsive raam (13–40px)
   ============================================= */
.hero-wrapper {
  margin: var(--hero-border) var(--hero-border) 0;
  border-radius: 0;   /* ei ole rounded corners */
  overflow: hidden;
  position: relative;
  z-index: 0;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  height: calc(100vh - var(--hero-border));
  max-height: 665px;
  min-height: 400px;
  overflow: hidden;
  background-color: var(--dark-secondary);
  display: flex;
  align-items: flex-end;
}

/* Hero taustagraafika */
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 8s ease;
  transform: scale(1.03);
}

.hero.loaded .hero-bg img {
  transform: scale(1);
}

/* Gradient alt — teksti loetavus */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22,22,22,0.72) 0%,
    rgba(22,22,22,0.18) 45%,
    rgba(22,22,22,0.05) 100%
  );
  z-index: 1;
}

/* Hero sisu — alumine vasak */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--hero-border) clamp(28px, 4vw, 56px);
  width: 100%;
}

/* Pealkiri — suur, üks rida */
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: none;
}

/* Scroll indikaator */
.hero-scroll {
  display: none;
}

/* Logo kast */
.site-logo {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--trans-fast), background-color var(--trans-fast), padding var(--trans-fast);
}

.site-logo.has-bg {
  position: relative;
  isolation: isolate;
  /* Värv, padding ja opacity tulevad Customizerist (inline CSS) */
}

/* Logo bg kast — eraldi kiht (et opacity ei mõjutaks logo pilti) */
.site-logo.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--nre-logo-bg-color, #161616);
  opacity: var(--nre-logo-bg-opacity, 1);
  z-index: -1;
}

/* Logo bg ulatub üle borderi kuni vaateavna servani */
.layout-logo-right .site-header.transparent .site-logo.has-bg::before {
  top: -200px;    /* ulatub viewport ülemisse serva */
  right: -200px;  /* ulatub viewport paremasse serva */
  bottom: 0;
  left: 0;
}
.layout-logo-left .site-header.transparent .site-logo.has-bg::before {
  top: -200px;
  left: -200px;
  bottom: 0;
  right: 0;
}

.nre-logo {
  height: 36px; /* üle kirjutab Customizer */
  width: auto;
  display: block;
  transition: filter var(--trans-mid);
  /* filter tuleb Customizerist (inline CSS) */
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.hero.loaded .hero-bg img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(22,22,22,0.38) 0%,
    rgba(22,22,22,0.52) 60%,
    rgba(22,22,22,0.72) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content .eyebrow {
  color: var(--bg-secondary);
  opacity: 0.85;
}

.hero-content h1 {
  color: var(--text-light);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.08;
}

.hero-content h1 em {
  font-style: italic;
}

.hero-content p {
  color: rgba(243,239,232,0.8);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 480px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(243,239,232,0.5);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: scrollBounce 2.5s ease-in-out infinite;
}

.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(243,239,232,0.3);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* =============================================
   STATS STRIP
   ============================================= */
.stats-strip {
  background-color: var(--bg-secondary);
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.stat-item {
  padding: 0 48px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 4vw, 4rem);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* =============================================
   INTRO / ABOUT SECTION
   ============================================= */
.intro-section {
  background-color: var(--bg-primary);
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
  overflow: hidden;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans-slow);
}

.intro-image:hover img {
  transform: scale(1.03);
}

.intro-image::before {
  content: '';
  position: absolute;
  bottom: -24px;
  right: -24px;
  width: 60%;
  height: 60%;
  border: 1px solid var(--border);
  z-index: -1;
}

.intro-text h2 {
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.intro-text h2 strong {
  font-weight: 500;
  display: block;
}

.intro-text p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.intro-text p:last-of-type {
  margin-bottom: 2rem;
}

.intro-divider {
  width: 40px;
  height: 1px;
  background-color: var(--accent);
  margin-bottom: 2rem;
}

/* =============================================
   SERVICES SECTION
   ============================================= */
.services-section {
  background-color: var(--bg-primary);
  padding-bottom: var(--section-pad);
}

.services-header {
  padding-bottom: 56px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.services-header h2 {
  font-weight: 300;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background-color: var(--border);
}

.service-card {
  position: relative;
  background-color: var(--bg-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card-image {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.92);
}

.service-card:hover .service-card-image img {
  transform: scale(1.06);
  filter: brightness(0.85);
}

.service-card-body {
  padding: 32px 36px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card-body h3 {
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  transition: color var(--trans-fast);
}

.service-card:hover .service-card-body h3 {
  color: var(--accent);
}

.service-card-body p {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
  max-width: none;
}

/* =============================================
   DARK STATEMENT SECTION
   ============================================= */
.statement-section {
  background-color: var(--dark-primary);
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
}

.statement-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(110,90,60,0.4), transparent);
}

.statement-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.statement-text h2 {
  color: var(--text-light);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.statement-text h2 em {
  font-style: italic;
  color: rgba(243,239,232,0.65);
}

.statement-text p {
  color: rgba(243,239,232,0.6);
  margin-bottom: 2rem;
  max-width: none;
}

.statement-image {
  position: relative;
  aspect-ratio: 5/4;
  overflow: hidden;
}

.statement-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) saturate(0.8);
  transition: filter 0.8s ease;
}

.statement-section:hover .statement-image img {
  filter: brightness(0.85) saturate(0.9);
}

/* =============================================
   FEATURED PROPERTIES
   ============================================= */
.properties-section {
  background-color: var(--bg-secondary);
  padding: var(--section-pad) 0;
}

.properties-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 2rem;
}

.properties-header h2 {
  font-weight: 300;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background-color: var(--border);
}

.property-card {
  background-color: var(--bg-primary);
  overflow: hidden;
  cursor: pointer;
}

.property-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.property-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.property-card:hover .property-card-image img {
  transform: scale(1.06);
}

.property-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--accent);
  color: var(--text-light);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
}

.property-card-body {
  padding: 24px 28px 32px;
}

.property-type {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.property-card-body h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 6px;
  transition: color var(--trans-fast);
}

.property-card:hover .property-card-body h4 {
  color: var(--accent);
}

.property-location {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.property-meta {
  display: flex;
  gap: 1.5rem;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.property-meta-item {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.property-price {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-primary);
  font-weight: 400;
  display: block;
  margin-top: 12px;
}

/* =============================================
   CONTACT CTA SECTION
   ============================================= */
.cta-section {
  background-color: var(--bg-primary);
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--border);
}

.cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.cta-text h2 {
  font-weight: 300;
  margin-bottom: 1.25rem;
}

.cta-text p {
  margin-bottom: 2rem;
}

.cta-contact-info {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cta-contact-info a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--trans-fast);
}

.cta-contact-info a:hover {
  color: var(--accent);
}

.cta-contact-info .icon {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

/* Contact Form */
.cta-form {
  background-color: var(--bg-secondary);
  padding: 48px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color var(--trans-fast);
  outline: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-footer {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-privacy {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =============================================
   SITE FOOTER
   ============================================= */
.site-footer {
  background-color: var(--dark-primary);
  color: var(--text-light);
}

.footer-top {
  padding: 80px 0 60px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 56px;
  border-bottom: 1px solid var(--border-light);
}

.footer-brand .footer-logo {
  height: 32px;
  width: auto;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.footer-brand p {
  color: rgba(243,239,232,0.5);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-light);
  color: rgba(243,239,232,0.5);
  font-size: 0.7rem;
  transition: all var(--trans-fast);
}

.footer-social a:hover {
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}

.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243,239,232,0.4);
  margin-bottom: 1.5rem;
}

.footer-col ul li {
  margin-bottom: 0.65rem;
}

.footer-col ul li a {
  color: rgba(243,239,232,0.7);
  font-size: 0.9rem;
  transition: color var(--trans-fast);
}

.footer-col ul li a:hover {
  color: var(--accent-soft);
}

.footer-col address {
  font-style: normal;
  color: rgba(243,239,232,0.7);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col address a {
  color: rgba(243,239,232,0.7);
  display: block;
}

.footer-col address a:hover {
  color: var(--accent-soft);
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  color: rgba(243,239,232,0.35);
  font-size: 0.78rem;
  max-width: none;
  line-height: 1;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: rgba(243,239,232,0.35);
  font-size: 0.78rem;
  transition: color var(--trans-fast);
}

.footer-bottom-links a:hover {
  color: var(--accent-soft);
}

/* =============================================
   INNER PAGE HERO
   ============================================= */
.page-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-hero .eyebrow {
  margin-bottom: 0.75rem;
}

.page-hero h1 {
  font-weight: 300;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.1rem;
  max-width: 560px;
}

/* =============================================
   BLOG / TEADMISED
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background-color: var(--border);
}

.post-card {
  background-color: var(--bg-primary);
  overflow: hidden;
}

.post-card-image {
  aspect-ratio: 3/2;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-body {
  padding: 28px 32px 36px;
}

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.post-date {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.post-cat {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.post-card-body h4 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  transition: color var(--trans-fast);
  line-height: 1.25;
}

.post-card:hover .post-card-body h4 {
  color: var(--accent);
}

.post-card-body p {
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: none;
}

/* =============================================
   SINGLE POST
   ============================================= */
.entry-header {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 60px;
  background-color: var(--bg-secondary);
}

.entry-content {
  padding: 80px 0;
}

.entry-content-inner {
  max-width: 740px;
  margin: 0 auto;
}

/* Kontaktileht vajab täislaiust — käsitletud kontakt-hero reeglites allpool */

.entry-content h2,
.entry-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

.entry-content p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  max-width: none;
}

.entry-content ul,
.entry-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.entry-content ul li,
.entry-content ol li {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* =============================================
   ANIMATIONS / SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  .intro-grid {
    gap: 48px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  :root {
    --section-pad: 80px;
    --section-pad-sm: 56px;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  /* ── Mobiili header layout ──────────────────
     Logo paigutus järgib desktopi settingut.
     Logo-right: logo paremal, hamburger vasakul.
     Logo-left: logo vasakul, hamburger paremal (vaikimisi).
  ── */
  .layout-logo-right .header-right {
    flex: 1;
    justify-content: space-between;
  }
  .layout-logo-right .menu-toggle {
    order: -1; /* hamburger liigub logo-st vasakule */
  }

  .intro-grid,
  .statement-inner,
  .cta-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .intro-image {
    aspect-ratio: 16/9;
  }

  .intro-image::before {
    display: none;
  }

  .statement-image {
    order: -1;
    aspect-ratio: 16/9;
  }

  .services-grid,
  .properties-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .services-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0 24px 32px;
    text-align: left;
  }

  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --section-pad: 64px;
    --nav-height: 68px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-form {
    padding: 28px 24px;
  }
}

/* =============================================
   MOBILE NAV OVERLAY
   ============================================= */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--dark-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav ul li a {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 300;
  color: var(--text-light);
  display: block;
  padding: 0.4rem 0;
  transition: color var(--trans-fast), opacity var(--trans-fast);
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav ul li a:hover {
  color: rgba(243,239,232,0.5);
}

.mobile-nav .mobile-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(243,239,232,0.6);
  font-size: 1.5rem;
}

.mobile-nav .mobile-contact {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav .mobile-contact a {
  color: rgba(243,239,232,0.5);
  font-size: 0.9rem;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.text-accent  { color: var(--accent); }
.text-light   { color: var(--text-light); }
.text-muted   { color: var(--text-secondary); }

.bg-primary   { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-dark      { background-color: var(--dark-primary); }

.mt-sm  { margin-top: 1rem; }
.mt-md  { margin-top: 2rem; }
.mt-lg  { margin-top: 3rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* =============================================
   WORDPRESS ALIGNMENT CLASSES
   ============================================= */
.wp-block-image.alignwide,
.wp-block-image.alignfull {
  margin-left: auto;
  margin-right: auto;
}

.alignleft  { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1.5rem; }

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  text-align: center;
}

/* ══════════════════════════════════════════════
   KONTAKTILEHT
══════════════════════════════════════════════ */

.kontakt-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

.kontakt-main {
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 10vw, 128px);
}

.kontakt-photo-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--bg-secondary);
}

.kontakt-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.kontakt-photo-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  background: var(--dark-secondary);
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 300;
  color: rgba(243,239,232,.3);
  letter-spacing: .1em;
}

.kontakt-name {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.kontakt-role {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.kontakt-details {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-bottom: 28px;
}

.kontakt-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: color var(--trans-fast);
}

a.kontakt-detail-item:hover .kontakt-detail-value { color: var(--accent); }

.kontakt-detail-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kontakt-detail-value {
  font-size: 0.92rem;
  color: var(--text-primary);
  transition: color var(--trans-fast);
}

.kontakt-social {
  display: flex;
  gap: 12px;
}

.kontakt-social-link {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
  text-decoration: none;
}

.kontakt-social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Kontaktilehe päis */
.kontakt-hero {
  padding: clamp(60px, 8vw, 120px) 0 clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.kontakt-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.kontakt-heading {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
}

.kontakt-heading em {
  font-style: italic;
  color: var(--accent);
}

/* Laiendan max-width ka kontakt-hero jaoks */
.entry-content-inner:has(.kontakt-hero),
.entry-content-inner:has(.kontakt-grid) {
  max-width: 100%;
}

/* Kontaktivorm */
.kontakt-form-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.kontakt-form-header h3 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.kontakt-form-header p { font-size: 0.88rem; color: var(--text-secondary); }

.kf-row { margin-bottom: 20px; }

.kf-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.kf-field { display: flex; flex-direction: column; gap: 8px; }

.kf-field label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.kf-field label span { color: var(--accent); }

.kf-field input,
.kf-field select,
.kf-field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: border-color var(--trans-fast);
  appearance: none;
  -webkit-appearance: none;
}

.kf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236E5A3C' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.kf-field input:focus,
.kf-field select:focus,
.kf-field textarea:focus { outline: none; border-color: var(--accent); }

.kf-field input::placeholder,
.kf-field textarea::placeholder { color: var(--text-muted); font-size: 0.88rem; }

.kf-field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.kf-submit-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.kf-submit { padding: 14px 36px; font-size: 0.78rem; letter-spacing: 0.1em; cursor: pointer; white-space: nowrap; }

.kf-privacy { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; }

.kf-success,
.kf-error {
  margin-top: 16px;
  padding: 14px 18px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}

.kf-success { background: rgba(42,120,70,.08); color: #2a7846; border-left: 3px solid #2a7846; }
.kf-error   { background: rgba(180,40,40,.07); color: #b42828; border-left: 3px solid #b42828; }

@media (max-width: 1100px) {
  .kontakt-grid { grid-template-columns: 340px 1fr; }
}

@media (max-width: 860px) {
  .kontakt-grid { grid-template-columns: 1fr; max-width: 560px; }
  .kontakt-photo-wrap { aspect-ratio: 4/3; }
  .kf-2col { grid-template-columns: 1fr; }
  .kf-submit-row { flex-direction: column; align-items: flex-start; }
}


/* ==============================================
   CTA SEKTSIOON
   ============================================== */
.nre-cta-section {
  background: var(--bg-secondary);
  padding: clamp(64px, 9vw, 120px) 0;
  border-top: 1px solid var(--border);
}

.nre-cta-heading {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1.25rem;
  color: var(--text-primary);
}

.nre-cta-heading em {
  font-style: italic;
  color: var(--accent);
}

.nre-cta-subtext {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.nre-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ==============================================
   CONTACT FORM 7 — NRE stiil
   ============================================== */

/* Eemalda CF7 vaikimisi border/padding response boxilt */
.wpcf7 .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 14px 18px;
  font-size: 0.88rem;
  border-radius: 0;
  border: none;
  border-left: 3px solid;
}

.wpcf7 .wpcf7-mail-sent-ok {
  background: rgba(42,120,70,.08);
  color: #2a7846;
  border-color: #2a7846;
}

.wpcf7 .wpcf7-validation-errors,
.wpcf7 .wpcf7-acceptance-missing,
.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-aborted {
  background: rgba(180,40,40,.07);
  color: #b42828;
  border-color: #b42828;
}

/* Välja valideerimisviga */
.wpcf7-not-valid-tip {
  font-size: 0.72rem;
  color: #b42828;
  margin-top: 5px;
  display: block;
}

.wpcf7-form-control.wpcf7-not-valid {
  border-color: #b42828 !important;
}

/* CF7 inputs — pärivad .kf-field input stiilidelt automaatselt */
.kf-field .wpcf7-form-control {
  width: 100%;
  display: block;
}

/* Peida CF7 spinner */
.wpcf7-spinner { display: none !important; }

/* Label span (tärnid) */
.kf-field label span { color: var(--accent); }

/* CF7 submit wrapperit ei kasutata — kasutame .kf-submit-row */
.wpcf7 .wpcf7-submit {
  border: none;
}

/* =============================================
   MÜÜN KINNISVARA PAGE (ms-*)
   ============================================= */

/* Luba ms-* sektsioonidel täislaiusele minna */
.entry-content-inner:has(.ref-grid) {
  max-width: 100%;
}
.entry-content-inner:has(.ms-opener),
.container:has(.ms-opener) {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* --- Opener --- */
.ms-opener {
  display: grid;
  grid-template-columns: 55% 1fr;
  min-height: 80vh;
  background: var(--dark-primary);
}
.ms-opener-text {
  padding: clamp(64px, 8vw, 120px) clamp(32px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ms-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.ms-label--light { color: var(--accent-soft); }
.ms-opener-heading {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-light);
  margin-bottom: 28px;
}
.ms-opener-body {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.75;
  color: rgba(243,239,232,0.6);
  max-width: 480px;
}
.ms-opener-img {
  position: relative;
  overflow: hidden;
}
.ms-opener-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Process --- */
.ms-process {
  background: var(--bg-primary);
  padding: clamp(64px, 8vw, 112px) clamp(24px, 6vw, 96px);
}
.ms-process-intro {
  margin-bottom: clamp(40px, 5vw, 64px);
}
.ms-process-intro h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 400;
  margin-top: 14px;
}
.ms-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.ms-step {
  background: var(--bg-primary);
  padding: clamp(32px, 4vw, 56px);
  position: relative;
}
.ms-step-n {
  position: absolute;
  top: clamp(24px, 3vw, 40px);
  right: clamp(24px, 3vw, 40px);
  font-family: var(--font-heading);
  font-size: clamp(56px, 8vw, 104px);
  line-height: 1;
  color: var(--bg-secondary);
  pointer-events: none;
  user-select: none;
}
.ms-step-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--text-primary);
  padding-right: clamp(48px, 8vw, 120px);
}
.ms-step-lead {
  font-size: 14px;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 20px;
  line-height: 1.5;
}
.ms-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ms-step-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 9px 0 9px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
  line-height: 1.5;
}
.ms-step-list li:last-child { border-bottom: none; }
.ms-step-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Feature image --- */
.ms-feature-img {
  position: relative;
  height: clamp(280px, 42vw, 560px);
  overflow: hidden;
}
.ms-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(22,22,22,0.65) 0%, rgba(22,22,22,0.1) 100%);
  display: flex;
  align-items: flex-end;
  padding: clamp(32px, 5vw, 64px) clamp(32px, 6vw, 96px);
}
.ms-feature-overlay blockquote {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  max-width: 560px;
  line-height: 1.3;
}

/* --- Risk --- */
.ms-risk {
  background: var(--bg-secondary);
  padding: clamp(64px, 8vw, 112px) clamp(32px, 10vw, 160px);
}
.ms-risk-inner {
  max-width: 680px;
}
.ms-risk h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 400;
  margin: 14px 0 24px;
}
.ms-risk-lead {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.ms-risk p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* --- Eristus --- */
.ms-eristus {
  display: grid;
  grid-template-columns: 45% 1fr;
  min-height: 65vh;
}
.ms-eristus-img {
  overflow: hidden;
}
.ms-eristus-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-eristus-text {
  background: var(--dark-primary);
  padding: clamp(48px, 6vw, 96px) clamp(32px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ms-eristus-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 400;
  color: var(--text-light);
  margin: 14px 0 20px;
  line-height: 1.2;
}
.ms-eristus-text > p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(243,239,232,0.6);
  margin-bottom: 32px;
}
.ms-eristus-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ms-eristus-list li {
  padding: 14px 0 14px 18px;
  font-size: 15px;
  color: rgba(243,239,232,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  line-height: 1.5;
}
.ms-eristus-list li:last-child { border-bottom: none; }
.ms-eristus-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Results --- */
.ms-results {
  background: var(--dark-primary);
  padding: clamp(64px, 8vw, 112px) clamp(24px, 6vw, 96px);
}
.ms-results-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243,239,232,0.35);
  margin-bottom: clamp(32px, 4vw, 56px);
}
.ms-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
}
.ms-result {
  background: var(--dark-primary);
  padding: clamp(28px, 3vw, 48px) clamp(24px, 2.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ms-result-num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(40px, 5vw, 68px);
  color: rgba(255,255,255,0.07);
  line-height: 1;
}
.ms-result p {
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--text-light);
  line-height: 1.45;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .ms-opener { grid-template-columns: 1fr 1fr; }
  .ms-results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .ms-opener,
  .ms-eristus { grid-template-columns: 1fr; }
  .ms-opener-img,
  .ms-eristus-img { aspect-ratio: 4/3; min-height: 260px; }
  .ms-steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ms-results-grid { grid-template-columns: 1fr; }
}

/* =============================================
   ESILEHT (hp-*)
   ============================================= */

.hp-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* — 1. Intro — */
.hp-intro {
  padding: clamp(72px, 9vw, 128px) 0;
}
.hp-intro-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
}
.hp-intro-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 28px;
  margin-top: 0;
}
.hp-intro-text p {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 16px;
}
.hp-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-top: 16px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.hp-text-link:hover { border-color: var(--accent); }
.hp-intro-img {
  aspect-ratio: 3/4;
  overflow: hidden;
}
.hp-intro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* — 2. Miks NRE — */
.hp-why {
  background: var(--bg-secondary);
  padding: clamp(72px, 9vw, 128px) 0;
}
.hp-why-header {
  max-width: 600px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.hp-why-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin-top: 0;
}
.hp-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
.hp-why-card {
  background: var(--bg-secondary);
  padding: clamp(32px, 4vw, 52px);
}
.hp-why-card h3 {
  font-family: var(--font-heading);
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 12px;
  margin-top: 0;
}
.hp-why-card p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

/* — 3. Teenused — */
.hp-services {
  padding: clamp(72px, 9vw, 128px) 0;
}
.hp-services-header {
  margin-bottom: clamp(40px, 5vw, 64px);
}
.hp-services-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 400;
  color: var(--text-primary);
  margin-top: 0;
}
.hp-services-list {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(40px, 5vw, 56px);
}
.hp-service-item {
  position: relative;
  display: grid;
  grid-template-columns: 260px 1fr 40px;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 3vw, 36px) 0;
  border-top: 1px solid var(--border);
  transition: opacity 0.2s;
}
.hp-service-item:last-child { border-bottom: 1px solid var(--border); }
.hp-service-item:hover { opacity: 0.65; }
.hp-service-item h3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.7vw, 25px);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
}
.hp-service-item p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}
.hp-service-arrow {
  font-size: 18px;
  color: var(--accent);
  justify-self: end;
  text-decoration: none;
}
.hp-service-link {
  position: absolute;
  inset: 0;
}

/* — 4. Eristus — */
.hp-eristus {
  display: grid;
  grid-template-columns: 45% 1fr;
  min-height: 65vh;
}
.hp-eristus-img {
  overflow: hidden;
}
.hp-eristus-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hp-eristus-text {
  background: var(--dark-primary);
  padding: clamp(64px, 8vw, 120px) clamp(48px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hp-eristus-text .hp-eyebrow { color: var(--accent-soft, var(--accent)); }
.hp-eristus-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-light);
  margin-bottom: 28px;
  margin-top: 0;
}
.hp-eristus-text p {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.8;
  color: rgba(243,239,232,0.65);
  max-width: 480px;
  margin-bottom: 16px;
}

/* — 5. CTA — */
.hp-cta {
  background: var(--bg-secondary);
  padding: clamp(88px, 11vw, 152px) 0;
  text-align: center;
}
.hp-cta .hp-eyebrow { color: var(--accent); }
.hp-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
  margin-top: 0;
}
.hp-cta p {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
}

/* — Responsive — */
@media (max-width: 960px) {
  .hp-intro-grid {
    grid-template-columns: 1fr;
  }
  .hp-intro-img {
    aspect-ratio: 16/9;
    order: -1;
  }
  .hp-why-grid {
    grid-template-columns: 1fr;
  }
  .hp-service-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .hp-service-arrow { display: none; }
  .hp-eristus {
    grid-template-columns: 1fr;
  }
  .hp-eristus-img {
    aspect-ratio: 4/3;
    min-height: 260px;
  }
}


/* ==============================================
   SOOVITUS LEHT (ref-)
   ============================================== */
.ref-grid {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: clamp(48px, 6vw, 96px);
  padding: clamp(32px, 4vw, 56px) 0 clamp(56px, 7vw, 104px);
  align-items: start;
}
.ref-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.ref-heading {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.ref-lead {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
}
.ref-steps {
  list-style: none;
  counter-reset: ref-step;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ref-steps li {
  counter-increment: ref-step;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
}
.ref-steps li:first-child { border-top: 1px solid var(--border); }
.ref-steps li::before {
  content: "0" counter(ref-step);
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--accent);
  min-width: 28px;
  padding-top: 1px;
  flex-shrink: 0;
}
.ref-notice-block {
  background: var(--bg-secondary);
  padding: clamp(20px, 2.5vw, 32px);
  margin-bottom: 28px;
}
.ref-notice-block h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.ref-notice-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ref-notice-block ul li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}
.ref-notice-block ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}
.ref-fee-block {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}
.ref-fee-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.ref-fee-block p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}
/* Right column */
.ref-form-col {
  position: sticky;
  top: 100px;
}
.ref-form-header {
  margin-bottom: 28px;
}
.ref-form-header h3 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.ref-form-header p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}
.ref-confidential {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-tertiary, var(--text-secondary));
  margin-top: 20px;
  opacity: 0.75;
}
@media (max-width: 900px) {
  .ref-grid {
    grid-template-columns: 1fr;
  }
  .ref-form-col {
    position: static;
  }
}


/* ==============================================
   NÕUSTAMINE JA HINNASTAMINE (nc-)
   ============================================== */

/* --- Includes (3 col) --- */
.nc-includes {
  padding: clamp(64px, 8vw, 120px) 0;
  background: var(--bg-secondary);
}
.nc-includes-intro {
  margin-bottom: clamp(40px, 5vw, 64px);
}
.nc-includes-intro h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
  color: var(--text-primary);
  margin-top: 0;
}
.nc-includes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
.nc-include-block {
  background: var(--bg-secondary);
  padding: clamp(28px, 3.5vw, 44px);
}
.nc-include-block h3 {
  font-family: var(--font-heading);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.nc-include-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nc-include-block ul li {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}
.nc-include-block ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 2px;
}

/* --- Standalone eristus (dark, no image) --- */
.nc-eristus {
  background: var(--dark-primary);
  padding: clamp(64px, 8vw, 120px) 0;
}
.nc-eristus-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}
.nc-eristus h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-light);
  margin: 0 0 20px;
}
.nc-eristus p {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.75;
  color: rgba(243,239,232,0.65);
  margin: 0 0 16px;
}
.nc-eristus-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nc-eristus-list li {
  font-size: 15px;
  color: rgba(243,239,232,0.8);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 14px;
}
.nc-eristus-list li:first-child {
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nc-eristus-list li::before {
  content: "✓";
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .nc-includes-grid { grid-template-columns: 1fr; }
  .nc-eristus-inner { grid-template-columns: 1fr; }
}

/* --- nc- full-bleed + color modifiers --- */
.entry-content-inner:has(.nc-includes),
.entry-content-inner:has(.nc-eristus),
.entry-content-inner:has(.ms-risk--dark) {
  max-width: 100%;
}

/* Eemaldab valge riba enne footerit */
.container:has(.nc-eristus--light:last-child),
.container:has(.ms-risk--dark:last-child) {
  padding-bottom: 0;
}
.entry-content-inner:has(.nc-eristus--light:last-child),
.entry-content-inner:has(.ms-risk--dark:last-child) {
  padding-bottom: 0;
  margin-bottom: 0;
}

/* ms-risk tume variant */
.ms-risk--dark {
  background: var(--dark-primary);
}
.ms-risk--dark h2 {
  color: var(--text-light);
}
.ms-risk--dark .ms-label {
  color: var(--accent);
}
.ms-risk--dark .ms-risk-lead {
  color: rgba(243,239,232,0.85);
}
.ms-risk--dark p {
  color: rgba(243,239,232,0.6);
}

/* nc-eristus hele variant */
.nc-eristus--light {
  background: var(--bg-primary);
}
.nc-eristus--light h2 {
  color: var(--text-primary);
}
.nc-eristus--light p {
  color: var(--text-secondary);
}
.nc-eristus--light .ms-label {
  color: var(--accent);
}
.nc-eristus--light .nc-eristus-list li {
  color: var(--text-primary);
  border-color: var(--border);
}
.nc-eristus--light .nc-eristus-list li:first-child {
  border-color: var(--border);
}


/* ==============================================
   VARJATUD PAKKUMISED (vp-)
   ============================================== */
.entry-content-inner:has(.vp-columns),
.entry-content-inner:has(.vp-trust),
.entry-content-inner:has(.vp-steps),
.entry-content-inner:has(.vp-final) {
  max-width: 100%;
}
.container:has(.vp-final:last-child),
.entry-content-inner:has(.vp-final:last-child) {
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Intro */
.vp-intro {
  padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 4vw, 48px);
}
.vp-intro-text {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.75;
  color: var(--text-primary);
  max-width: 640px;
}

/* 2-column grid */
.vp-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
}
.vp-col {
  background: var(--bg-primary);
  padding: clamp(40px, 5vw, 64px);
  display: flex;
  flex-direction: column;
}
.vp-col-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 5px 12px;
  margin-bottom: 24px;
  width: fit-content;
}
.vp-col h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 1.9vw, 27px);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0 0 20px;
}
.vp-col p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.vp-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vp-list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}
.vp-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}
.vp-col-note {
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
}
.vp-col-form {
  margin-top: auto;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

/* Trust */
.vp-trust {
  background: var(--dark-primary);
  padding: clamp(56px, 7vw, 96px) clamp(32px, 10vw, 160px);
}
.vp-trust-inner { max-width: 680px; }
.vp-trust h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
  color: var(--text-light);
  margin: 14px 0 20px;
}
.vp-trust p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(243,239,232,0.65);
  margin: 0 0 12px;
}

/* Steps */
.vp-steps {
  padding: clamp(56px, 7vw, 96px) 0;
  background: var(--bg-secondary);
}
.vp-steps h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 400;
  color: var(--text-primary);
  margin: 14px 0 36px;
}
.vp-steps-list {
  list-style: none;
  counter-reset: vp-step;
  padding: 0;
  margin: 0;
  max-width: 520px;
}
.vp-steps-list li {
  counter-increment: vp-step;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.5;
}
.vp-steps-list li:first-child { border-top: 1px solid var(--border); }
.vp-steps-list li::before {
  content: "0" counter(vp-step);
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--accent);
  min-width: 28px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* Final */
.vp-final {
  background: var(--dark-primary);
  padding: clamp(64px, 8vw, 112px) 0;
  text-align: center;
}
.vp-final h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.5vw, 48px);
  font-weight: 400;
  color: var(--text-light);
  margin: 0 0 20px;
}
.vp-final p {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.75;
  color: rgba(243,239,232,0.65);
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .vp-columns { grid-template-columns: 1fr; gap: 1px; }
  .vp-col-form { margin-top: 32px; }
}

/* --- vp- full-bleed fix (container padding) --- */
.container:has(.vp-columns),
.container:has(.vp-trust),
.container:has(.vp-steps),
.container:has(.vp-final) {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* --- nre-form teema stiil --- */
.nre-form-title {
  display: none;
}
.nre-form-message {
  font-size: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.nre-field {
  margin-bottom: 16px;
}
.nre-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.nre-field label .required {
  color: var(--accent);
  margin-left: 2px;
}
.nre-form input[type="text"],
.nre-form input[type="email"],
.nre-form input[type="tel"],
.nre-form select,
.nre-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.nre-form input:focus,
.nre-form select:focus,
.nre-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.nre-form input[type="radio"] {
  accent-color: var(--accent);
  width: auto;
  margin-right: 8px;
}
.nre-field .radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nre-field .radio-group label {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
}
.nre-submit-btn {
  width: 100%;
  padding: 14px 32px;
  background: var(--dark-primary);
  color: var(--text-light);
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
  border-radius: 0;
}
.nre-submit-btn:hover {
  opacity: 0.8;
}

/* --- vp-trust split (foto + tekst) --- */
.vp-trust {
  display: grid;
  grid-template-columns: 45% 1fr;
  min-height: 60vh;
}
.vp-trust-img {
  overflow: hidden;
}
.vp-trust-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vp-trust-inner {
  background: var(--dark-primary);
  padding: clamp(56px, 7vw, 96px) clamp(48px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
}

/* --- vp-feature-img --- */
.vp-feature-img {
  position: relative;
  height: clamp(280px, 40vw, 560px);
  overflow: hidden;
}
.vp-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vp-feature-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22,22,22,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 64px);
}
.vp-feature-overlay blockquote {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 38px);
  font-weight: 400;
  color: var(--text-light);
  text-align: center;
  max-width: 720px;
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

@media (max-width: 860px) {
  .vp-trust { grid-template-columns: 1fr; }
  .vp-trust-img { min-height: 50vw; }
}

/* --- nre-submit-btn hover fix --- */
.nre-submit-btn,
.nre-submit-btn:link,
.nre-submit-btn:visited {
  background-color: var(--dark-primary) !important;
  color: var(--text-light) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.nre-submit-btn:hover,
.nre-submit-btn:focus,
.nre-submit-btn:active {
  background-color: var(--accent) !important;
  color: var(--text-light) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* --- vp-steps tume versioon koos pildiga --- */
.vp-steps {
  background: var(--dark-primary);
}
.vp-steps-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(48px, 6vw, 80px);
  align-items: center;
}
.vp-steps .ms-label {
  color: var(--accent);
}
.vp-steps h2 {
  color: var(--text-light);
}
.vp-steps-quote {
  font-size: clamp(15px, 1.2vw, 18px);
  font-style: italic;
  color: rgba(243,239,232,0.55);
  margin: 0 0 36px;
  line-height: 1.65;
}
.vp-steps-list li {
  color: rgba(243,239,232,0.85);
  border-color: rgba(255,255,255,0.08) !important;
}
.vp-steps-list li:first-child {
  border-top-color: rgba(255,255,255,0.08) !important;
}
.vp-steps-img {
  aspect-ratio: 2/3;
  overflow: hidden;
}
.vp-steps-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 860px) {
  .vp-steps-inner { grid-template-columns: 1fr; }
  .vp-steps-img { aspect-ratio: 16/9; }
}

/* --- nre-submit-btn blue override (tugevam) --- */
body .nre-submit-btn { background-color: var(--dark-primary) !important; color: #fff !important; border: none !important; }
body .nre-submit-btn:hover,
body .nre-submit-btn:focus,
body .nre-submit-btn:active { background-color: var(--accent) !important; color: #fff !important; border: none !important; box-shadow: none !important; outline: none !important; }

/* --- vp-steps täielik ümberkujundus --- */
.vp-steps { padding: 0; background: var(--dark-primary); }
.vp-steps .container { display: none; } /* vana container peita */
.vp-steps-split {
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: 70vh;
  background: var(--dark-primary);
}
.vp-steps-text {
  padding: clamp(56px, 7vw, 96px) clamp(48px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vp-steps-text .ms-label { color: var(--accent); }
.vp-steps-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 400;
  color: var(--text-light);
  margin: 14px 0 40px;
}
.vp-steps-visual {
  position: relative;
  overflow: hidden;
}
.vp-steps-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vp-steps-visual-quote {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 32px;
  background: linear-gradient(to top, rgba(22,22,22,0.85) 0%, rgba(22,22,22,0) 100%);
}
.vp-steps-visual-quote p {
  font-family: var(--font-heading);
  font-size: clamp(15px, 1.2vw, 19px);
  font-style: italic;
  color: rgba(243,239,232,0.85);
  margin: 0;
  line-height: 1.5;
}
.vp-steps-split .vp-steps-list { max-width: none; }
.vp-steps-split .vp-steps-list li {
  color: rgba(243,239,232,0.85);
  border-color: rgba(255,255,255,0.1) !important;
  font-size: clamp(15px, 1.1vw, 17px);
}
.vp-steps-split .vp-steps-list li:first-child {
  border-top-color: rgba(255,255,255,0.1) !important;
}
@media (max-width: 860px) {
  .vp-steps-split { grid-template-columns: 1fr; }
  .vp-steps-visual { min-height: 60vw; }
}

/* --- vp-steps-split proportsioon fix --- */
.vp-steps-split {
  grid-template-columns: 55% 45%;
  min-height: 52vh;
}
.vp-trust {
  min-height: 52vh;
}

/* ==============================================
   MOBIIL: vp-steps number üles + accordion
   ============================================== */
@media (max-width: 860px) {

  /* Steps: number teksti kohale */
  .vp-steps-split .vp-steps-list li {
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
  }
  .vp-steps-split .vp-steps-list li::before {
    font-size: 10px;
    min-width: auto;
    padding-top: 0;
  }
  .vp-steps-text {
    padding: clamp(36px, 6vw, 56px) clamp(20px, 5vw, 36px);
  }

  /* Accordion toggle nupp */
  .vp-col-toggle {
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    padding: 20px clamp(20px, 5vw, 36px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
  }
  .vp-columns .vp-col:first-child .vp-col-toggle {
    border-top: none;
  }
  .vp-col-toggle-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .vp-col-toggle-icon {
    width: 22px;
    height: 22px;
    position: relative;
    flex-shrink: 0;
  }
  .vp-col-toggle-icon::before,
  .vp-col-toggle-icon::after {
    content: '';
    position: absolute;
    background: var(--text-secondary);
    border-radius: 1px;
    top: 50%;
    left: 50%;
  }
  .vp-col-toggle-icon::before {
    width: 12px;
    height: 1.5px;
    transform: translate(-50%, -50%);
  }
  .vp-col-toggle-icon::after {
    width: 1.5px;
    height: 12px;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
  }
  .vp-col.is-open .vp-col-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  /* Accordion body */
  .vp-col-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
  }
  .vp-col.is-open .vp-col-body {
    max-height: 3000px;
  }
  .vp-col-body-inner {
    padding: 0 clamp(20px, 5vw, 36px) clamp(28px, 5vw, 40px);
  }
}

/* --- vp accordion mobiil fix v2 --- */
@media (max-width: 860px) {
  .vp-columns {
    gap: 0;
    background: transparent;
  }
  .vp-col {
    border-bottom: 1px solid var(--border);
  }
  .vp-col:first-child {
    border-top: 1px solid var(--border);
  }
  .vp-col-toggle {
    border-top: none;
    padding: 16px clamp(20px, 5vw, 36px);
  }
  .vp-col-subtitle {
    padding: 0 clamp(20px, 5vw, 36px) 14px;
    font-family: var(--font-heading);
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
  }
}

/* --- vp subtitle suurem mobiilis + alumine riba fix --- */
@media (max-width: 860px) {
  .vp-col-subtitle {
    font-size: clamp(18px, 4.5vw, 24px);
    line-height: 1.25;
    padding-bottom: 16px;
  }
}
.entry-content-inner:has(.vp-steps:last-child),
.container:has(.vp-steps:last-child) {
  padding-bottom: 0;
}

/* --- vp subtitle suurem + section-pad fix --- */
@media (max-width: 860px) {
  .vp-col-subtitle {
    font-size: clamp(20px, 5.5vw, 26px);
    padding-bottom: 18px;
  }
}
.section-pad:has(.vp-steps) {
  padding-bottom: 0;
}

/* --- Hero caption (alumine parem nurk) --- */
.hero-caption {
  position: absolute;
  bottom: clamp(16px, 2.5vw, 28px);
  right: clamp(16px, 3vw, 40px);
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  z-index: 3;
  pointer-events: none;
}

/* --- Footer copyright inline + bottom fix --- */
.footer-copyright-inline {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin: 16px 0 0;
  line-height: 1.5;
}
.footer-bottom--empty {
  padding: 0;
  min-height: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-bottom p { display: none; }

/* --- Footer spacing fix --- */
.footer-top {
  padding-bottom: 32px;
}
.footer-bottom {
  padding: 16px 0;
}
.footer-bottom--empty {
  padding: 0 !important;
  min-height: 0 !important;
}
/* Remove entry-content bottom padding — footer-top padding-top provides separation */
.entry-content {
  padding-bottom: 0;
}
/* Page content wrapper: only top padding — sections + CTA handle their own bottom spacing */
.page-content-wrap {
  padding-top: var(--section-pad);
}

/* =============================================
   OBJEKTILEHT — single-nre_object.php
   ============================================= */

/* ── Hero: galerii nupp ──────────────────────── */
.obj-hero-placeholder {
  width: 100%; height: 100%;
  background: var(--bg-secondary);
}
.obj-hero-actions {
  position: absolute;
  bottom: clamp(16px, 2.5vw, 28px);
  right: clamp(16px, 3vw, 36px);
  z-index: 6;
  display: flex; gap: 10px;
}
.obj-gallery-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 18px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background var(--trans-fast), border-color var(--trans-fast);
}
.obj-gallery-trigger:hover {
  background: rgba(0,0,0,0.75);
  border-color: rgba(255,255,255,0.5);
}

/* ── Galerii popup modal — vertikaalne scroll ── */
.obj-gallery-modal {
  position: fixed; inset: 0;
  z-index: 100001;
  background: rgba(0,0,0,0.95);
  display: flex;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overflow-y: auto;
}
.obj-gallery-modal.is-open {
  opacity: 1; visibility: visible;
}
.obj-gallery-modal-inner {
  width: 100%;
  display: flex; flex-direction: column;
}
.obj-gallery-modal-header {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.obj-gallery-modal-title {
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
}
.obj-gallery-modal-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: background var(--trans-fast), color var(--trans-fast);
}
.obj-gallery-modal-close:hover {
  background: rgba(255,255,255,0.1); color: #fff;
}
.obj-gallery-scroll {
  display: flex; flex-direction: column;
  gap: 4px; padding: 4px;
  max-width: 1200px; margin: 0 auto; width: 100%;
}
.obj-gallery-scroll img {
  width: 100%; height: auto;
  display: block;
}

/* ── Lehe keha ────────────────────────────────── */
.obj-page-wrap {
  background: var(--bg-primary);
  padding: 56px var(--hero-border) 96px;
}
.obj-page-wrap .container {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}
.obj-layout {
  display: grid;
  grid-template-columns: 1fr 220px 300px;
  gap: 40px 48px;
  align-items: start;
}

/* ── Vasak veerg — põhisisu ───────────────────── */
.obj-tagline {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 400; line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.obj-address {
  font-size: 14px; color: var(--text-secondary);
  letter-spacing: 0.04em; margin-bottom: 20px;
}
.obj-specs-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  font-size: 14px; font-weight: 400;
  color: var(--text-secondary); margin-bottom: 4px;
}
.obj-spec-sep { color: var(--accent); padding: 0 10px; opacity: 0.7; }
.obj-content-divider {
  height: 1px; background: var(--border);
  margin: 28px 0 36px;
}
.obj-section {
  margin-top: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.obj-section:last-child { border-bottom: none; padding-bottom: 0; }
.obj-section-title {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 500;
  margin-bottom: 18px; color: var(--text-primary);
}
.obj-description { font-size: 15px; line-height: 1.8; color: var(--text-secondary); }
.obj-description p { margin-bottom: 14px; }
.obj-description p:last-child { margin-bottom: 0; }

/* ── Andmete tabel ────────────────────────────── */
.obj-details-dl { display: flex; flex-direction: column; gap: 28px; }
.obj-details-group { display: flex; flex-direction: column; }
.obj-details-group-lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.obj-detail-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; gap: 16px;
}
.obj-detail-row:last-child { border-bottom: none; }
.obj-detail-row dt { color: var(--text-secondary); flex-shrink: 0; }
.obj-detail-row dd { font-weight: 500; text-align: right; }

/* ── Kaart ────────────────────────────────────── */
.obj-map-placeholder {
  background: var(--bg-secondary);
  min-height: 180px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; color: var(--text-secondary); text-align: center; font-size: 14px;
}
.obj-map-placeholder p { margin: 0; font-size: 13px; }
.obj-map-placeholder small { font-size: 11px; opacity: .55; }

/* ── Objekti andmed — kitsas veerg ───────────── */
.obj-details-col {
  position: sticky;
  top: calc(var(--nav-height, 80px) + 24px);
  align-self: start;
}
.obj-details-col .obj-section-title {
  margin-bottom: 18px;
}
.obj-details-col .obj-detail-row {
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}
.obj-details-col .obj-detail-row dt { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.obj-details-col .obj-detail-row dd { font-size: 13px; text-align: left; }

/* ── Sidebar — sticky ─────────────────────────── */
.obj-sidebar {
  position: sticky;
  top: calc(var(--nav-height, 80px) + 24px);
  align-self: start;
}
.obj-sidebar-inner {
  display: flex; flex-direction: column;
}

/* ── Maakler foto ─────────────────────────────── */
.obj-broker-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover; object-position: top;
  display: block;
}

/* ── Toonitud ala: nimi, kontakt, vorm ────────── */
.obj-broker-lower {
  background: var(--bg-secondary);
  padding: 20px 20px 24px;
}
.obj-broker-name {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 400;
  color: var(--text-primary);
  text-align: center; margin-bottom: 8px;
}
.obj-broker-contact {
  display: block; font-size: 13px;
  color: var(--text-secondary);
  text-align: center; margin-bottom: 4px;
  transition: color var(--trans-fast);
}
.obj-broker-contact:hover { color: var(--accent); }
.obj-broker-langs {
  font-size: 11px; letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-align: center; margin-top: 8px; margin-bottom: 4px;
}

/* ── Kontaktivorm ─────────────────────────────── */
.obj-contact-form {
  display: flex; flex-direction: column; gap: 0;
  margin-top: 20px;
}
.obj-form-row {
  border-bottom: 1px solid var(--border);
}
.obj-form-row input,
.obj-form-row textarea {
  width: 100%; padding: 12px 0;
  font-size: 14px; font-family: inherit;
  background: transparent; border: none;
  outline: none; color: var(--text-primary);
  transition: border-color var(--trans-fast);
  resize: none; border-radius: 0;
}
.obj-form-row input::placeholder,
.obj-form-row textarea::placeholder { color: var(--text-secondary); }
.obj-form-row:focus-within { border-bottom-color: var(--accent); }
.obj-form-row textarea { min-height: 80px; resize: vertical; }
.obj-form-submit {
  width: 100%; justify-content: center;
  font-size: 13px; padding: 14px;
  margin-top: 20px; border-radius: 0;
  letter-spacing: 0.1em;
}
.obj-form-feedback {
  font-size: 13px; text-align: center;
  min-height: 18px; margin-top: 8px;
  color: var(--text-secondary);
}
.obj-form-feedback.is-ok { color: #3a7a3a; }
.obj-form-feedback.is-err { color: #a83232; }

/* ── Mobiil ──────────────────────────────────── */
@media (max-width: 1100px) {
  .obj-layout { grid-template-columns: 1fr 280px; }
  .obj-details-col { grid-column: 1 / -1; position: static; }
  .obj-details-col .obj-detail-row { flex-direction: row; }
  .obj-details-col .obj-detail-row dt { font-size: 13px; text-transform: none; letter-spacing: 0; }
  .obj-details-col .obj-detail-row dd { font-size: 14px; text-align: right; }
}
@media (max-width: 760px) {
  .obj-layout { grid-template-columns: 1fr; }
  .obj-sidebar { position: static; order: -1; }
  .obj-page-wrap { padding: 36px var(--hero-border) 72px; }
}
@media (max-width: 600px) {
  .obj-tagline { font-size: clamp(22px, 7vw, 32px); }
}
