/**
 * @version     CVS: 2.0.1
 * @package     com_mieszkania
 * @copyright   Copyright (C) 2015. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      Bartosz Machnik <kontakt@sitte.pl>
 */

/* Lista kart */
.mm-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

/* Karta */
.mm-card {
    flex: 0 1 calc(33.33333% - 10px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border: 1px solid #fafafa;
    margin-top: 45px;
    position: relative;
}
@media (max-width: 991px) { .mm-card { flex: 0 1 calc(50% - 10px); }}
@media (max-width: 767px) { .mm-card { flex: 0 1 100%; }}

.mm-card:before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: -40px;
    border-top: 3px solid var(--sppb-text-varient-1);
    border-left: 3px solid var(--sppb-text-varient-1);
    border-color: var(--sppb-color-secondary);
    transition: 0.333s;
}

.mm-card:hover:before {
    top: -50px;
}

.mm-card:after {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    transition: 0.333s;
    opacity: 0;
    pointer-events: none;
}

.mm-card:hover:after {
    opacity: 0.075;
}

/* Góra */
.mm-info-top {
    padding: 3px 6px 15px 6px;
}

.mm-title {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.mm-title a {
    text-decoration: none;
    color: var(--sppb-text-secondary);
}

.mm-subtitle {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.75;
}

.mm-attributes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #555;
}

.mm-attributes span {
    color: #000;
    font-weight: 500;
}

/* Media (dół / zdjęcie) */
.mm-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}

.mm-media:after {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0.05;
}

/* Jeżeli gdzieś jednak użyjesz <img> wewnątrz mm-media */
.mm-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.mm-card:hover .mm-media img {
    transform: scale(1.05);
}

/* Placeholder */
.mm-placeholder-pdf {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    font-weight: bold;
}

/* Status */
.mm-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    color: #fff;
    font-size: 0.75rem;
    z-index: 2;
}

/* Overlay */
.mm-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 20px 20px;
    display: flex;
    align-items: flex-end;
    z-index: 3;
}

.mm-content {
    width: 100%;
	min-height: 46px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
	backdrop-filter: blur(5px) saturate(200%);
	background: #0004;
	padding: 0px 3px 0 4px;
	border-radius: 0 23px 23px 0;
}

.mm-price-tag {
    font-size: 1.1rem;
    font-weight: 600;
    /* color: #000; */
	color: #fffd;
}
.mm-price-tag.mm-ask-price { padding-left: 8px; }

.mm-price-tag-per-m {
    font-size: 13px;
    /* color: #777; */
	color: #fff9;
}

/* Przycisk / animacja */
body .mm-list .sppb-btn.sppb-btn-link.btn-glass i,
body .btn.sppb-btn-link.btn-glass i {
    background: #00000009;
}

body .mm-list .sppb-btn.sppb-btn-link.btn-glass i:before,
body .mm-list .btn.sppb-btn-link.btn-glass i:before {
    background: #fff;
}

/* unhover original mechanism */
.mm-list .mm-media .move-left-right-btn i.fas:hover:before {
    animation: none;
}

.mm-list .mm-card:hover .move-left-right-btn i.fas:before {
    animation: moveLeftRight .7s ease-in-out 1;
}

.s-historia-cen { position: relative; cursor: pointer; margin-left: 6px; }
.s-historia-cen > div { min-width: 200px; display: none; position: absolute; left: -90px; font-family: "Open Sans", arial, sans-serif; background: #fff; font-size: 11px; padding: 6px; border: 1px solid #ccc; color: #666; z-index: 10; }
.s-historia-cen > div li { padding-bottom: 8px; color: #666; font-weight: 400; }
.s-historia-cen > div li:last-child { padding-bottom: 0; }
.s-historia-cen > div h6 { margin-bottom: 8px; }
.s-historia-cen > div label { color: #777; margin: 0; font-size: 12px; line-height: 12px; font-weight: 600; }
.s-historia-cen > div span { color: #aaa; font-size: 11px; }
.s-historia-cen:hover > div { display: block; }
.s-historia-cen .historia-cen { list-style: nonel; padding: 0; margin: 0; text-align: left; }






























/*  ======================================
	widok: INWESTYCJE
	====================================== */

.mm-inwestycje {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

/* Karta = element flex */
.mm-inwestycje .mm-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
}

/* Desktop/tablet: układ w parach (wide/narrow naprzemiennie) */
@media (min-width: 992px) {
  /* Para 1: [wide][narrow] */
  .mm-inwestycje .mm-card:nth-child(4n + 1) { flex-basis: calc(66.666% - 14px); }
  .mm-inwestycje .mm-card:nth-child(4n + 2) { flex-basis: calc(33.333% - 14px); }

  /* Para 2: [narrow][wide] */
  .mm-inwestycje .mm-card:nth-child(4n + 3) { flex-basis: calc(33.333% - 14px); }
  .mm-inwestycje .mm-card:nth-child(4n + 4) { flex-basis: calc(66.666% - 14px); }
  
  /* wide (1 i 4 w cyklu) -> bardziej panoramiczne, więc niższe */
  .mm-inwestycje .mm-card:nth-child(4n + 1) .mm-media,
  .mm-inwestycje .mm-card:nth-child(4n + 4) .mm-media {
    aspect-ratio: 21 / 9;
  }

  /* narrow (2 i 3 w cyklu) -> bardziej „kwadratowe”, więc wyższe */
  .mm-inwestycje .mm-card:nth-child(4n + 2) .mm-media,
  .mm-inwestycje .mm-card:nth-child(4n + 3) .mm-media {
    aspect-ratio: 8 / 7;
  }
}

/* Mobile: jeden pod drugim */
@media (max-width: 991px) {
  .mm-inwestycje .mm-card {
    flex-basis: 100%;
  }
}

/* top info */
.mm-inwestycje .mm-info-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mm-inwestycje .mm-title {
  margin: 0;
}

.mm-inwestycje .mm-title a {
  text-decoration: none;
  display: inline-block;
}

.mm-inwestycje .mm-subtitle {
  display: block;
}

/* meta list */
.mm-inwestycje .mm-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

/* media */
.mm-inwestycje .mm-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9; /* TU JEST KLUCZ */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  text-decoration: none;
  overflow: hidden;
}

/* „napis z hover” – zawsze widoczny */
.mm-inwestycje .mm-media-caption {
  position: absolute;
  left: 16px;
  top: 16px;
  right: 16px;
  z-index: 2;
}

/* bottom bar */
.mm-inwestycje .mm-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px;
}

.mm-inwestycje .mm-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.mm-inwestycje .mm-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mm-inwestycje .mm-tag {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}

.mm-inwestycje .mm-prospekt {
  text-decoration: underline;
}

.mm-inwestycje .mm-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}