
/* INDEX ARCHIVE VIEW FOR KIVI ITEMS */
.kivi-index-archive {
  width: 100%;
  margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}

.page-content{
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.kivi-index-archive-title {
    font-size: 50px;
    font-family: 'Volkhov', serif;
    color: white;
    margin-left: 10px;
}

.kivi-item-filters {
    background:rgba(255,255,255, 0.9);
  padding: 16px;
  margin-bottom: 1em;
    margin-left: 10px;
    margin-right: 10px;
}

.kivi-filter-cell {
  display: inline-block;
  width: 20%;
  padding: 8px;
}

.kivi-filter-cell label,
.kivi-filter-cell select,
.kivi-filter-cell input {
  width: 100%;
  font-size: 17px;
  height: 36px;
  font-family: Roboto;
}

.kivi-filter-cell-50 {
  width: 70%;
}


.kivi-filter-cell-15 {
  width: 14%;
}

.kivi-index-item {
  margin-bottom: 32px;

}

.kivi-item {
  display: inline-block;
  padding: 10px;
  margin: 8px 16px;
  vertical-align: top;
  position: relative;
}

.kivi-item-img {
  width: 100%;
}
.kivi-item-img-wrapper img{
	width:100%;
	height: auto;
}

.kivi-item-body {
  font-size: 16px;
  line-height: 1.5;
  padding-top: 8px;
  box-sizing: border-box;
    font-family: Roboto;
    flex: 5 1 400px;
}

.kivi-item-body h2 {
  margin-top: 8px;
  font-size: 17px;
  margin-bottom: 1rem;
    font-family: Roboto;
    color: #3d3d3d;
}

input[type="submit"].button-kivi {
  display: block;
  padding: 0;
  width: 82px;
}


.kivi-single-item-title {
  font-size: 30px;
}


.slick-for-image{
    margin: 0 auto;
}

.slick-for-image-wrapper {
  text-align: center;

}

.slick-for-image-wrapper.slick-current {
  background: white;
}

.slick-for-image.current {
  height: auto;
  max-height: 800px;
  display: inline-block;
  text-align: center;
}

.slick-slide,
.slick-slide img {
  display: inline-block;
  text-align: center;
}


.slick-carousel-image {
  text-align: center;
}

.slick-prev,
.slick-next{
    color: #3d3d3d !important;
}

.slick-prev:hover,
.slick-next:hover{
    color: #429180
    !important;
}

.slick-arrow {
  right: 0;
  display: block;
  background: transparent !important;
  border-radius: 50%;
  height: 48px;
  width: 48px;
  z-index: 100;
}

.slick-arrow:focus,
.slick-arrow:active {
  background: rgba(0,0,0,5);
}

.slick-arrow:hover {
  background: rgba(0,0,0,1);
}

.slick-arrow::before {
  opacity: 0 !important;
}

button #text {
    display: none !important;
}

.slick-prev {
  left: 0;
}


.kivi-item-cell {
  font-size: 14px;
  padding: 8px;
  border: 0;
  vertical-align: top;
}

.kivi-item-cell.kivi-item-cell-header {
  width: 240px;
  padding: 8px;
  text-align: left;
  word-break: break-word;
    color: #429180;

}

.kivi-item-cell-value {
  word-break: break-word;
}

@media (max-width: 800px) {
  .kivi-item-cell {
    display: block;
  }

  .kivi-item-cell-value {
    padding: 0 8px 8px 8px;
  }

  .kivi-item-cell.kivi-item-cell-header {
    padding-bottom: 0;
    width: 100%;
  }
}


.kivi-item-cell-value-wrap {
  word-break: break-all;
}

.kivi-item-cell-value ul {
  list-style: none;
  margin: 0 0 0 0;
  padding-left: 0;
}

#map {
  height: 0;
  padding-top: 62.5%;
  position: relative;
}

.kivi-item-link {
  display: flex;
  flex-wrap: wrap;
    max-width: 350px;
}

.kivi-item-link:focus {
  outline: 1px dotted;
}

