/* -------------------------------------------------------
   GLOBAL
------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-align: center;
  height: 100%;
}

body {
  font-family: serif;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  background: #fff;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* -------------------------------------------------------
   BACK TO TOP BUTTON
------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 20px;
  display: inline-block;
  cursor: pointer;
}

.back-to-top img {
  display: block;
}

/* -------------------------------------------------------
   HEADER + LOGO
------------------------------------------------------- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: lightblue;
  text-align: center;
  padding: 10px 15px;
  z-index: 1000;
}

#logo {
  position: fixed;
  top: 10px;
  left: 20px;
  z-index: 1100;
}

#logo img {
  height: 40px;
  width: auto;
}

/* -------------------------------------------------------
   DESKTOP NAVIGATION
------------------------------------------------------- */
#nav {
  text-align: center;
}

#nav ul {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

#nav li {
  margin: 0;
  padding: 0;
}

#nav a {
  display: inline-block;
  padding: 8px 12px;
  text-decoration: none;
  color: black;
  transition: all 0.2s ease;
  border-radius: 3px;
}

#nav a:hover {
  background-color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

#nav a.active {
  font-weight: bold;
  border-bottom: 2px solid #333;
}

/* -------------------------------------------------------
   MOBILE NAVIGATION (initially hidden)
------------------------------------------------------- */
#mobile-nav {
  display: none;
}

#mobile-nav-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#mobile-nav-content a {
  display: block;
  width: 100%;
}

#mobile-nav-content li {
  margin: 0;
  padding: 0;
  width: 100%;
}

/* -------------------------------------------------------
   CONTENT
------------------------------------------------------- */
#content {
  max-width: 920px;
  margin: 0 auto;
  padding: 55px 20px 40px;
  text-align: left;
  background: #fff;
  flex: 1;
}

figure {
  margin: 0%;
}

/* -------------------------------------------------------
   TABLES
------------------------------------------------------- */
table,
th,
td {
  border: none;
}

div.calendar {
  max-width: 100%;
  overflow-x: auto;
}

/* -------------------------------------------------------
   GALLERY
------------------------------------------------------- */
.apartment-gallery {
  display: grid;
  gap: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.gallery figure {
  margin: 0;
}

.gallery a {
  display: block;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.03);
}

/* -------------------------------------------------------
   LIGHTBOX
------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: zoomIn 0.25s ease;
  z-index: 2;
  position: relative;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.close,
.prev,
.next {
  position: absolute;
  color: white;
  text-decoration: none;
  user-select: none;
  z-index: 3;
}

.close {
  top: 20px;
  right: 30px;
  font-size: 3rem;
}

.prev,
.next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev {
  left: 10px;
}
.next {
  right: 10px;
}

.close:hover,
.prev:hover,
.next:hover {
  opacity: 0.7;
}

/* -------------------------------------------------------
   FOOTER
------------------------------------------------------- */
#footer {
  background-color: lightblue;
  text-align: center;
  padding: 25px 15px;
  border-top: 1px solid #bcd6ea;
  margin-top: auto;
}

#footer .footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

#footer p {
  margin: 6px 0;
}

#footer a {
  color: black;
  text-decoration: none;
}

#footer a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------
   MOBILE BREAKPOINT
------------------------------------------------------- */
@media (max-width: 878px) {
  #header {
    position: static;
    font-size: 22px;
  }

  #logo {
    display: none;
  }

  #nav {
    display: none;
  }

  #mobile-nav {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    background: lightblue;
    z-index: 2000;
  }

  summary.menu-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
  }

  #mobile-nav summary {
    cursor: pointer;
    font-size: 24px;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    list-style: none;
  }

  #mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  #mobile-nav nav {
    display: flex;
    flex-direction: column;
    background: white;
  }

  #mobile-nav a {
    padding: 12px;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
    color: black;
  }

  #mobile-nav a:hover {
    background: #f5f5f5;
  }

  #mobile-nav a.active {
    font-weight: bold;
    background: #e6f3ff;
  }

  #content {
    padding: 15px;
  }

  div.calendar {
    overflow-x: auto;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery img {
    height: auto;
  }
}
