/* Czcionka Ubuntu hostowana przez Bunny Fonts (serwery UE, zgodność z RODO) */
@import url('https://fonts.bunny.net/css?family=ubuntu:300,300i,400,700&display=swap');

/* ═══════════════════════════
   CSS VARIABLES
═══════════════════════════ */
:root {
  --navy:   #154f67;
  --navy2:  #003164;
  --olive:  #6c705a;
  --gold:   #fdc502;
  --light:  #f0f4f5;
  --text:   #3a5866;
  --gray:   #aaaaaa;
  --footer-bg: #1a252f;
  --footer-accent: #fdc502;
}

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

body {
  font-family: 'Ubuntu', sans-serif;
  color: #444;
  line-height: 1.6;
  padding-top: 92px; /* header height */
}

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

/* ═══════════════════════════
   STICKY HEADER
═══════════════════════════ */
.kd-sticky-wrap {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 9999;
}
.kd-topbar {
  background-color: var(--navy);
  padding: 6px 30px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.kd-topbar span { color: #cce4ee; font-size: 13px; }
.kd-topbar a { color: #cce4ee; text-decoration: none; }
.kd-topbar a:hover { color: #fff; }

.kd-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: stretch;
}
.kd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  text-decoration: none;
  flex: 1;
}
.kd-logo-text {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 1px;
}
.kd-nav { display: flex; align-items: stretch; }
.kd-nav a {
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: #444;
  text-transform: uppercase;
  border-left: 1px solid #eee;
  transition: background 0.2s, color 0.2s;
}
.kd-nav a.kd-active,
.kd-nav a:hover { background: var(--navy); color: #fff; }

/* ═══════════════════════════
   HAMBURGER (MOBILE)
═══════════════════════════ */
.kd-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  cursor: pointer;
  border: none;
  border-left: 1px solid #eee;
  background: none;
  flex-shrink: 0;
}
.kd-hamburger span,
.kd-hamburger span::before,
.kd-hamburger span::after {
  display: block; width: 22px; height: 2px;
  background: var(--navy); position: relative;
}
.kd-hamburger span::before,
.kd-hamburger span::after {
  content: ''; position: absolute; left: 0;
}
.kd-hamburger span::before { top: -7px; }
.kd-hamburger span::after  { top:  7px; }

.kd-mobile-nav {
  display: none; flex-direction: column;
  background: #fff; border-top: 1px solid #eee;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.kd-mobile-nav a {
  padding: 14px 30px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; text-decoration: none;
  color: #444; border-bottom: 1px solid #eee;
  transition: background 0.2s, color 0.2s;
}
.kd-mobile-nav a.kd-active,
.kd-mobile-nav a:hover { background: var(--navy); color: #fff; }
.kd-mobile-nav.open { display: flex; }

/* ═══════════════════════════
   SECTION UTILITIES
═══════════════════════════ */
.kd-section { padding: 80px 20px; text-align: center; max-width: 1200px; margin: 0 auto; }
.kd-subtitle { color: var(--gray); font-size: 16px; text-transform: uppercase; letter-spacing: 4px; margin-bottom: 5px; }
.kd-title { color: var(--navy); font-size: 30px; text-transform: uppercase; letter-spacing: 2px; margin-top: 0; margin-bottom: 15px; }
.kd-divider { width: 60px; height: 3px; background: var(--gold); margin: 0 auto 40px auto; }
.kd-text-center { max-width: 800px; margin: 0 auto; font-size: 16px; color: #666; }

/* ═══════════════════════════
   HERO (generic)
═══════════════════════════ */
.kd-hero {
  margin-top: 0;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff;
  padding: 60px 20px;
  background-size: cover;
  background-position: center;
}
.kd-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}
.kd-hero p {
  font-size: 20px;
  max-width: 800px;
  font-weight: 400;
  line-height: 1.7;
}

/* ═══════════════════════════
   FOOTER
═══════════════════════════ */
.kd-footer {
  background-color: #3b5765;
  color: #9cb1bd;
  padding: 60px 20px 0 20px;
  position: relative;
}
.kd-footer-grid {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  padding-bottom: 60px;
  flex-wrap: wrap;
}
.kd-footer-col {
  flex: 1;
  min-width: 250px;
}
.kd-footer-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.kd-footer-logo-text {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}
.kd-footer-col h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.kd-footer-col p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
  color: #a4bccc;
}
.kd-footer-col a { color: #a4bccc; text-decoration: none; }
.kd-footer-col a:hover { color: #fff; }
.kd-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.kd-footer-copyright {
  color: #8fa7b4;
}
.kd-footer-copyright strong {
  color: #ffffff;
  font-weight: normal;
}
.kd-footer-scroll-top {
  background-color: #2c424d;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: background-color 0.3s;
}
.kd-footer-scroll-top:hover {
  background-color: var(--navy);
}

/* ═══════════════════════════
   BUTTONS
═══════════════════════════ */
.kd-btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 14px 35px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  text-transform: uppercase;
  font-size: 13px;
}
.kd-btn:hover { background: #ffffff; color: var(--navy); }

/* ═══════════════════════════
   RESPONSIVE
═══════════════════════════ */
@media (max-width: 768px) {
  .kd-nav       { display: none; }
  .kd-hamburger { display: flex; }
  .kd-logo-text { font-size: 20px; }
  .kd-hero h1   { font-size: 32px; }
  .kd-hero p    { font-size: 16px; }
  .kd-footer-grid { flex-direction: column; gap: 30px; }
  .kd-footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

/* ═══════════════════════════
   INVESTMENT TABLES
   ═══════════════════════════ */
.kd-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 30px 0;
}
.kd-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 15px;
  text-align: left;
}
.kd-table th, .kd-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #eaeaea;
}
.kd-table th {
  background-color: var(--navy);
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
}
.kd-table tbody tr:nth-of-type(even) {
  background-color: #f7f9fa;
}
.kd-table tbody tr:hover {
  background-color: #f0f4f5;
}
.kd-status-sold {
  color: #c9302c;
  font-weight: bold;
}
.kd-status-reserved {
  color: var(--gold);
  font-weight: bold;
}
.kd-status-free {
  color: #449d44;
  font-weight: bold;
}
.kd-rzut-link {
  color: var(--navy);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.kd-rzut-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ═══════════════════════════
   GALLERY GRID
   ═══════════════════════════ */
.kd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.kd-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  aspect-ratio: 3/2;
  cursor: pointer;
  background-color: #f0f4f5;
}
.kd-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.kd-gallery-item:hover img {
  transform: scale(1.05);
}

/* ═══════════════════════════
   LIGHTBOX
   ═══════════════════════════ */
.kd-lightbox {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.kd-lightbox.open {
  display: flex;
  opacity: 1;
}
.kd-lightbox-content {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 5px 25px rgba(0,0,0,0.5);
  border-radius: 4px;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  object-fit: contain;
}
.kd-lightbox.open .kd-lightbox-content {
  transform: scale(1);
}
.kd-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.kd-lightbox-close:hover {
  color: var(--gold);
}
.kd-dropcaps {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 30px 0;
}
.kd-dropcap-letter {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: var(--navy);
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kd-dropcap-text {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  text-align: left;
}

/* ═══════════════════════════
   SLIDESHOW (oferta.html)
   ═══════════════════════════ */
.kd-slideshow {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background-color: #000;
}
.kd-slideshow-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.0s ease-in-out;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.kd-slideshow-slide.active {
  opacity: 1;
  z-index: 2;
}
.kd-slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(21, 79, 103, 0.7);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background-color 0.3s;
}
.kd-slideshow:hover .kd-slideshow-arrow {
  opacity: 1;
}
.kd-slideshow-arrow:hover {
  background: var(--gold);
  color: var(--navy);
}
.kd-slideshow-prev { left: 20px; }
.kd-slideshow-next { right: 20px; }

.kd-slideshow-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}
.kd-slideshow-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background-color 0.3s;
}
.kd-slideshow-dot.active, .kd-slideshow-dot:hover {
  background: #fff;
}

/* ═══════════════════════════
   CAROUSEL (investment detail pages)
   ═══════════════════════════ */
.kd-carousel-container {
  position: relative;
  width: 100%;
  margin: 40px 0;
  display: flex;
  align-items: center;
}
.kd-carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
}
.kd-carousel-track {
  display: flex;
  transition: transform 0.4s ease-out;
  will-change: transform;
}
.kd-carousel-track .kd-gallery-item {
  flex: 0 0 100%;
  margin: 0;
  box-shadow: none;
}
/* Media queries to adjust items per view */
@media (min-width: 576px) {
  .kd-carousel-track .kd-gallery-item {
    flex: 0 0 calc(50% - 10px);
    margin-right: 20px;
  }
}
@media (min-width: 992px) {
  .kd-carousel-track .kd-gallery-item {
    flex: 0 0 calc(33.333% - 13.333px);
    margin-right: 20px;
  }
}

.kd-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: var(--navy);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: background-color 0.3s, opacity 0.3s, visibility 0.3s;
}
.kd-carousel-arrow:hover {
  background-color: var(--gold);
  color: var(--navy);
}
.kd-carousel-prev {
  left: -22px;
}
.kd-carousel-next {
  right: -22px;
}
.kd-carousel-arrow.disabled {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Adjust gallery grid on mobile for standard pages if not using carousel */
@media (max-width: 575px) {
  .kd-carousel-container {
    padding: 0 10px;
  }
  .kd-carousel-prev { left: 0px; }
  .kd-carousel-next { right: 0px; }
}