.kivi-item-image {
  flex: 1 300px;
}
.kivi-item-image img {
    max-height: 233px;
    min-height: 233px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.kivi-item-details {
  display: block;
    font-family: Roboto;
    font-size: 19px;

}

.kivi-item-details h1 {
    margin-bottom: 0;
    color: #3d3d3d;
    font-size: 30px;
}

.kivi-item-details p {
    margin-bottom: 0;
    color: #3d3d3d;
}

.bid-wanted .kivi-item-details__price::after {
  content: "tarjouskauppa";
  display: block;
}

.kivi-index-paginator {
  max-width: 600px;
  display: flex;
  text-align: center;
  margin: 2rem auto;
  justify-content: center;
}

.kivi-index-paginator .page-numbers,
.kivi-index-paginator .dots,
.kivi-index-paginator .current  {
  height: 100%;
  flex: 1;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 16px;
}

.kivi-index-paginator .page-numbers {
  max-width: 60px;
}

.kivi-index-paginator .prev,
.kivi-index-paginator .next {
  padding-left: 10px;
  padding-right: 10px;
  max-width: 120px;
}

a.page-numbers:hover {
  background-color: #eee;
}


/* Kivi-single-template */
.kivi-header-wrapper {
  display: block;
  margin-bottom: 8px;
}
.kivi-single-item-body-header {
    font-family: Volkhov, serif;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e6e9ee;
}

.kivi-single-item-body {
  width: 100%;
    font-family: Roboto, sans-serif;
  max-width: 960px;
  margin: 16px auto;
  padding: 0 32px;
  font-size: 16px;
}


.kivi-single-item-structure {
    margin-bottom: 0;
    font-size: 19px;
    color: #3d3d3d;
}

.kivi-single-item-header {
  width: 100%;
  max-width: 1200px;
  margin: 10px auto;
  padding: 15px;
  box-sizing: border-box;
    background-color: #eeeeee;
}

.kivi-single-item-header h1{
    color: #3d3d3d;
}

.kivi-single-item-body-header button::after {
  content: "";
  padding: 0 5px;
  display: inline-block;
}
.kivi-single-item-body-header button::before {
  content: "–";
  padding: 0 5px;
  display: inline-block;
  min-width: 28px;
  text-align: center;
}

.kivi-single-item-body-header .is-hidden::before {
  content: "+";
  padding: 0 5px;
  display: inline-block;
  min-width: 28px;
  text-align: center;
}

.kivi-single-item-body-header .kivi-toggle {
  all: inherit;
  border: none;
    color: #db647e;
    font-size: 25px;
}

.kivi-single-item-body-header .kivi-toggle:focus {
  outline-style: dotted;
  outline-width: 1px;
}

.kivi-item-table {
  border: 0;
  height: auto;
  max-height: 2000px;
  display: block;
  overflow: hidden;
  opacity: 1;
  transition: all .3s;
}
.kivi-item-table tr {
  border: none;
}

.kivi-item-table td {
    color: #3d3d3d;
    font-size: 18px;
}

.kivi-item-table th {
    color: #db647e;
    text-transform: none;
    font-weight: bold;
    font-size: 18px;
}
.kivi-item-table.is-hidden {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  display: block;
  margin: 0;
  transition: all .3s;
 }

 /* Kivi-single-template: slick slider */
 .kivi-img-container {
    max-width: 1200px;
     width: 95%;
     margin: 0 auto;
 }


 .slick-for-image.current {
  height: auto;
     width: auto;
 }


 .slick-carousel .slick-slide.slick-current.slick-active img {
  box-shadow:inset 0px 0px 0px 2px #363636;
}


.slick-next::before {
  content: url(../chevron_right.svg);
}


.slick-next{

}

.slick-prev:before {
  content: url(../chevron_left.svg);
}

.slick-prev{

}

.slick-for .slick-slide.slick-current.slick-active img {
  max-height: 85vh;
  width: auto;
}

/* Kivi-single-template: real estate agent image */
.kivi-item-table.kivi-contact {
  display: flex;
  flex-wrap: wrap;
}

.kivi-contact tbody {
  margin-right: 6rem;
}

.kivi-iv-person th {
  border: none;
}

.kivi-iv-person-container {
  height: 200px;
  width: 200px;
  overflow: hidden;
  display: inline-block;
}

.kivi-iv-person-image {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: top;
}

/*Shortcode spesific styles*/
.kivi-item-list-item {
  border: 1px solid #f2f2f2;
  padding: 30px;
  margin-top: 1em;
}
.kivi-item-list-item:first-child {
  border-top: 1px solid #f2f2f2;
}
.kivi-item-list-body {
  display: inline-block;
  vertical-align: middle;
}
.kivi-item-list-heading {
  margin: 0;
  padding: 0;
  font-size: 1em;
}
.kivi-item-list-link {
  border: 0;
}
.kivi-item-list-link:hover {
  color: #222;
}
.kivi-item-list-item-image-wrapper {
  width: 160px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 16px;
  margin-top: 8px;
  margin-bottom: 8px;
  border: 1px solid #f2f2f2;
  border-bottom: 2px solid #f2f2f2;
}
.kivi-item-list-item-image-wrapper:hover {
  border: 1px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
}
.kivi-item-list-item-image {
  width: 100%;
  border: 0;
}
.kivi-item-list-item-meta {
  font-style: italic;
  font-size: 14px;
  margin-bottom: 0;
}


/* New stuff

 */

.grid-container{
    display: grid;
    grid-template-columns: auto auto auto;
    grid-column-gap: 20px;
    grid-row-gap: 10px;

}

/*
.kivi-index-item {
    margin-left: 15px;
    margin-right: 15px;
}
*/

.keskita{
    margin-left: 15px;
    margin-right: 15px;
    max-width: 1200px;
}


.kivi-index-archive h1 {
    margin-left: 10px;
}

.toRight{
    float: right;
}

.alarivi{
    font-weight:normal;
    font-size: 15px;
}

.kivi-single-the-content{
    font-size: 18px;
    color: #3d3d3d;
}

.infoAndContact{
    display: grid;
    grid-template-columns: auto auto;
    width: 100%;
    max-width: 960px;
    margin: auto;
    padding: 15px;
    column-gap: 20px;
}



.contactInfo h1{
    font-family: 'Volkhov', serif;
    font-size: 30px;
    color: #db647e;
}

.contactInfo h3{
    font-family: Roboto, sans-serif;
    font-size: 18px;
    color: #3d3d3d;

}

.contactInfo ul{
    list-style-type: none;
}

.contactInfo li{
    height: 40px;
}

.contactBox{
    margin-top: 20px;
}

.yhteydenottolomake{
    width: 300px;

}

.yhteydenottolomake input{
    margin-top: 20px;
    margin-bottom: 20px;

}

.apartmentHeader-grid{
    display: grid;
    grid-template-columns: 400px auto;
    margin-bottom: 20px;
    margin-top: 20px;
    margin-left: 10px;
}


.apartmentHeader-grid h1{
    font-size: 30px;
    color: #3d3d3d;
}

.iconInfoContainer{
    color: #3d3d3d;
    display: grid;
    grid-template-columns: 400px 400px;
    row-gap: 20px;
}


@media screen and (max-width:1100px) {

    .grid-container {
        grid-template-columns: auto auto;
        justify-items: center;
        margin-left: 2%;
        margin-right: 2%;
    }
    .keskita{
        justify-items: center;
        max-width: 100vw;
    }

    .apartmentHeader-grid{
        grid-template-columns: auto;
    }

    .iconInfoContainer{
        margin-top: 30px;
    }

    .kivi-item-image img {
        max-height: 233px;
        min-height: 233px;
    }

}

.whatsApp{

    border: none;
    height: 40px;
    width: 250px;
    margin-bottom: 20px;
    display: block;
    margin: 20px auto;
}

.whatsApp:hover{
    background-color: #2c6055;
}

.whatsApptext{
    color: white;
    font-weight: bold;
}

.whatsApptext:hover{
    color: white;
}


@media screen and (max-width:900px) {
    .grid-container {
        grid-template-columns: auto auto;
        margin: auto;
    }
    .kivi-img-container {
        width: 100%;
    }

    .iconInfoContainer{
        grid-template-columns: 275px 275px;
        row-gap: 20px;
    }

    .infoAndContact{
        grid-template-columns: auto;
    }

    .contactInfo ul{
        margin-left: 0;
    }

    .contactInfo{
        margin-left: 0;
    }

    .contactInfo h1{
        text-align: center;
    }

    .contactInfo h3{
        text-align: center;
    }

    .kivi-iv-person-container {
        display: block;
        margin: 20px auto;
    }

}

@media screen and (max-width:800px) {
    .grid-container {
        grid-template-columns: auto auto;
        justify-items: center;
    }

    .kivi-img-container {
        width: 100%;
    }

    .kivi-item-link {
        max-width: 300px;
    }
}

@media screen and (max-width:700px) {
    .kivi-item-link {
        max-width: 250px;
    }

    .infotext{

    }
}

.kivi-img-container button{
  display: inline-flex;
}



.iconContainer{
    display: grid;
    grid-template-columns: 40px 200px;
    grid-template-rows: auto 35px;
    column-gap: 10px;
    align-items: end;
}

.item1 {
    grid-row-start: 1;
    grid-row-end: 3;
    color: #db647e;
}

.item2 {
    align-content: end;
    font-size: 15px;
}


.item3{
    align-content: end;
    font-weight: bold;
    font-size: 20px;
}

.kivi-index-archive-title{
    padding-top: 200px;
}

.myymassa-banner{
    width: 100%;
    background-image: url("https://katkanaho.fi/wp-content/uploads/2020/09/IMG_7258-2-scaled.jpg");
    background-position: left top;
    background-size: cover;
    background-repeat: no-repeat;
}

.overlay-block{
    background: rgba(61,61,61,0.5);
    padding-bottom: 15px;
}

@media screen and (max-width:600px) {
    .grid-container {
        grid-template-columns: auto;
    }
    .kivi-item-image img {
        max-height: 500px;
        min-height: 0px;
        min-width: 150px;

    }

    .kivi-index-archive h1 {
        font-size: 30px;
        margin-left: 10px;
    }

    .kivi-filter-cell {
        display: block;
        width: 100%;
        padding: 8px;
    }

    .kivi-img-container {
        width: 100%;
    }

    .iconInfoContainer{
        grid-template-columns: auto;
        grid-row-gap: 20px;
    }
    .kivi-item-link {
        max-width: 100vw;
    }

    .myymassa-banner {
        max-height: 100vh;
    }

    .kivi-index-archive-title{
        padding-top: 20px;
    }

    .overlay{
        max-height: 100vh;
    }

    .myymassa-banner{
        min-height: 723px;
    }



}

.presentations {
    display: block;
    max-width: 960px;
    margin: 16px auto;
    background: #eeeeee;
}

.presentationsWrapper {
    margin-left: 50px;
}

.presentIcon {
    max-width: 50px;
    margin-bottom: 20px;
}

.presentDate {
    font-family: Roboto, sans-serif;
    color: #3d3d3d;
    font-size: 17px;
    font-weight: bold;
    margin-left: 20px;
}



.similar{
    display: block;
    margin: 0 auto;
    max-width: 1000px;
    margin-top: 30px;
    padding-left: 10px;
    padding-right: 10px;
}

.photoDescription{
    color: #3d3d3d;
    font-size: 16px;
}

/* Modern gallery overrides */
.kivi-img-container {
  position: relative;
}

.kivi-img-container .slick-for-image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 14px;
  overflow: hidden;
  background: #f6f7f9;
}

