/* ========================================
   Palais Unterkunft — Design System
   ======================================== */

:root {
  --primary: #2D4A3E;
  --primary-dark: #1E352B;
  --secondary: #F5F0E8;
  --accent: #C9A96E;
  --accent-dark: #B8954F;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-light: #6B6B6B;
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: 0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1rem; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section--cream { background: var(--secondary); }
.section--dark { background: var(--primary); color: var(--white); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

.text-center { text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--accent {
  background: var(--accent);
  color: var(--white);
}
.btn--accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  background: transparent;
}

.nav--scrolled {
  background: var(--primary);
  padding: 0.6rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.nav__logo {
  display: block;
}

.nav__logo img {
}

.nav__links {
  display: none;
  gap: 2rem;
}


.nav__links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 400;
  transition: var(--transition);
  position: relative;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--white);
}

.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

/* Hamburger */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

.nav__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Overlay */
.nav__mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.nav__mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-overlay a {
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  transition: var(--transition);
}

.nav__mobile-overlay a:hover {
  color: var(--accent);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.hero--small {
  min-height: 50vh;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  padding: 0 1.25rem;
  max-width: 800px;
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero__subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  font-weight: 300;
}

/* ---- Feature Cards ---- */
.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.feature-card__text {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- Apartment Cards ---- */
.apartment-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
  transition: var(--transition);
}

.apartment-card:hover {
  box-shadow: var(--shadow-lg);
}

.apartment-card__image {
  position: relative;
  height: 280px;
  overflow: hidden;
  cursor: pointer;
}

.apartment-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.apartment-card__image:hover img {
  transform: scale(1.05);
}

.apartment-card__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent);
  color: var(--white);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
}

.apartment-card__body {
  padding: 1.5rem;
}

.apartment-card__title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.apartment-card__desc {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.apartment-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.amenity {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.amenity__icon {
  font-size: 1.1rem;
}

/* Gallery Thumbnails */
.apartment-card__gallery {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.apartment-card__gallery img {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}

.apartment-card__gallery img:hover {
  opacity: 1;
}

/* ---- Apartment Preview Grid (index.html) ---- */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.preview-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 250px;
  cursor: pointer;
}

.preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.preview-card:hover img {
  transform: scale(1.05);
}

.preview-card__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ---- Location Grid ---- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.location-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.location-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.location-card__name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1rem;
}

.location-card__distance {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ---- Reviews ---- */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.review-card__stars {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.review-card__text {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.review-card__author {
  font-weight: 600;
  font-size: 0.9rem;
}

.review-card__date {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* ---- Booking Placeholder ---- */
.booking-placeholder {
  background: var(--secondary);
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
}

.booking-placeholder__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.booking-placeholder__text {
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto;
}

/* ---- Contact Form ---- */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 0.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,74,62,0.1);
}

.form-group textarea {
  resize: vertical;
}

/* ---- Map ---- */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* ---- Booking Section ---- */
.booking-section {
  padding: 3rem 20px;
  background: var(--secondary);
  text-align: center;
}

/* ---- Booking Button ---- */
.booking-button {
  display: inline-block;
  padding: 1.1rem 3.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--white);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}

.booking-button:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

@media (max-width: 767px) {
  .booking-section {
    padding: 2rem 15px;
  }

  .booking-button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    width: 100%;
  }
}

/* ---- Booking Modal ---- */
.booking-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.booking-modal-content {
  background: #ffffff;
  width: 95%;
  max-width: 1300px;
  height: 90vh;
  margin: 2% auto;
  padding: 0;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.booking-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.booking-close {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  z-index: 1;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.booking-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 1);
}

@media (max-width: 767px) {
  .booking-modal-content {
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }
}

/* ---- Footer ---- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 0;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer__col a {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  transition: var(--transition);
}

.footer__col a:hover {
  color: var(--accent);
}

.footer__col p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer__bottom {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox__prev { left: 1.5rem; }
.lightbox__next { right: 1.5rem; }

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* ---- Fade-In Animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive Breakpoints
   ======================================== */

/* Tablet (768px) */
@media (min-width: 768px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2.2rem; }

  .hero__title { font-size: 3.2rem; }
  .hero__subtitle { font-size: 1.3rem; }

  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }

  .apartment-card__image { height: 320px; }
  .map-container iframe { height: 400px; }
}

/* Desktop (1024px) */
@media (min-width: 1024px) {
  h1 { font-size: 3rem; }

  .nav__links { display: flex; }
  .nav__hamburger { display: none; }

  .hero__title { font-size: 3.5rem; }

  .features__grid { grid-template-columns: repeat(3, 1fr); }
  .location-grid { grid-template-columns: repeat(3, 1fr); }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }

  .section { padding: 5rem 0; }

  .apartment-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .apartment-card__image { height: 100%; min-height: 350px; }

  .apartment-card__gallery img {
    width: 80px;
    height: 55px;
  }

  .map-container iframe { height: 450px; }
}

/* Wide (1200px) */
@media (min-width: 1200px) {
  .container { padding: 0 2rem; }
}
