/* ------------------- Ogólne ------------------- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Playfair Display', serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #1a1a1a;
}

/* header hero */
header {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.4)), url('img/background.jpg') no-repeat center/cover;
  color: white;
  padding: 80px 20px 100px;
  text-align: center;
}

/* ------------------- NAGŁÓWEK - NAVBAR ------------------- */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 30px;
  background-color: #ffffffcc;
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(6px);
  gap: 12px;
}

.logo img {
  height: 68px;
  display: block;
  margin: 0 auto;
}

.menu-wrap { justify-self: center; }
.menu {
  display: flex;
  list-style: none;
  gap: 22px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.menu li { margin: 0; }
.menu li a {
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 500;
  transition: color 0.28s, transform 0.18s;
  padding: 6px 4px;
}
.menu li a:hover,
.menu li a.active { color: #bfa046; transform: translateY(-2px); }

.language-switch {
  justify-self: end;
  display: flex;
  gap: 8px;
  align-items: center;
}
.flag {
  width: 24px;
  height: auto;
  display: inline-block;
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.15s;
}
.flag:hover { transform: scale(1.08); }

/* sekcje */
section {
  padding: 50px 20px;
  max-width: 1200px;
  margin: 0 auto;
  scroll-margin-top: 100px;
}

/* ------------------- Kafelki apartamentów ------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.32s, box-shadow 0.32s;
  position: relative;
}
.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display:block;
}
.card h3, .card p {
  color: #000 !important;
  text-decoration: none !important;
  cursor: default;
  margin: 6px 0;
}
.card a, .card a:visited, .card a:hover, .card a:active {
  color: #000 !important;
  text-decoration: none !important;
}

/* cena */
.price-tag {
  background: #bfa046;
  color: #fff;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  margin: 12px auto 18px;
  font-size: 15px;
}

/* ------------------- Wstążka ------------------- */
.ribbon {
  position: absolute;
  left: -36px;
  top: 16px;
  transform: rotate(-30deg);
  background: #bfa046;
  color: white;
  padding: 6px 62px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 13px;
}

/* ------------------- Udogodnienia ------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.feature {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  font-size: 16px;
  color: #1a1a1a;
}
.feature i {
  color: #bfa046;
  margin-right: 10px;
  font-size: 18px;
}

/* ------------------- Opinie ------------------- */
.opinions { display: grid; gap: 20px; }
.opinion {
  background: #fafafa;
  padding: 20px;
  border-left: 4px solid #bfa046;
}

/* ------------------- Newsletter ------------------- */
#newsletter {
  background: #bfa046;
  color: white;
  text-align: center;
  padding: 40px 20px;
}
#newsletter input[type="email"] {
  padding: 10px;
  width: 250px;
  max-width: 80%;
  margin: 10px 5px;
}
#newsletter button {
  padding: 10px 20px;
  background: white;
  color: #bfa046;
  border: none;
  cursor: pointer;
}

/* ------------------- Kontakt ------------------- */
#contact {
  background: #fdfdfd;
  text-align: center;
  padding: 60px 20px;
  border-top: 6px solid #bfa046;
}
.contact-box h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #1a1a1a;
}
.contact-box p {
  margin: 8px 0;
  font-size: 16px;
}
a { text-decoration: none; color: inherit; }
.contact-box a {
  color: #bfa046;
  text-decoration: none;
  font-weight: 600;
}
.social-media {
  margin: 20px 0;
}
.social-media h4 { margin-bottom: 10px; }
.social-media a {
  margin: 0 10px;
  color: #000;
  transition: transform 0.2s;
}
.social-media a:hover { transform: scale(1.1); }
.contact-logo {
  max-width: 300px;
  margin: 25px auto;
  display: block;
}