.kivi-img-container .slick-for-image {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-height: min(76vh, 860px);
  object-fit: contain;
}

.kivi-img-container .photoDescription {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0 6px 6px;
  text-align: left;
  line-height: 1.45;
}

.kivi-img-container .slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(28, 33, 39, 0.72) !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  z-index: 30;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.kivi-img-container .slick-arrow:hover {
  background: rgba(28, 33, 39, 0.9) !important;
  transform: translateY(-50%) scale(1.04);
}

.kivi-img-container .slick-arrow:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.kivi-img-container .slick-prev {
  left: 14px;
}

.kivi-img-container .slick-next {
  right: 14px;
}

.kivi-img-container .slick-next::before,
.kivi-img-container .slick-prev::before {
  content: '';
}

.kivi-img-container .slick-arrow span {
  font-size: 34px;
  line-height: 1;
  margin-top: -3px;
}

.kivi-img-container .slick-carousel {
  margin-top: 14px;
}

.kivi-img-container .slick-carousel .slick-track {
  margin-left: 0;
}

.kivi-img-container .slick-carousel .slick-slide {
  padding: 0 6px;
}

.kivi-img-container .slick-carousel .slick-slide img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  opacity: .62;
  transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}

.kivi-img-container .slick-carousel .slick-slide:hover img {
  opacity: .95;
  transform: translateY(-1px);
}

