/* =========================================================
   PIASKOWY KOŃ — Cassiopeia / Joomla 5
   Wersja 1: strona główna + podstawowy wygląd witryny
   ========================================================= */

:root {
  --pk-navy: #0b1d2d;
  --pk-navy-2: #1a2533;
  --pk-graphite: #2b2f36;
  --pk-gold: #d4af37;
  --pk-gold-hover: #b99225;
  --pk-gold-soft: #e6c78a;
  --pk-ivory: #f5f2ea;
  --pk-surface: #fffdf8;
  --pk-text: #25231f;
  --pk-muted: #6c675f;
  --pk-line: rgba(11, 29, 45, 0.14);
  --pk-shadow: 0 14px 40px rgba(11, 29, 45, 0.10);
  --pk-radius: 18px;
  --pk-shell: 1180px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--pk-ivory);
  color: var(--pk-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3,
h4,
.site-title,
.navbar-brand {
  color: var(--pk-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.025em;
}

a {
  color: var(--pk-navy);
}

a:hover,
a:focus {
  color: var(--pk-gold-hover);
}

/* ---------- Nagłówek Cassiopei ---------- */
.container-header {
  background: var(--pk-navy);
  background-image: none;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.16);
  position: relative;
  z-index: 30;
}

.container-header .navbar-brand,
.container-header .site-description,
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
  color: #fff;
}

.container-header .mod-menu > li > a {
  font-size: 0.91rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a {
  color: var(--pk-gold-soft);
}

.container-header .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
}

/* ---------- Cassiopeia: szersza strona główna ---------- */
.pk-home {
  margin-inline: calc(50% - 50vw);
  overflow: clip;
}

.pk-home * {
  box-sizing: border-box;
}

.pk-shell {
  margin-inline: auto;
  max-width: var(--pk-shell);
  padding-inline: 24px;
  width: 100%;
}

.pk-shell--narrow {
  max-width: 900px;
}

.pk-section {
  padding-block: clamp(64px, 7vw, 105px);
}

.pk-section--light {
  background: var(--pk-surface);
}

.pk-section--ivory {
  background: var(--pk-ivory);
}

.pk-section-heading {
  margin: 0 auto clamp(38px, 5vw, 58px);
  max-width: 780px;
  text-align: center;
}

.pk-section-heading h2,
.pk-location h2,
.pk-cta h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  margin: 0 0 18px;
}

.pk-section-heading > p:last-child {
  color: var(--pk-muted);
  font-size: 1.04rem;
  margin-inline: auto;
  max-width: 720px;
}

