/* =========================================================
   M-DOM – Custom CSS (clean)
   ========================================================= */

/* ---------- Stałe kolory (łatwiej utrzymać) ---------- */
:root{
  --mdom-green: #76BE3A;
  --mdom-navy:  #20283A;
  --mdom-red:   #E63946;
  --mdom-res:   #F4A261; /* reserved */
}

/* =========================================================
   MENU
   ========================================================= */

/* Belka menu transparent + blur */
#header.transparent-header #header-wrap {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

/* Białe linki w menu */
#header.transparent-header{
  --cnvs-primary-menu-color: #fff;
  --cnvs-primary-menu-hover-color: #fff;
  --cnvs-primary-menu-active-color: #fff;
}

#header.transparent-header .primary-menu .menu-container > .menu-item > .menu-link{
  color:#fff;
}

/* Underline (hover + active) */
#header .primary-menu .menu-container > .menu-item > .menu-link > div{
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

#header .primary-menu .menu-container > .menu-item > .menu-link > div::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background:#fff;
  opacity:0;
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .25s ease, opacity .25s ease;
}

#header .primary-menu .menu-container > .menu-item:hover > .menu-link > div::after,
#header .primary-menu .menu-container > .menu-item.current > .menu-link > div::after{
  opacity:1;
  transform:scaleX(1);
}

/* Chevron dla submenu (.has-submenu w HTML) */
#header .primary-menu .menu-container > .menu-item.has-submenu > .menu-link > div{
  padding-right:18px;
}

#header .primary-menu .menu-container > .menu-item.has-submenu > .menu-link > div::before{
  content:"▾";
  position:absolute;
  right:0;
  top:50%;
  transform: translateY(-55%);
  font-size:.85em;
  line-height:1;
  opacity:.95;
  transition: transform .2s ease;
}

#header .primary-menu .menu-container > .menu-item.has-submenu:hover > .menu-link > div::before{
  transform: translateY(-55%) rotate(180deg);
}

/* underline nie wchodzi pod chevron */
#header .primary-menu .menu-container > .menu-item.has-submenu > .menu-link > div::after{
  right:18px;
}

/* Submenu kolory + linie */
#header{
  --cnvs-primary-menu-submenu-bg: var(--mdom-green);
  --cnvs-primary-menu-submenu-color: var(--mdom-navy);
  --cnvs-primary-menu-submenu-hover-color: var(--mdom-navy);
  --cnvs-primary-menu-submenu-hover-bg: rgba(255,255,255,0.18);
}

#header .sub-menu-container .menu-item > .menu-link{ color: var(--mdom-navy); }
#header .sub-menu-container > .menu-item{ border-bottom: 1px solid #fff; }
#header .sub-menu-container > .menu-item:last-child{ border-bottom:none; }

/* Submenu animacja */
#header .primary-menu .menu-container > .menu-item:hover > .sub-menu-container{
  display:block;
  animation: submenuFade .2s ease forwards;
}

@keyframes submenuFade{
  from{ opacity:0; transform:translateY(-6px); }
  to{ opacity:1; transform:translateY(0); }
}

/* Szersze submenu "Nasze realizacje" (klasa .menu-realizacje w HTML) */
#header .menu-realizacje > .sub-menu-container{
  min-width:300px;
  width:max-content;
}
#header .menu-realizacje > .sub-menu-container .menu-link > div{
  white-space:nowrap;
}

/* Sticky/not-dark: wymuś te same kolory */
#header.sticky-header,
#header.not-dark,
#header.sticky-header.not-dark{
  --cnvs-primary-menu-submenu-bg: var(--mdom-green);
  --cnvs-primary-menu-submenu-color: var(--mdom-navy);
  --cnvs-primary-menu-submenu-hover-color: var(--mdom-navy);
  --cnvs-primary-menu-submenu-hover-bg: rgba(255,255,255,0.18);
}

#header.sticky-header .sub-menu-container,
#header.not-dark .sub-menu-container{
  background-color: var(--mdom-green) !important;
}

#header.sticky-header .sub-menu-container .menu-link,
#header.not-dark .sub-menu-container .menu-link{
  color: var(--mdom-navy) !important;
}

#header.sticky-header .sub-menu-container > .menu-item,
#header.not-dark .sub-menu-container > .menu-item{
  border-bottom: 1px solid #fff !important;
}
#header.sticky-header .sub-menu-container > .menu-item:last-child,
#header.not-dark .sub-menu-container > .menu-item:last-child{
  border-bottom:none !important;
}

/* =========================================================
   SLIDER – podpisy na dole + gradient pod tekst
   ========================================================= */