.kivi-img-container .slick-carousel .slick-slide.slick-current img {
  opacity: 1;
  border-color: #db647e;
}

.kivi-gallery-status {
  position: absolute;
  right: 16px;
  bottom: 106px;
  background: rgba(24, 28, 34, 0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  z-index: 25;
}

@media screen and (max-width: 700px) {
  .kivi-img-container .slick-for-image {
    max-height: 54vh;
  }

  .kivi-img-container .slick-arrow {
    width: 38px;
    height: 38px;
  }

  .kivi-img-container .slick-carousel .slick-slide img {
    height: 68px;
  }

  .kivi-gallery-status {
    bottom: 86px;
    right: 12px;
  }
}


/* ==========================================================================
   Kivi UI v2
   --------------------------------------------------------------------------
   Appended layer, same pattern as the gallery overrides above: the legacy
   rules stay put for any theme CSS that still hangs off them, and everything
   below re-skins the markup the templates now emit. Rules are scoped to
   .kivi-page (or a v2 class) so nothing here leaks into the rest of the theme.

   The brand colour from Settings arrives as an inline --kivi-brand on
   .kivi-page; the value here is only the fallback.
   ========================================================================== */

/* Values below are the ones measured on katkanaho.fi, not new choices:
   #db647e (Volkhov headings, toggles), #429180 (buttons, links), #3d3d3d body
   text, #4a4a4a secondary, #eeeeee panel fill. Volkhov + Roboto are the site's
   own faces. --kivi-brand is only overridden inline when the configured brand
   colour is actually usable; see kivi_brand_color_is_usable(). */
/* On :root, not .kivi-page — the [kivi] shortcode drops cards onto arbitrary
   Elementor pages that have no .kivi-page ancestor. Scoped here, --kivi-line
   resolved to nothing there, which made `border: 1px solid var(--kivi-line)`
   an invalid declaration and silently dropped every card border. */
:root {
  --kivi-brand: #db647e;
  --kivi-accent: #429180;
  --kivi-accent-dark: #2c6055;
  --kivi-ink: #3d3d3d;
  --kivi-ink-soft: #4a4a4a;
  --kivi-muted: #6f6f6f;
  --kivi-line: #e0e0e0;
  --kivi-surface: #ffffff;
  --kivi-surface-alt: #eeeeee;
  --kivi-radius: 14px;
  --kivi-radius-sm: 10px;
  --kivi-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 22px rgba(16, 24, 40, .06);
  --kivi-shadow-lift: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 38px rgba(16, 24, 40, .12);
  --kivi-gap: 24px;
  /* Rhythm between major page regions. Everything used to sit on the same 24px
     step, which reads as one undifferentiated column: a region boundary got no
     more air than two rows inside a group. Regions use this; siblings inside a
     group deliberately stay tighter. */
  --kivi-section-gap: 56px;
  /* Height of the theme's floating navbar (a fixed Elementor section, 90px on
     katkanaho.fi). Anything sticky has to clear it. */
  --kivi-header-offset: 90px;
}

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

.kivi-page .page-content {
  padding-left: 16px;
  padding-right: 16px;
}

.kivi-page .keskita {
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  width: 100%;
}

/* --------------------------------------------------------------- filters -- */

.kivi-page .kivi-item-filters {
  background: rgba(255, 255, 255, .94);
  border-radius: var(--kivi-radius);
  box-shadow: var(--kivi-shadow);
  padding: 20px;
  margin: 0 0 28px;
}

.kivi-filters__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: end;
}

