/* =====================================================
   Aster Aparts Wyspa Sobieszewska — Stylesheet
   Paleta morska: turkus + piasek + biel
   ===================================================== */

:root {
  --ocean: #0F4C5C;
  --ocean-light: #1B6B7E;
  --ocean-dark: #08313C;
  --teal: #2A8C8A;
  --teal-light: #4FB0AE;
  --sand: #F4EBD9;
  --sand-dark: #E8DBC2;
  --cream: #FBF8F1;
  --cream-dark: #F0EBE0;
  --gold: #D4A55E;
  --gold-light: #E0BB7E;
  --gold-dark: #B8893F;
  --coral: #E8826E;
  --brown-btn: #B8893F;
  --brown-btn-hover: #9C7332;
  --text-dark: #102A30;
  --text-muted: #5A6E73;
}

html { scroll-padding-top: 80px; }

body {
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background-color: var(--cream);
  overflow-x: hidden;
}

::selection { background: var(--teal-light); color: var(--ocean-dark); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ocean); }

.font-heading { font-family: 'Playfair Display', 'Georgia', serif; }

/* ---- Navigation ---- */
.navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

.navbar.scrolled,
.navbar-solid {
  background-color: rgba(15, 76, 92, 0.97) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ---- Hero ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transform: scale(1.02);
  transition: transform 8s ease;
}

.hero-section:hover .hero-bg {
  transform: scale(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* Bardzo subtelny gradient tylko u dołu dla czytelności widgetu — zdjęcie zostaje naturalne */
  background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0,0,0,0.25) 100%);
}

.hero-title,
.hero-tagline,
.hero-section .text-gold-light {
  text-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 1px 3px rgba(0,0,0,0.6);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-logo {
  max-width: 130px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  animation: fadeInDown 1.2s ease-out;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title   { animation: fadeInUp 1.2s ease-out 0.3s both; }
.hero-tagline { animation: fadeInUp 1.2s ease-out 0.6s both; }
.hero-widget  { animation: fadeInUp 1.2s ease-out 0.9s both; }

/* ---- Page Banner ---- */
.page-banner {
  position: relative;
  height: 42vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,49,60,0.8) 0%, rgba(15,76,92,0.6) 100%);
}

.page-banner-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

/* ---- Reservation Widget ---- */
.reservation-widget {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 2px 10px rgba(0,0,0,0.05);
  padding: 1.5rem 2rem;
}

.widget-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e8e4de;
  border-radius: 12px;
  background: #FAFAF8;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 180px;
}

.widget-field:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,140,138,0.1);
}

.widget-field svg { flex-shrink: 0; color: var(--teal); }
.widget-field-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.widget-field-value { font-size: 0.95rem; color: var(--text-dark); font-weight: 500; }

.btn-check-availability {
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.btn-check-availability:hover {
  background: var(--ocean);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,76,92,0.35);
}

/* ---- Section Headings ---- */
.section-heading { position: relative; display: inline-block; }

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--gold-dark);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---- About ---- */
.about-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.about-image-wrapper img { transition: transform 0.6s ease; }
.about-image-wrapper:hover img { transform: scale(1.05); }

.about-accent-box {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 120px;
  height: 120px;
  border: 3px solid var(--gold);
  border-radius: 12px;
  z-index: -1;
}

.about-feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Apartment Cards ---- */
.room-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,76,92,0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.room-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(15,76,92,0.15);
}

.room-card-image { position: relative; height: 260px; overflow: hidden; }
.room-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.room-card:hover .room-card-image img { transform: scale(1.08); }

.room-price-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(15,76,92,0.92);
  backdrop-filter: blur(8px);
  color: var(--gold-light);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
}

.room-amenity {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--sand);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.room-amenity svg { width: 14px; height: 14px; color: var(--teal); }

/* ---- Gallery ---- */
.masonry-grid { columns: 3; column-gap: 1rem; }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.masonry-item img { width: 100%; display: block; transition: transform 0.5s ease; }

.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,76,92,0.4), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.masonry-item:hover img { transform: scale(1.06); }
.masonry-item:hover::after { opacity: 1; }

.masonry-zoom-icon {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 2;
}

.masonry-item:hover .masonry-zoom-icon { opacity: 1; transform: translateY(0); }

@media (max-width: 1023px) { .masonry-grid { columns: 2; } }
@media (max-width: 639px)  { .masonry-grid { columns: 1; } }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8,49,60,0.96);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.4s ease;
}