#slider .slider-caption{
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end !important;
  padding-bottom:60px;
  position: relative;
  z-index: 2;
}

@media (max-width:768px){
  #slider .slider-caption{ padding-bottom:50px; }
}

#slider .swiper-slide{
  position: relative;
}

#slider .swiper-slide::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:180px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  z-index:1;
  pointer-events:none; /* ważne: overlay nie blokuje klików */
}

/* =========================================================
   BUTTON – zielona obwódka + zielone wypełnienie na hover
   ========================================================= */

.button.button-border.button-amber{
  border:2px solid var(--mdom-green) !important;
  color:var(--mdom-green) !important;
  background:transparent !important;
}

.button.button-border.button-amber:hover{
  background:var(--mdom-green) !important;
  border-color:var(--mdom-green) !important;
  color:#fff !important;
}

/* =========================================================
   OWL – dots: kolor + rozmiar + pozycja pod karuzelą
   ========================================================= */

#related-portfolio.owl-carousel{
  --cnvs-owl-dots-background: var(--mdom-green);
  --cnvs-owl-dots-opacity: 0.4;
}

#related-portfolio .owl-dots{
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 50px; /* jak chcesz mniej: 20–30px */
}

#related-portfolio .owl-dots .owl-dot{
  width:14px;
  height:14px;
  margin:0 6px;
  border-radius:50%;
  background-color: rgba(118,190,58,0.4) !important;
  transition: transform .25s ease, background-color .25s ease;
}

#related-portfolio .owl-dots .owl-dot.active,
#related-portfolio .owl-dots .owl-dot:hover{
  background-color: var(--mdom-green) !important;
  opacity: 1 !important;
}

#related-portfolio .owl-dots .owl-dot.active{
  transform: scale(1.2);
}

/* Sekcja z karuzelą – białe tło (wrapper .section) */
#content .section.mt-0.footer-stick{
  background:#fff !important;
}

/* =========================================================
   HERO HEADING
   ========================================================= */

.hero-heading h1{
  font-size:3.4rem;
  line-height:1.15;
}
@media (max-width:768px){
  .hero-heading h1{ font-size:2.4rem; }
}

/* =========================================================
   COUNTER – scope tylko do tej zielonej sekcji (mdom-counter-wrap)
   ========================================================= */

.mdom-counter-wrap{
  padding-top:40px;
  padding-bottom:20px;
}

.mdom-counter-wrap .col-padding{
  padding-top:30px;
  padding-bottom:30px;
}

.counter span[data-to]{
  font-size:5rem;
  font-weight:800; /* 1000 bywa ignorowane – 800 działa wszędzie */
  line-height:1;
}

@media (max-width:768px){
  .counter span[data-to]{ font-size:2.2rem; }
}

/* =========================================================
   INTERAKTYWNA MAPA (SVG overlay)
   ========================================================= */

.site-map-wrap{ position:relative; max-width:100%; }
.site-map-img{ width:100%; height:auto; display:block; }
.site-map-overlay{ position:absolute; inset:0; width:100%; height:100%; }

.site-map-overlay .unit{
  fill: rgba(0,0,0,0);
  stroke: rgba(255,255,255,0.55);
  stroke-width:2;
  cursor:pointer;
  transition: fill .12s ease, stroke .12s ease, filter .12s ease;
}

.site-map-overlay .unit.is-active[data-status="free"]{
  fill: rgba(118,190,58,0.45);
  stroke: rgba(118,190,58,0.95);
  filter: drop-shadow(0 0 6px rgba(118,190,58,0.55));
}

.site-map-overlay .unit.is-active[data-status="sold"]{
  fill: rgba(230,57,70,0.45);
  stroke: rgba(230,57,70,0.95);
  filter: drop-shadow(0 0 6px rgba(230,57,70,0.55));
}

/* =========================================================
   TABELA OFERT (wygląd)
   ========================================================= */

.mdom-table-wrap{
  background: var(--mdom-navy);
  padding: 42px 0;
}

.mdom-table{
  width:100%;
  border-collapse:separate;
  border-spacing: 0 10px;
  margin:0;
}

.mdom-table thead th{
  background:transparent;
  color:#fff;
  border:0 !important;
  padding:14px 14px;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-weight:600;
  vertical-align:bottom;
  white-space:nowrap;
}

.mdom-table tbody tr{
  background:#E9E9E9;
  box-shadow: 0 0 0 2px var(--mdom-navy);
}

.mdom-table tbody td{
  border:0 !important;
  padding:14px 14px;
  color:var(--mdom-navy);
  vertical-align:middle;
  white-space:nowrap;
}