.kivi-page .kivi-filters__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: span 4;
  /* Grid children default to min-width:auto, which lets a long placeholder
     push the whole filter bar wider than its container. */
  min-width: 0;
  width: auto;
  padding: 0;
}

.kivi-filters__field--location { grid-column: span 6; }
.kivi-filters__field--pair     { grid-column: span 3; }
.kivi-page .kivi-filters__actions {
  grid-column: span 12;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

/* Deliberately not uppercased: these labels carry units, and text-transform
   turns "Pinta-ala (m²)" into "PINTA-ALA (M²)". */
.kivi-page .kivi-filters__label {
  font-family: Roboto, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--kivi-ink-soft);
  width: auto;
  height: auto;
  margin: 0;
}

.kivi-page .kivi-filters__control {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  color: var(--kivi-ink);
  background: var(--kivi-surface);
  border: 1px solid var(--kivi-line);
  border-radius: var(--kivi-radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.kivi-page select.kivi-filters__control {
  /* Chevron as a data URI so the control needs no extra HTTP request and no
     hot-linked asset from the uploads folder. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%2379838f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.kivi-page .kivi-filters__control:focus {
  outline: none;
  border-color: var(--kivi-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kivi-brand) 22%, transparent);
}

.kivi-filters__range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kivi-filters__range-sep {
  color: var(--kivi-muted);
  flex: 0 0 auto;
}

.kivi-page input[type="submit"].kivi-button,
.kivi-page .kivi-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  width: auto;
  min-width: 132px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  /* Green, not the brand token: the site's existing "Hae" button and every
     other primary action is #429180. */
  background: var(--kivi-accent);
  color: #fff;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.kivi-page .kivi-button:hover {
  filter: brightness(.94);
  transform: translateY(-1px);
  box-shadow: var(--kivi-shadow);
  color: #fff;
}

.kivi-page .kivi-button:focus-visible,
.kivi-page .kivi-filters__reset:focus-visible {
  outline: 2px solid var(--kivi-ink);
  outline-offset: 2px;
}

.kivi-page .kivi-filters__reset {
  font-family: Roboto, sans-serif;
  font-size: 15px;
  color: var(--kivi-ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- header -- */

.kivi-page .kivi-index-archive-title {
  padding-top: 140px;
  margin-bottom: 24px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.kivi-page .overlay-block {
  background: linear-gradient(180deg, rgba(30, 34, 40, .35) 0%, rgba(30, 34, 40, .68) 100%);
  padding-bottom: 32px;
}

.kivi-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: 1200px;
  margin: 8px auto 20px;
}

.kivi-page .kivi-results-head__title {
  font-family: Volkhov, serif;
  font-size: 28px;
  color: var(--kivi-ink);
  margin: 0;
}

.kivi-results-head__count {
  font-family: Roboto, sans-serif;
  font-size: 15px;
  color: var(--kivi-muted);
  margin: 0;
}

.kivi-empty {
  max-width: 640px;
  margin: 40px auto;
  padding: 32px 24px;
  text-align: center;
  background: var(--kivi-surface-alt);
  border-radius: var(--kivi-radius);
}

.kivi-page .kivi-empty__title {
  font-family: Volkhov, serif;
  font-size: 26px;
  color: var(--kivi-ink);
  margin: 0 0 10px;
}

.kivi-empty__text {
  font-family: Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--kivi-ink-soft);
  margin: 0 0 16px;
}

/* ------------------------------------------------------------ card grid -- */

/* The complaint this fixes: `auto auto auto` sizes columns to their content, so
   every card came out a different width and the photos with them. Same three
   columns as before, just even ones.
 *
 * Explicit counts, not repeat(auto-fill, …): auto-fill needs a definite
 * available inline size, and resolves to a single repetition when it does not
 * have one. .grid-container is embedded by hand in page content, sometimes
 * inside content-sized parents, so the definite size cannot be relied on —
 * auto-fill there collapses to one very wide column per card.
 *
 * This targets .grid-container itself rather than a wrapper the shortcode
 * emits, so the cards stay direct grid children and existing page markup keeps
 * working untouched. */
.grid-container,
.kivi-page .kivi-index-item-list.grid-container,
.kivi-index-item-list.grid-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
  justify-items: stretch;
  margin: 0;
}

.kivi-card {
  position: relative;
  display: flex;
  background: var(--kivi-surface);
  border: 1px solid var(--kivi-line);
  border-radius: var(--kivi-radius);
  overflow: hidden;
  box-shadow: var(--kivi-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  margin-bottom: 0;
  min-width: 0;
}

.kivi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--kivi-shadow-lift);
  border-color: transparent;
}

.kivi-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  border: 0;
  text-decoration: none;
  color: inherit;
}

