:root {
  --ootwee-blauw: #1b8a9c;
  --ootwee-bordeaux: #ab244f;
  --ootwee-bordeaux-licht: #c05b7b;
  --header-h: 96px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

main {
  width: 100%;
}

body {
  font-family: "Poppins", sans-serif;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  background-color: white;
  color: var(--ootwee-blauw);
}

header {
  background-color: rgba(231, 241, 243, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: var(--header-h);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: center;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 100;
}

footer {
  padding: 25px;
  background-color: #e7f1f3;
  width: 100%;
}

nav > ul {
  display: flex;
  font-style: normal;
  list-style-type: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 5em;
}

ul {
  color: var(--ootwee-blauw);
  font-size: large;
}

nav {
  grid-column: 2;
  width: 100%;
  display: flex;
  list-style-type: none;
  justify-content: center;
  align-items: center;
}

nav a {
  font-size: larger;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ootwee-bordeaux);
}

nav .has-submenu {
  font-size: larger;
  text-decoration: none;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  color: var(--ootwee-bordeaux);
  background-color: transparent;
  cursor: pointer;
}

nav li.has-submenu {
  position: relative;
}

nav .submenu {
  position: absolute;
  top: 130%;
  left: 50%;
  min-width: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  font-size: large;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

nav li.has-submenu:hover > .submenu,
nav li.has-submenu:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

nav .submenu li {
  display: block;
  margin: 0;
  padding: 0;
  width: 100%;
}

nav .submenu a {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.7rem 1.4rem;
  font-size: large;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

nav .submenu a:hover,
nav .submenu a:focus {
  background-color: #e7f1f3;
  color: var(--ootwee-bordeaux-licht);
}

nav li.has-submenu:hover > a {
  color: var(--ootwee-bordeaux-licht);
}

nav .submenu li:first-child a {
  border-radius: 6px 6px 0 0;
}

nav .submenu li:last-child a {
  border-radius: 0 0 6px 6px;
}

nav .submenu li:only-child a {
  border-radius: 6px;
}

nav li.has-submenu > svg {
  transition: transform 0.2s ease;
}

nav li.has-submenu:hover > svg,
nav li.has-submenu:focus-within > svg {
  transform: rotate(180deg);
}

a {
  color: var(--ootwee-blauw);
  background-color: none;
}

h1,
h2 {
  text-align: center;
}

h1 {
  color: white;
  background-color: #398b9c;
  width: 100%;
  margin: 0;
  padding-top: 30px;
  padding-bottom: 30px;
  font-size: 46px;
  font-weight: 100;
  line-height: 2;
  text-transform: uppercase;
}

h2 {
  color: white;
  background-color: #aa194b;
  width: 100%;
  margin: 0;
  font-size: 30px;
  font-weight: 100;
  text-transform: uppercase;
  padding-top: 20px;
  padding-bottom: 20px;
  line-height: 2;
}

h3,
h4 {
  color: var(--ootwee-bordeaux);
}

h3 {
  text-transform: uppercase;
  font-size: 22px;
  font-weight: 700;
  line-height: 2;
}

p {
  color: var(--ootwee-blauw);
  font-size: large;
  line-height: 1.5;
}

section {
  width: 60%;
  margin: 2rem;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.logo-link {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  padding-left: 1rem;
}

.logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
}

main > section:first-child:has(.logo-big) {
  margin-top: 0;
}

.photo-wrapper:has(.logo-big) {
  margin-top: calc(-1 * var(--header-h));
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-wrapper .logo-big {
  width: 680px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.fade-in {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.fade-in.loaded {
  opacity: 1;
}

.social-icon {
  justify-self: end;
  grid-column: 3;
  width: 60px;
  height: 60px;
  color: #398b9c;
  transition: color 0.2s ease;
}

.social-icon:hover {
  color: #2a6672;
  cursor: pointer;
}

.photo-wrapper {
  width: 100%;
}

img {
  overflow-clip-margin: content-box;
  overflow: clip;
}

.photo-wrapper img {
  width: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  max-width: 100%;
  height: auto;
}

.profile-img {
  float: left;
  width: auto;
  max-height: 300px;
  max-width: 40%;
  object-fit: cover;
  margin: 0.25rem 2rem 0 0;
  border-radius: 6px;
}

section:has(.profile-img) {
  display: flow-root;
}

.room-img {
  width: auto;
  max-width: 100%;
  height: calc((100cqw - 1.5rem) / 2 * 901 / 1600);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.room-btn {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 12px;
  cursor: zoom-in;
}

.room-btn:focus-visible {
  outline: 3px solid var(--ootwee-blauw);
  outline-offset: 4px;
}

.room-img {
  display: block;
}

.room-btn:hover .room-img {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(10, 20, 25, 0.9);
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-caption {
  color: white;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-caption.is-new {
  animation: caption-flash 0.9s ease;
}

@keyframes caption-flash {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  40% {
    opacity: 1;
    transform: none;
    color: var(--ootwee-bordeaux-licht);
  }
  100% {
    color: white;
  }
}

.lightbox-img {
  max-width: calc(100vw - 8rem);
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox button svg {
  width: 50%;
  height: 50%;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2.5rem;
  line-height: 1;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

@media (max-width: 800px) {
  .lightbox-img {
    max-width: 100vw;
    max-height: calc(100vh - 12rem);
    border-radius: 0;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 1.5rem;
    transform: none;
  }

  .lightbox-prev {
    left: calc(50% - 64px);
  }

  .lightbox-next {
    right: calc(50% - 64px);
  }
}

.small-img {
  width: 200px;
  height: auto;
}

.grid-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  container-type: inline-size;
}

.flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 3rem 0;
}

.gallery-title {
  flex-basis: 100%;
  text-align: center;
}

.gallery-title ~ .gallery-title {
  margin-top: 3rem;
}

.back-wrap {
  text-align: center;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  background-color: var(--ootwee-bordeaux);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.back-btn:hover,
.back-btn:focus-visible {
  background-color: var(--ootwee-bordeaux-licht);
}

.location-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.tarieven {
  border-collapse: collapse;
  min-width: 400px;
  max-width: 600px;
  margin: 1rem 0;
  font-size: large;
}

.tarieven th,
.tarieven td {
  border: none currentColor;
  text-align: left;
  color: var(--ootwee-blauw);
}

.tarieven td:last-child {
  text-align: left;
  white-space: nowrap;
}

.icon-margin {
  margin-right: 1rem;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  color: #398b9c;
  cursor: pointer;
}

@media (max-width: 1000px) {
  .profile-img {
    float: none;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1rem;
  }

  p,
  li,
  h1,
  h2,
  h3 {
    overflow-wrap: anywhere;
  }

  img {
    max-width: 100%;
  }

  @media (max-width: 800px) {
    section {
      width: 90%;
      margin: 1.5rem 0;
    }

    h1 {
      font-size: 30px;
    }

    h2 {
      font-size: 22px;
    }

    .tarieven {
      min-width: 0;
      width: 100%;
    }

    .grid-container {
      gap: 1rem;
    }

    .room-btn {
      flex-basis: 100%;
    }

    .room-img {
      width: 100%;
      height: auto;
    }

  }

  :root {
    --header-h: 72px;
  }

  header {
    height: auto;
    min-height: var(--header-h);
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
  }

  .logo-link {
    padding-left: 0.5rem;
  }

  .logo {
    height: 44px;
  }

  .social-icon {
    grid-column: 2;
    width: 36px;
    height: 36px;
  }

  .menu-toggle {
    display: flex;
    grid-column: 3;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 1;
    background-color: #faf9f7;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  }

  nav.open {
    display: block;
  }

  nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.5rem 0;
  }

  nav li.has-submenu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  nav > ul > li > a {
    justify-content: space-between;
    padding: 1rem 1.5rem;
    font-size: medium;
  }

  nav .submenu,
  nav li.has-submenu:hover > .submenu,
  nav li.has-submenu:focus-within > .submenu {
    position: static;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  nav .submenu::before {
    display: none;
  }

  nav .submenu a {
    padding: 0.7rem 1.5rem 0.7rem 2.5rem;
    border-radius: 0;
  }

  nav li.has-submenu:hover > svg,
  nav li.has-submenu:focus-within > svg {
    transform: none;
  }

  nav.open > ul > li.has-submenu > svg {
    display: none;
  }
}