/* wyrównania */
.mdom-table tbody td:nth-child(1),
.mdom-table tbody td:nth-child(2),
.mdom-table tbody td:nth-child(3),
.mdom-table tbody td:nth-child(5),
.mdom-table tbody td:nth-child(6),
.mdom-table tbody td:nth-child(7){
  text-align:center;
}
.mdom-table tbody td:nth-child(4),
.mdom-table tbody td:nth-child(8),
.mdom-table tbody td:nth-child(9){
  text-align:center;
}

.mdom-table .price{ font-weight:800; }

.mdom-table .pdf .pdf-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:28px;
  border:2px solid var(--mdom-navy);
  border-radius:4px;
  color:var(--mdom-navy);
  font-weight:800;
  font-size:11px;
  text-decoration:none;
  background:transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.mdom-table .pdf .pdf-btn:hover{
  background: var(--mdom-green);
  border-color: var(--mdom-green);
  color:#fff;
}

/* Active row – pełne kolory wg statusu */
.units-table .unit-row.is-active[data-status="free"]{
  background: var(--mdom-green) !important;
  outline: none !important;
}
.units-table .unit-row.is-active[data-status="sold"]{
  background: var(--mdom-red) !important;
  outline: none !important;
}
.units-table .unit-row.is-active[data-status="reserved"]{
  background: var(--mdom-res) !important;
  outline: none !important;
}

.units-table .unit-row.is-active td{
  color:#fff !important;
}

@media (max-width:768px){
  .mdom-table-wrap{ padding:26px 0; }
  .mdom-table thead th,
  .mdom-table tbody td{ padding:12px 10px; }
}

/* Smooth scroll dla kotwic (menu -> sekcje) */
@media (prefers-reduced-motion: no-preference) {
  html, :root { scroll-behavior: smooth !important; }
}

/* MAPA: kolory polygonów wg statusu (po najechaniu/aktywny) */
.site-map-overlay .unit.is-active[data-status="free"]{
  fill: rgba(118,190,58,0.45);
  stroke: rgba(118,190,58,0.95);
  filter: drop-shadow(0 0 6px rgba(118,190,58,0.55));
}

.site-map-overlay .unit.is-active[data-status="reserved"]{
  fill: rgba(244,162,97,0.45);
  stroke: rgba(244,162,97,0.95);
  filter: drop-shadow(0 0 6px rgba(244,162,97,0.55));
}

.site-map-overlay .unit.is-active[data-status="sold"]{
  fill: rgba(230,57,70,0.45);
  stroke: rgba(230,57,70,0.95);
  filter: drop-shadow(0 0 6px rgba(230,57,70,0.55));
}

/* =========================================================
   MAP TOOLTIP
   ========================================================= */

.map-tooltip{
  position: absolute;
  z-index: 50;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  color: #fff;
  background: #000;
  transform: translate(-50%, -120%);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* Kolory statusów */
.map-tooltip[data-status="free"]{
  background: #76BE3A;
}
.map-tooltip[data-status="reserved"]{
  background: #F4A261;
}
.map-tooltip[data-status="sold"]{
  background: #E63946;
}

/* strzałka */
.map-tooltip::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  transform:translateX(-50%);
  border-width:6px 6px 0 6px;
  border-style:solid;
  border-color:currentColor transparent transparent transparent;
}

/* =========================================================
   Sekcja: metraż + pobierz PDF
   ========================================================= */

.mdom-specs{
  background: #20283A;
  padding: 52px 0;
}

/* LEWA kolumna */
.mdom-area{
  color: #76BE3A;
}

.mdom-area-title{
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px 0;
  text-decoration: underline;
}

.mdom-area-value{
  font-size: 72px;
  font-weight: 900;
  text-decoration: underline;
}

.mdom-area-unit{
  font-weight: 900;
  font-size: 0.95em;
}

/* PDF kafle */
.mdom-pdf{
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}