.kivi-card__link:hover,
.kivi-card__link:focus {
  text-decoration: none;
  color: inherit;
}

.kivi-card__link:focus-visible {
  outline: 3px solid var(--kivi-brand);
  outline-offset: -3px;
}

.kivi-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--kivi-surface-alt);
  overflow: hidden;
}

/* Absolutely positioned, not height:100%.
 *
 * The media box takes its height from aspect-ratio, which leaves it with no
 * resolvable height for a percentage to refer to — so height:100% fell back to
 * auto and every image rendered at its own intrinsic ratio. A 4:3 photo filled
 * the box, a 3:2 one came up ~30px short, and the row looked ragged in exactly
 * the way the plain `auto` grid columns used to. Absolute positioning resolves
 * against the padding box, which aspect-ratio has already made definite.
 *
 * It also pins the lazy-loading placeholder to the same box, so nothing jumps
 * when the real photo swaps in. */
.kivi-card__media img,
.kivi-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .4s ease;
}

.kivi-card:hover .kivi-card__media img {
  transform: scale(1.04);
}

.kivi-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c3cbd5;
}

.kivi-card__image--placeholder .kivi-icon {
  width: 56px;
  height: 56px;
}

.kivi-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kivi-card__badge {
  font-family: Roboto, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(28, 33, 39, .82);
  backdrop-filter: blur(3px);
  margin: 0;
}

.kivi-card__badge--showing { background: var(--kivi-accent); }
.kivi-card__badge--bid     { background: var(--kivi-brand); }
.kivi-card__badge--rent    { background: rgba(28, 33, 39, .82); }

.kivi-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px 20px;
  font-family: Roboto, sans-serif;
  flex: 1 1 auto;
  min-width: 0;
}

.kivi-page .kivi-card__title,
.kivi-card__title {
  font-family: Roboto, sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--kivi-ink);
  margin: 0;
  overflow-wrap: anywhere;
}

.kivi-card__location {
  font-size: 15px;
  color: var(--kivi-muted);
  margin: 0 0 10px;
}

.kivi-card__price {
  font-size: 22px;
  font-weight: 700;
  color: var(--kivi-ink);
  margin: 0 0 14px;
  letter-spacing: -.01em;
}

.kivi-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  list-style: none;
  margin: auto 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--kivi-line);
}

.kivi-card__fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--kivi-ink-soft);
  margin: 0;
  min-width: 0;
}

.kivi-card__fact--wide {
  flex: 1 1 100%;
}

.kivi-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--kivi-brand);
}

/* ----------------------------------------------------------- single hero -- */

.kivi-page .kivi-hero {
  background: var(--kivi-surface-alt);
  border-radius: var(--kivi-radius);
  padding: 32px 36px;
  margin: var(--kivi-section-gap) auto;
}

.kivi-page .kivi-hero__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: center;
  margin: 0;
}

.kivi-page .kivi-hero__title {
  font-family: Volkhov, serif;
  font-size: 34px;
  line-height: 1.2;
  color: var(--kivi-ink);
  margin: 0 0 6px;
}

.kivi-hero__town {
  font-size: 24px;
  font-weight: 400;
  color: var(--kivi-ink-soft);
}

.kivi-page .kivi-hero__structure {
  font-family: Roboto, sans-serif;
  font-size: 18px;
  color: var(--kivi-ink-soft);
  margin: 0 0 18px;
}

.kivi-page .kivi-hero__price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.kivi-page .kivi-hero__price {
  font-family: Roboto, sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--kivi-ink);
  margin: 0;
}

.kivi-page .kivi-hero__price-sub {
  font-family: Roboto, sans-serif;
  font-size: 17px;
  color: var(--kivi-muted);
  margin: 0;
}

.kivi-page .kivi-hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.kivi-page .kivi-fact {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  background: var(--kivi-surface);
  border: 1px solid var(--kivi-line);
  border-radius: var(--kivi-radius-sm);
  padding: 14px 16px;
  margin: 0;
}

.kivi-fact__icon {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--kivi-brand) 12%, transparent);
  color: var(--kivi-brand);
}

.kivi-fact__icon .kivi-icon {
  width: 20px;
  height: 20px;
}

.kivi-fact__label {
  font-family: Roboto, sans-serif;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--kivi-muted);
}

.kivi-fact__value {
  font-family: Roboto, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--kivi-ink);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- info body -- */

