/* ===== Global Base Styles ===== */
body {
  margin: 0;
  padding: 0;
  background-color: #F7F3E7; /* Warm neutral */
  color: #222; /* High contrast for readability */
  font-family: 'Roboto', 'Segoe UI', 'Arial', sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-weight: 700;
  color: #2E2E2E;
}

a {
  color: #005599;
  text-decoration: underline;
}

a:hover,
a:focus {
  color: #003366;
  background-color: #eaeaea;
}

/* ===== Navigation and Header ===== */
header {
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.top-bar {
  background: #333;
  color: white;
  padding: 0.5em 1em;
  text-align: center;
  font-size: 0.9em;
}

.top-bar a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.5em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.nav-container {
  background-color: #fff;
  border-bottom: 2px solid #ddd;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

.logo {
  margin: 0;
  font-size: 1.125em;
  color: #333;
  flex: 1;
}

nav {
  flex-shrink: 0;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 700;
  font-size: 1.1em;
  padding: 0.5em 0.8em;
}

nav a.active {
  border-bottom: 2px solid #005599;
}

/* ===== Ferienhaus Jork left-align and links will be right-aligned ===== */
.nav-right {
  margin-left: auto;
}

/* ===== Hero Section ===== */
.hero {
  width: 100%;
  height: 60vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero h2 {
  position: relative;
  z-index: 1;
  font-size: 2.5em;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.hero-caption {
  text-align: center;
  margin-top: 1rem;
  font-family: 'Pacifico', cursive;
  color: #333;
}

.hero-caption h2 {
  font-size: 2rem;
  margin: 0.5rem 0 0;
}

.hero-caption p {
  font-size: 1.2rem;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 1px;
  margin: 0.2rem 0;
}

/* ===== Features Section ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2em;
  margin: 2em auto;
  max-width: 1200px;
  padding: 0 1em;
}

.feature-box {
  background: #fff;
  padding: 2em;
  font-size: 1.05em;
  line-height: 1.7;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ===== Gallery Grid ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1em;
  margin-top: 1.5em;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, object-fit 0.3s ease;
  cursor: zoom-in;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  object-fit: contain;
  background-color: #fff;
  z-index: 10;
}

/* ===== Lightbox Styles ===== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.lightbox img.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.close-lightbox {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

/* ===== Footer ===== */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 1em;
  margin-top: 2em;
}

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

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

footer .credit {
  font-size: 0.8em;
  color: #999;
  margin-top: 0.5em;
}

footer .credit a {
  color: #ccc;
  text-decoration: none;
}

footer .credit a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===== Mobile Styles ===== */
@media (max-width: 480px) {
  body {
    font-size: 14px;
    line-height: 1.4;
  }

  h1 {
    font-size: 1.6em;
  }

  h2 {
    font-size: 1.3em;
  }

  h3 {
    font-size: 1.1em;
  }

  .nav-container {
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.5rem;
  }

  .logo {
    margin: 0;
    font-size: 0.975em;
    color: #333;
    flex: 1;
    line-height: 1.1;
    text-align: left;
    align-self: flex-start;
  }

  .logo span {
    display: block;
  }

  nav ul {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.3em;
    overflow-x: auto;
  }

  nav a {
    font-size: 0.85em;
    padding: 0.3em 0.5em;
    white-space: nowrap;
  }

  .feature-box {
    font-size: 0.95em;
  }

  .top-bar {
    font-size: 0.8em;
  }
}

/* ===== Top Bar Mobile Break Support ===== */
#top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75em;
  text-align: center;
}

.mobile-break {
  display: none;
}

/* Only break into vertical stack in portrait mode, not horizontal */
@media (max-width: 480px) and (orientation: portrait) {
  #top-bar {
    flex-direction: column;
    gap: 0.3em;
    font-size: 0.85em;
  }

  .separator {
    display: none;
  }

  .mobile-break {
    display: block;
    height: 0;
    width: 100%;
  }
}

/* ===== Begin Kontakt Page Specific Styles ===== */
main {
  max-width: 1200px;
  margin: 2em auto;
  padding: 0 1em;
}

.container-block {
  background: white;
  padding: 1.5em;
  margin-bottom: 2em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.container-block h2,
.container-block h3 {
  margin-top: 0;
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

iframe {
  width: 100%;
  height: 400px;
  border: 0;
}

a.map-link {
  display: inline-block;
  margin-top: 0.5em;
  color: #0066cc;
}

/* ===== End of Kontakt Page Specific Styles ===== */

/* ===== Contact Bar Separators and Mobile Clean Display ===== */
.separator {
  margin: 0 0.5em;
  color: #ccc;
}