.pk-eyebrow {
  color: var(--pk-gold-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.pk-eyebrow--dark {
  color: #8c6d17;
}

/* ---------- Hero ---------- */
.pk-hero {
  align-items: end;
  background: var(--pk-navy);
  display: grid;
  min-height: clamp(600px, 76vh, 850px);
  position: relative;
}

.pk-hero__picture,
.pk-hero__picture img,
.pk-hero__shade {
  inset: 0;
  position: absolute;
}

.pk-hero__picture img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.pk-hero__shade {
  background:
    linear-gradient(90deg, rgba(5, 14, 23, 0.88) 0%, rgba(5, 14, 23, 0.64) 42%, rgba(5, 14, 23, 0.18) 72%, rgba(5, 14, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(5, 14, 23, 0.62) 0%, transparent 45%);
}

.pk-hero__content {
  color: #fff;
  padding-bottom: clamp(64px, 9vw, 120px);
  padding-top: 130px;
  position: relative;
  z-index: 2;
}

.pk-hero h1 {
  color: #fff;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: 0.99;
  margin: 0 0 24px;
  max-width: 850px;
  text-wrap: balance;
}

.pk-hero__lead {
  color: rgba(255, 255, 255, 0.91);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  margin: 0;
  max-width: 680px;
}

.pk-actions,
.pk-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* ---------- Przyciski ---------- */
.pk-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  font-size: 0.87rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.045em;
  min-height: 50px;
  padding: 12px 22px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.pk-button:hover,
.pk-button:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.pk-button--gold {
  background: var(--pk-gold);
  border-color: var(--pk-gold);
  color: var(--pk-navy);
}

.pk-button--gold:hover,
.pk-button--gold:focus-visible {
  background: var(--pk-gold-hover);
  border-color: var(--pk-gold-hover);
  color: var(--pk-navy);
}

.pk-button--outline-light {
  background: rgba(11, 29, 45, 0.12);
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
}

.pk-button--outline-light:hover,
.pk-button--outline-light:focus-visible {
  background: #fff;
  border-color: #fff;
  color: var(--pk-navy);
}

.pk-button--outline-dark {
  background: transparent;
  border-color: var(--pk-gold-hover);
  color: var(--pk-navy);
}

.pk-button--outline-dark:hover,
.pk-button--outline-dark:focus-visible {
  background: var(--pk-gold);
  border-color: var(--pk-gold);
  color: var(--pk-navy);
}

.pk-text-link {
  color: var(--pk-navy);
  font-weight: 800;
  text-decoration: none;
}

.pk-text-link:hover,
.pk-text-link:focus-visible {
  color: var(--pk-gold-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Pasek korzyści ---------- */
.pk-benefits {
  background: var(--pk-surface);
  border-bottom: 1px solid var(--pk-line);
  box-shadow: 0 7px 22px rgba(11, 29, 45, 0.05);
  position: relative;
  z-index: 4;
}

.pk-benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.pk-benefit {
  align-items: center;
  display: flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 12px;
  justify-content: center;
  min-height: 92px;
  padding: 18px;
  text-align: left;
}

.pk-benefit + .pk-benefit {
  border-left: 1px solid var(--pk-line);
}

.pk-benefit__icon {
  color: #a67d13;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

/* ---------- Karty domów ---------- */
.pk-house-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pk-house-card {
  background: var(--pk-surface);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: var(--pk-radius);
  box-shadow: var(--pk-shadow);
  overflow: hidden;
}

.pk-house-card__image-link {
  display: block;
  overflow: hidden;
  position: relative;
}

.pk-house-card__image {
  aspect-ratio: 3 / 2;
  display: block;
  object-fit: cover;
  transition: transform 450ms ease;
  width: 100%;
}

.pk-house-card:hover .pk-house-card__image {
  transform: scale(1.025);
}

.pk-house-card__badge {
  background: var(--pk-gold);
  border-radius: 0 0 8px 0;
  color: var(--pk-navy);
  font-size: 0.76rem;
  font-weight: 800;
  left: 0;
  letter-spacing: 0.05em;
  padding: 9px 15px;
  position: absolute;
  text-transform: uppercase;
  top: 0;
}

.pk-house-card__body {
  padding: clamp(24px, 4vw, 38px);
}

.pk-house-card__kicker {
  color: #8c6d17;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.pk-house-card h3 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1;
  margin: 0 0 18px;
}

.pk-house-card h3 a {
  color: var(--pk-navy);
  text-decoration: none;
}

.pk-house-card__intro {
  color: var(--pk-muted);
  margin-bottom: 24px;
}

.pk-facts {
  border-block: 1px solid var(--pk-line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding-block: 18px;
}

.pk-facts > div {
  padding: 8px 14px;
}

.pk-facts > div:nth-child(even) {
  border-left: 1px solid var(--pk-line);
}

.pk-facts dt {
  color: var(--pk-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pk-facts dd {
  color: var(--pk-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  margin: 2px 0 0;
}

/* ---------- Lokalizacja ---------- */
.pk-location {
  background: #fffaf1;
}

.pk-location__grid {
  align-items: center;
  display: grid;
  gap: clamp(36px, 6vw, 76px);
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.pk-location__image-wrap {
  border-radius: var(--pk-radius);
  box-shadow: var(--pk-shadow);
  overflow: hidden;
}

.pk-location__image {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.pk-location__content p:not(.pk-eyebrow) {
  color: var(--pk-muted);
}

.pk-location__content .pk-button {
  margin-top: 12px;
}

/* ---------- Powody ---------- */
.pk-reasons {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pk-reasons article {
  background: var(--pk-surface);
  border-top: 3px solid var(--pk-gold);
  box-shadow: 0 8px 24px rgba(11, 29, 45, 0.06);
  padding: 28px 24px;
}

.pk-reasons h3 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.pk-reasons p {
  color: var(--pk-muted);
  margin: 0;
}

/* ---------- FAQ ---------- */
.pk-faq {
  background: var(--pk-surface);
}

.pk-faq__list {
  border-top: 1px solid var(--pk-line);
}

.pk-faq details {
  border-bottom: 1px solid var(--pk-line);
}

.pk-faq summary {
  color: var(--pk-navy);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  list-style: none;
  padding: 21px 48px 21px 0;
  position: relative;
}

.pk-faq summary::-webkit-details-marker {
  display: none;
}

.pk-faq summary::after {
  color: var(--pk-gold-hover);
  content: "+";
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.55rem;
  font-weight: 400;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.pk-faq details[open] summary::after {
  content: "−";
}

.pk-faq details > div {
  color: var(--pk-muted);
  max-width: 760px;
  padding: 0 40px 20px 0;
}

.pk-faq details > div p {
  margin: 0;
}

/* ---------- CTA ---------- */
.pk-cta {
  background: var(--pk-navy);
  color: #fff;
  padding-block: 54px;
}

.pk-cta__inner {
  align-items: center;
  display: flex;
  gap: 36px;
  justify-content: space-between;
}

.pk-cta h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  margin-bottom: 10px;
}

.pk-cta p:not(.pk-eyebrow) {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 760px;
}

.pk-cta .pk-button {
  flex: 0 0 auto;
}

/* ---------- Stopka Cassiopei ---------- */
.container-footer {
  background: #071521;
  background-image: none;
  color: rgba(255, 255, 255, 0.78);
}

.container-footer a {
  color: var(--pk-gold-soft);
}

.container-footer h2,
.container-footer h3,
.container-footer h4 {
  color: #fff;
}

/* ---------- Fokus i dostępność ---------- */
.pk-home a:focus-visible,
.pk-home summary:focus-visible,
.container-header a:focus-visible {
  outline: 3px solid var(--pk-gold-soft);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pk-button,
  .pk-house-card__image {
    transition: none;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  .pk-benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pk-benefit:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--pk-line);
  }

  .pk-benefit:nth-child(4) {
    border-top: 1px solid var(--pk-line);
  }

  .pk-reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Telefon ---------- */
@media (max-width: 767px) {
  .pk-shell {
    padding-inline: 18px;
  }

  .pk-section {
    padding-block: 62px;
  }

  .pk-hero {
    min-height: 670px;
  }

  .pk-hero__shade {
    background:
      linear-gradient(0deg, rgba(5, 14, 23, 0.90) 0%, rgba(5, 14, 23, 0.50) 63%, rgba(5, 14, 23, 0.35) 100%);
  }

  .pk-hero__content {
    padding-bottom: 54px;
  }

  .pk-hero h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .pk-actions,
  .pk-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pk-button {
    width: 100%;
  }

  .pk-benefits__grid,
  .pk-house-grid,
  .pk-location__grid,
  .pk-reasons {
    grid-template-columns: 1fr;
  }

  .pk-benefit {
    border-left: 0 !important;
    border-top: 1px solid var(--pk-line);
    justify-content: flex-start;
    min-height: 72px;
  }

  .pk-benefit:first-child {
    border-top: 0;
  }

  .pk-location__content {
    order: -1;
  }

  .pk-facts {
    grid-template-columns: 1fr;
  }

  .pk-facts > div:nth-child(even) {
    border-left: 0;
  }

  .pk-facts > div + div {
    border-top: 1px solid var(--pk-line);
  }

  .pk-cta__inner {
    align-items: stretch;
    flex-direction: column;
  }
}