.kivi-page .infoAndContact {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr);
  align-items: start;
  gap: 40px;
  padding: 0 16px;
  margin: var(--kivi-section-gap) auto;
}

.kivi-page .kivi-single-the-content {
  line-height: 1.7;
}

.kivi-page .kivi-contact-card {
  background: var(--kivi-surface);
  border: 1px solid var(--kivi-line);
  border-radius: var(--kivi-radius);
  box-shadow: var(--kivi-shadow);
  padding: 24px;
  text-align: center;
  position: sticky;
  /* Clears the floating navbar, which slides over the top of the viewport on
     scroll and was cutting the top off this card. */
  top: calc(var(--kivi-header-offset) + 20px);
  /* And if the card is taller than what is left of the screen, let it scroll
     inside itself rather than pinning the bottom out of reach. */
  max-height: calc(100vh - var(--kivi-header-offset) - 40px);
  overflow-y: auto;
}

.kivi-page .kivi-contact-card__title {
  font-family: Volkhov, serif;
  font-size: 22px;
  color: var(--kivi-brand);
  margin: 0 0 18px;
}

.kivi-page .kivi-contact-card .kivi-iv-person-container {
  height: 128px;
  width: 128px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: block;
  box-shadow: 0 6px 18px rgba(16, 24, 40, .14);
}

.kivi-page .kivi-contact-card__list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--kivi-ink-soft);
}

.kivi-page .kivi-contact-card__list li {
  height: auto;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.kivi-contact-card__name {
  font-size: 19px;
  font-weight: 700;
  color: var(--kivi-ink);
}

.kivi-page .kivi-contact-card__list a {
  color: var(--kivi-ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--kivi-line);
}

.kivi-page .kivi-contact-card__list a:hover {
  color: var(--kivi-brand);
  border-bottom-color: currentColor;
}

/* The WhatsApp control is an <a> now, not a <button> wrapping an <a>, so it
   needs its own colour — the old rule only set the text to white. */
.kivi-page .kivi-button--whatsapp {
  background: #25d366;
  width: 100%;
  height: 46px;
  margin: 0;
  color: #fff;
}

.kivi-page .kivi-button--whatsapp:hover {
  background: #1da851;
  color: #fff;
}

/* -------------------------------------------------------------- showings -- */

.kivi-page .kivi-showings {
  max-width: 960px;
  margin: var(--kivi-section-gap) auto;
  background: var(--kivi-surface);
  border: 1px solid var(--kivi-line);
  border-left: 4px solid var(--kivi-brand);
  border-radius: var(--kivi-radius);
  box-shadow: var(--kivi-shadow);
}

.kivi-page .kivi-showings__inner {
  margin: 0;
  padding: 22px 26px;
}

.kivi-page .kivi-showings__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Volkhov, serif;
  font-size: 20px;
  color: var(--kivi-ink);
  margin: 0 0 12px;
}

.kivi-page .kivi-showings__icon {
  display: inline-flex;
  max-width: none;
  margin: 0;
  color: var(--kivi-brand);
}

.kivi-showings__icon .kivi-icon {
  width: 22px;
  height: 22px;
}

.kivi-page .kivi-showings__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kivi-page .kivi-showings__item,
.kivi-page .kivi-showings__empty {
  margin: 0;
  margin-left: 0;
  font-size: 17px;
  color: var(--kivi-ink);
}

.kivi-page .kivi-showings__empty {
  font-weight: 400;
  color: var(--kivi-muted);
}

/* ------------------------------------------------------- fact accordions -- */

.kivi-page .kivi-single-item-body {
  padding: 0 16px;
}

/* The fact accordions are a group: 16px between them is right, but the group
   as a whole is a region and needs the full step before it. Same for the map
   and the video, which each start something new. */
.kivi-page .kivi-single-basic-info,
.kivi-page .kivi-single-gmap,
.kivi-page .kivi-video {
  margin-top: var(--kivi-section-gap);
}

.kivi-page .kivi-single-item-body-header {
  border-bottom: 0;
  border-radius: var(--kivi-radius-sm);
  padding: 4px 6px;
}

.kivi-page .kivi-single-item-body-header .kivi-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 6px;
  font-family: Volkhov, serif;
  font-size: 21px;
  /* Pink Volkhov, as the section toggles already render on the site. */
  color: var(--kivi-brand);
  cursor: pointer;
}

/* A brand-coloured bar needs light text on it. This only fires when a usable
   brand colour was configured — kivi_brand_style_attr() emits nothing for the
   white one this site has, so the toggle stays pink on the page background
   instead of turning white on white. */
.kivi-page .kivi-single-item-body-header[style] .kivi-toggle {
  color: #fff;
}

.kivi-page .kivi-single-item-body-header .kivi-toggle::before {
  content: "–";
  font-family: Roboto, sans-serif;
  font-size: 22px;
  line-height: 1;
  min-width: 24px;
  text-align: center;
  opacity: .8;
}