/* ------------------- Promocje i karty ------------------- */
.promo-header { text-align: center; padding: 40px 20px; background: #fafafa; }
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 40px 20px;
}
@media (min-width: 1100px) {
  .promo-grid { grid-template-columns: repeat(4, 1fr); }
}
.promo-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s, box-shadow 0.32s;
  position: relative;
}
.promo-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}
.promo-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rating i { color: #bfa046; margin: 0 2px; }
.price-row { margin: 15px 0; font-size: 16px; }
.old-price { text-decoration: line-through; color: #888; margin-right: 10px; }
.new-price { color: #bfa046; font-weight: 700; }
.btn { padding: 10px 18px; border-radius: 6px; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn.primary { background: #bfa046; color: #fff; border: none; }
.btn.outline { border: 1px solid #bfa046; color: #bfa046; background: none; }
.note { font-size: 13px; color: #777; margin-top: 10px; }

/* -------- Galeria apartamentu (ulepszone) -------- */
.apartment-gallery {
  display: grid;
  gap: 18px;
  margin: 20px 0;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ensure anchors inside gallery are block-level for grid */
.apartment-gallery > a,
.apartment-gallery > div > a {
  display: block;
}

/* image style consistent */
.apartment-gallery img {
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s;
  display: block;
}
.apartment-gallery img:hover { transform: scale(1.03); }

/* Wrapper for hidden photos:
   - default: display: contents -> children act as direct grid children (fixes desktop layout)
   - collapsed: hide entirely on mobile until "Zobacz więcej" is clicked
*/
#more-photos { display: contents; }
#more-photos.collapsed { display: none !important; }

/* przycisk "Zobacz więcej" */
.btn-gold {
  display: inline-block;
  background: #bfa046;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  margin: 20px auto;
  text-align: center;
}
.btn-gold:hover { background: #a18736; }

.apartment-description {
  margin: 30px 0;
  line-height: 1.6;
  font-size: 16px;
}
.apartment-contact a { color: #bfa046; text-decoration: none; }
.apartment-contact a:hover { text-decoration: underline; }

/* ------------------- Responsywność ------------------- */
@media (min-width: 1024px) {
  .apartment-gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .apartment-gallery img {
    aspect-ratio: 3 / 4; /* zmienione: pionowa proporcja 3:4 */
    height: auto;
    object-fit: cover;
  }
  .btn-gold { display: none; }
  /* desktop: pokaż wszystkie zdjęcia od razu */
  #more-photos { display: contents; }
  #more-photos.collapsed { display: contents; } /* nie chować na desktop */
}
@media (max-width: 1023px) {
  .navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 18px;
    gap: 10px;
    border-radius: 16px;
    margin: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
  }
  .logo img { height:92px; }
  .language-switch { justify-self: center; }
  .menu-wrap { width: 100%; max-width: 560px; }
  .menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
    padding: 14px;
    background: none;
    border-radius: 12px;
    box-shadow: none;
  }
  .menu li { text-align: center; }
  .menu li a {
    color: #1a1a1a;
    font-size: 16px;
    display: block;
    padding: 8px 6px;
  }
}
@media (max-width: 768px) {
  .card img, .promo-card img { height: 420px; object-fit: cover; }
  .apartment-gallery {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .apartment-gallery img {
    height: auto;
    max-height: 420px;
  }
  .logo img { height: 96px; }
  .contact-logo { max-width: 220px; }
  .menu { gap: 10px; }
}

/* --- Footer --- */
footer {
  background: #111;
  color: #bbb;
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

/* ------------------- Custom lightbox modal (JS opens/closes) ------------------- */
.custom-lightbox-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease;
}
.custom-lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}
.custom-lightbox-image {
  max-width: 92%;
  max-height: 82%;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.clb-close, .clb-prev, .clb-next {
  position: absolute;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.clb-close { top: 18px; right: 18px; font-size: 34px; }
.clb-prev { left: 18px; top: 50%; transform: translateY(-50%); font-size: 48px; }
.clb-next { right: 18px; top: 50%; transform: translateY(-50%); font-size: 48px; }   

/* ------------------- Modal rezerwacji ------------------- */
.modal {
  display: none; /* ukryty domyślnie */
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  padding: 30px;
  position: relative;
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
  animation: fadeIn .25s ease;
  margin: 0 auto;            /* centrowanie */
  box-sizing: border-box;    /* liczy padding w szerokości */
  overflow-x: hidden;        /* blokada ewentualnego scrolla w poziomie */
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  color: #1a1a1a;
}

.modal-content label {
  display: block;
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.modal-content textarea { 
  min-height: 90px; 
}

.modal-content .submit-btn {
  background: #bfa046;
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background .25s;
}

.modal-content .submit-btn:hover {
  background: #9c8436;
}

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 26px;
  color: #555;
  cursor: pointer;
}
.close:hover { 
  color: #000; 
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Ulepszenia na urządzenia mobilne --- */
@media (max-width: 480px) {
  .modal-content {
    width: 95%;      /* lekkie marginesy z lewej/prawej */
    padding: 20px;   /* mniejsze paddingi */
  }
}

/* ---------------- Popup regulamin ---------------- */
#regulamin-popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5000;
}

#regulamin-popup .popup-content {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#regulamin-popup h2 {
  margin-bottom: 15px;
  font-size: 20px;
}

#regulamin-popup p {
  margin-bottom: 20px;
  font-size: 15px;
}

#regulamin-popup .btn {
  padding: 10px 18px;
  margin: 0 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}

#regulamin-popup .btn-accept {
  background: #bfa046;
  color: #fff;
}

#regulamin-popup .btn-read {
  background: #eee;
  color: #333;
}

/* Newsletter */
.newsletter {
  text-align: center;
  padding: 40px 20px;
  background: #f8f8f8;
  border-top: 1px solid #ddd;
}

.newsletter h3 {
  margin-bottom: 10px;
  font-size: 20px;
  color: #1a1a1a;
}

.newsletter p {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
}

.newsletter form {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 250px;
  font-size: 14px;
}

.newsletter button {
  background: #bfa046;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s;
}

.newsletter button:hover {
  background: #9c8436;
}