.lightbox.active .lightbox-image { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* ---- Contact ---- */
.contact-input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1px solid #e0dbd4;
  border-radius: 12px;
  background: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.contact-input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(42,140,138,0.12); }
.contact-input::placeholder { color: #b0aca5; }
textarea.contact-input { resize: vertical; min-height: 140px; }

.contact-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: block;
}

.btn-submit {
  background: var(--ocean);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
  background: var(--ocean-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,76,92,0.3);
}

.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; }

.contact-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Footer ---- */
.footer-link { color: rgba(255,255,255,0.6); transition: color 0.3s ease; text-decoration: none; }
.footer-link:hover { color: var(--gold); }

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8,49,60,0.98);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open { transform: translateX(0); }

.mobile-menu a {
  color: white;
  font-size: 1.5rem;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-menu a:hover { color: var(--gold); }

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 200;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1023px) { .hamburger { display: flex; } }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--ocean);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10000;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show { transform: translateY(0); }

.toast-icon {
  width: 24px;
  height: 24px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Scroll to top ---- */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--ocean);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 49;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--gold-dark); }

/* ---- Floating Reservation Button ---- */
.fab-reserve {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--gold);
  color: var(--ocean);
  border: none;
  padding: 14px 22px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(15,76,92,0.3), 0 2px 8px rgba(0,0,0,0.1);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.fab-reserve.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.fab-reserve:hover {
  background: var(--gold-light);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(15,76,92,0.4), 0 4px 12px rgba(0,0,0,0.15);
}

.fab-reserve svg { flex-shrink: 0; }

@media (max-width: 640px) {
  .fab-reserve { padding: 14px; }
  .fab-reserve .fab-text { display: none; }
  .scroll-top { bottom: 90px; right: 24px; width: 40px; height: 40px; }
  .fab-reserve { right: 24px; bottom: 24px; }
}

/* ---- Utilities ---- */
.gold-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto;
}

.map-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,76,92,0.08);
}

.text-text-muted { color: var(--text-muted); }

/* ---- Mobile fixes ---- */
@media (max-width: 768px) {
  .hero-bg { background-attachment: scroll; }
  .reservation-widget { padding: 1.25rem 1rem; }
}

/* ==============================================================
   ROOMADMIN BOOKING MODAL
   ============================================================== */
.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.booking-modal[aria-hidden="false"] {
  display: flex;
  animation: bookingFadeIn 0.4s ease-out;
}
.booking-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 49, 60, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.booking-modal__panel {
  position: relative;
  width: min(960px, 100%);
  height: 90vh;
  max-height: 90vh;
  background: var(--cream);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(8, 49, 60, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bookingPanelIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.booking-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  background: var(--ocean);
  color: var(--cream);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.booking-modal__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: white;
}
.booking-modal__close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.booking-modal__close:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold-light);
  transform: rotate(90deg);
}
.booking-modal__close svg { width: 18px; height: 18px; }
.booking-modal__body {
  flex: 1 1 auto;
  overflow: hidden;
  background: white;
  position: relative;
}
.booking-modal__body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.booking-modal__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-muted);
  background: var(--cream);
}
.booking-modal__spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--cream-dark);
  border-top-color: var(--ocean);
  border-radius: 50%;
  animation: bookingSpin 0.9s linear infinite;
}
body.booking-modal-open { overflow: hidden; }

/* Wariant modala: kalendarz dostępności pojedynczego apartamentu */
.booking-modal__body--calendar { overflow-y: auto; }
.booking-modal__body--calendar iframe { height: 620px; }
.calendar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--cream-dark);
  background: white;
  position: sticky;
  top: 0;
  z-index: 2;
}
.calendar-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.calendar-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.calendar-bar__cta {
  background: var(--gold);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}
.calendar-bar__cta:hover { background: var(--gold-dark); }

@media (max-width: 640px) {
  .calendar-bar { padding: 0.75rem 1rem; gap: 0.6rem; }
  .calendar-bar__cta { flex: 1 1 100%; text-align: center; padding: 0.75rem 1rem; font-size: 0.9rem; }
  .calendar-legend { width: 100%; justify-content: center; }
}

@keyframes bookingFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bookingPanelIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes bookingSpin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .booking-modal { padding: 0; }
  .booking-modal__panel { max-height: 100vh; height: 100vh; border-radius: 0; }
  .booking-modal__title { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .booking-modal, .booking-modal__panel { animation: none; }
  .booking-modal__close:hover { transform: none; }
}