.kivi-page .kivi-single-item-body-header .kivi-toggle.is-hidden::before {
  content: "+";
}

.kivi-page .kivi-item-table td,
.kivi-page .kivi-item-table th {
  font-size: 16px;
  padding: 10px 8px;
}

/* The label column was #429180 on white — 3.9:1, under the 4.5:1 minimum for
   body text. Keeps the brand green, one step darker (the shade already used by
   .whatsApp:hover), which clears 7:1. */
.kivi-page .kivi-item-table th,
.kivi-page .kivi-item-cell.kivi-item-cell-header {
  color: var(--kivi-accent-dark);
  font-weight: 600;
}

.kivi-page .kivi-item-table tr:nth-child(odd) td,
.kivi-page .kivi-item-table tr:nth-child(odd) th {
  background: var(--kivi-surface-alt);
}

/* ---------------------------------------------------------- asuntovahti -- */

.kivi-asuntovahti {
  max-width: 1200px;
  margin: var(--kivi-section-gap) auto;
  padding: 0 16px;
}

.kivi-asuntovahti--single {
  max-width: 960px;
}

/* Fallback layout for the Call to Action widget Kaapo is built from.
 *
 * Kaapo's picture is a background-image, and the box it paints into is sized by
 * widget-call-to-action.min.css. When that stylesheet does not reach the page —
 * Elementor only enqueues it while rendering the widget, and that render is
 * easy to do outside the window where enqueues still get printed — the wrapper
 * collapses to zero height and the picture vanishes while the text half stays.
 * The PHP side now renders during wp_enqueue_scripts so the stylesheet should
 * always arrive; these rules mean the block degrades to the right shape rather
 * than to an invisible image if it ever does not.
 *
 * Deliberately only geometry, and only inside .kivi-asuntovahti: when the real
 * widget CSS is present it carries its own sizing at higher specificity via the
 * per-template rules, and these stay out of its way. */
.kivi-asuntovahti .elementor-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.kivi-asuntovahti .elementor-cta__bg-wrapper {
  position: relative;
  flex: 1 1 300px;
  min-height: 260px;
}

.kivi-asuntovahti .elementor-cta__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.kivi-asuntovahti .elementor-cta__content {
  flex: 1 1 300px;
}

/* ------------------------------------------------------- similar / video -- */

.kivi-page .similar {
  margin: var(--kivi-section-gap) auto 0;
  padding: 0 16px var(--kivi-section-gap);
}

.kivi-page .similar__title {
  font-family: Volkhov, serif;
  font-size: 26px;
  color: var(--kivi-ink);
  margin: 0 0 20px;
}

.kivi-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--kivi-radius);
  display: block;
}

.kivi-page #map {
  border-radius: var(--kivi-radius);
  overflow: hidden;
}

/* ------------------------------------------------------------ responsive -- */

@media screen and (max-width: 1000px) {
  .kivi-page .kivi-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .kivi-page .infoAndContact {
    grid-template-columns: minmax(0, 1fr);
  }

  .kivi-page .kivi-contact-card {
    position: static;
  }
}

@media screen and (max-width: 980px) {
  /* Restates the legacy 1100/900/800 breakpoints: those rules sit earlier in
     this file at the same specificity, so the three-column rule above would
     otherwise beat them at every width. */
  .grid-container,
  .kivi-page .kivi-index-item-list.grid-container,
  .kivi-index-item-list.grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 780px) {
  /* Narrow screens are already a single column, so the regions read as separate
     without as much air; 56px there is just scrolling. */
  :root {
    --kivi-section-gap: 36px;
  }

  .kivi-filters__field,
  .kivi-page .kivi-filters__field--location,
  .kivi-page .kivi-filters__field--pair {
    grid-column: span 6;
  }

  .kivi-page .kivi-filters__actions {
    grid-column: span 12;
  }

  .kivi-page .kivi-index-archive-title {
    padding-top: 72px;
    font-size: 34px;
  }

  .kivi-page .kivi-hero {
    padding: 22px 18px;
  }

  .kivi-page .kivi-hero__title { font-size: 27px; }
  .kivi-hero__town { font-size: 20px; }
  .kivi-page .kivi-hero__price { font-size: 28px; }
}

@media screen and (max-width: 560px) {
  .grid-container,
  .kivi-page .kivi-index-item-list.grid-container,
  .kivi-index-item-list.grid-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .kivi-filters__field,
  .kivi-page .kivi-filters__field--location,
  .kivi-page .kivi-filters__field--pair {
    grid-column: span 12;
  }

  .kivi-page .kivi-filters__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .kivi-page .kivi-button {
    width: 100%;
  }

  .kivi-page .kivi-hero__facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .kivi-page .kivi-single-item-body-header .kivi-toggle {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kivi-page *,
  .kivi-card,
  .kivi-card__media img {
    transition: none !important;
    animation: none !important;
  }

  .kivi-card:hover {
    transform: none;
  }

  .kivi-card:hover .kivi-card__media img {
    transform: none;
  }
}