.mdom-pdf-icon{
  width: 120px;
  height: 120px;
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mdom-pdf-icon img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mdom-pdf-text{
  color: #fff;
}

.mdom-pdf-kicker{
  font-size: 18px;
  opacity: .75;
  margin-bottom: 6px;
}

.mdom-pdf-title{
  font-size: 44px;
  line-height: 1.02;
  font-weight: 900;
}

/* Hover: subtelny efekt */
.mdom-pdf:hover .mdom-pdf-title{
  color: #76BE3A;
}

/* Responsive */
@media (max-width: 992px){
  .mdom-area-title{ font-size: 36px; }
  .mdom-area-value{ font-size: 60px; }
  .mdom-pdf-title{ font-size: 36px; }
  .mdom-pdf-icon{ width: 100px; height: 100px; flex-basis: 100px; }
}

@media (max-width: 576px){
  .mdom-specs{ padding: 38px 0; }
  .mdom-area-title{ font-size: 30px; }
  .mdom-area-value{ font-size: 52px; }
  .mdom-pdf-title{ font-size: 30px; }
}

/* Galeria */
.mdom-gallery-section {
  background: #fff;
}

.mdom-gallery-img{
  width: 100%;
  aspect-ratio: 16 / 7;   /* proporcje */
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* lekki hover, żeby było “życie” */
.mdom-gallery-item{
  display:block;
}
.mdom-gallery-item:hover .mdom-gallery-img{
  filter: brightness(0.95);
}

/* =========================================================
   M-DOM – FIX: sekcja metraż + PDF (mobile)
   Doklej na sam koniec css/custom.css
   ========================================================= */

.content-wrap.mdom-specs{
  background: #20283A !important;  /* tło ma być i już */
  padding: 52px 0 !important;
}

/* Linki PDF: zawsze flex w poziomie (ikona po lewej) */
.content-wrap.mdom-specs a.mdom-pdf{
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 18px !important;
  text-decoration: none;
}

/* Ikona: stały rozmiar, żadnych “100% szerokości ekranu” */
.content-wrap.mdom-specs .mdom-pdf-icon{
  width: 120px !important;
  height: 120px !important;
  flex: 0 0 120px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.content-wrap.mdom-specs .mdom-pdf-icon img{
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

/* Teksty – żeby nie dziczały od globalnych H / p / a */
.content-wrap.mdom-specs .mdom-pdf-text{ color:#fff !important; }
.content-wrap.mdom-specs .mdom-pdf-kicker{ font-size:18px !important; opacity:.75; margin-bottom:6px; }
.content-wrap.mdom-specs .mdom-pdf-title{ font-size:44px !important; line-height:1.02 !important; font-weight:900 !important; }

/* Metraż – też zabezpieczony */
.content-wrap.mdom-specs .mdom-area-title{
  font-size: 30px !important;
  font-weight: 800 !important;
  margin: 0 0 10px 0 !important;
  text-decoration: underline !important;
}

.content-wrap.mdom-specs .mdom-area-value{
  font-size: 72px !important;
  font-weight: 900 !important;
  text-decoration: underline !important;
}

/* ---------- Mobile: sensowne skale ---------- */
@media (max-width: 576px){
  .content-wrap.mdom-specs{
    padding: 34px 0 !important;
  }

  .content-wrap.mdom-specs .mdom-pdf-icon{
    width: 64px !important;
    height: 64px !important;
    flex: 0 0 64px !important;
  }

  .content-wrap.mdom-specs .mdom-pdf-kicker{
    font-size: 14px !important;
    margin-bottom: 2px !important;
  }

  .content-wrap.mdom-specs .mdom-pdf-title{
    font-size: 22px !important;
    line-height: 1.05 !important;
  }

  .content-wrap.mdom-specs .mdom-area-title{
    font-size: 22px !important;
  }

  .content-wrap.mdom-specs .mdom-area-value{
    font-size: 44px !important;
  }
}

/* =========================================================
   Magnific Popup – ograniczenie rozmiaru (75% ekranu)
   ========================================================= */
   
.mfp-img {
  max-width: 75vw !important;
  max-height: 75vh !important;
}

@media (max-width: 768px){
  .mfp-img {
    max-width: 90vw !important;
    max-height: 90vh !important;
  }
}

/* =========================================================
   Nawigacja: poprzedni / następny projekt
   ========================================================= */

.mdom-project-nav{
  display: flex;
  justify-content: space-between;
  max-width: 640px;
  margin: 0 auto;
  font-size: 16px;
}

.mdom-project-nav a{
  color: #76BE3A;
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s ease;
}

.mdom-project-nav a:hover{
  opacity: .75;
}

/* Mobile: jeden pod drugim, centralnie */
@media (max-width: 576px){
  .mdom-project-nav{
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
}

.unit-link {
  cursor: pointer;
}

.unit-link:hover .unit {
  opacity: 0.85;
}

/* M-DOM: przycisk "Poznaj nas lepiej" - stała ramka */
a.button.button-border.button-blue {
  border: 2px solid #20283A !important;
  color: #20283A !important;
  background: transparent !important;
}

/* hover (opcjonalnie, żeby było elegancko) */
a.button.button-border.button-blue:hover {
  background: #20283A !important;
  border-color: #20283A !important;
  color: #fff !important;
}

