/*
Theme Name: atoll apartments
Description: Nachbau des IONOS-Baukasten-Designs von www.atoll-apartments.de (Strandhintergrund, beiger Rahmen, Kopfbild, Tuerkis-Navigation, Seitenleiste).
Version: 1.0.2
Text Domain: atoll-apartments
*/

:root {
  --mint: #dae8e6;
  --mint-light: #f2f9fa;
  --frame: #ddd0b2;
  --text: #242f2d;
  --teal: #59837d;
  --teal-dark: #2d4b50;
  --nav-text-active: #eef3f2;
  --font: "Trebuchet MS", Helvetica, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--mint) url(img/background.jpg) center top / cover fixed no-repeat;
  color: var(--text);
  font: 14px/1.35 var(--font);
}

a { color: var(--text); }
a:hover { color: var(--teal); }
img { max-width: 100%; height: auto; }

/* ---------- Rahmen ---------- */
.site {
  width: 950px;
  max-width: calc(100% - 20px);
  margin: 30px auto;
  padding: 15px;
  background: var(--frame);
}

/* ---------- Kopf ---------- */
.site-header { position: relative; line-height: 0; }
.site-header .emotion { display: block; width: 100%; height: auto; }
.site-header .logo {
  position: absolute; top: 15px; right: 15px; line-height: 0;
  background: #fff; padding: 2px;
}
.site-header .logo img { width: 115px; height: auto; display: block; }

/* ---------- Navigation ---------- */
.main-nav { background: var(--mint); border-top: 1px solid #c9dad7; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.main-nav li { flex: 1 1 auto; border-right: 1px solid #f2f9fa; }
.main-nav li:last-child { border-right: 0; }
.main-nav a {
  display: block; text-align: center; text-decoration: none;
  padding: 10px 14px 11px; font-size: 14.4px; color: var(--teal);
}
.main-nav a:hover { background: #c6dbd8; color: var(--text); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { background: var(--teal); color: var(--nav-text-active); }
.nav-toggle { display: none; }

/* ---------- Inhalt + Seitenleiste ---------- */
.content-wrap { display: flex; background: var(--mint); }
.content { flex: 1 1 auto; min-width: 0; padding: 30px 30px 40px 20px; }
.sidebar { flex: 0 0 262px; background: var(--mint-light); padding: 30px 20px; font-size: 12px; line-height: 1.6; }

.content h1, .content h2 {
  font: bold 20.8px/1.3 var(--font); color: var(--text); margin: 0 0 18px;
}
.content h3 { font: bold 16px/1.3 var(--font); margin: 1.4em 0 .5em; }
.content p { margin: 0 0 1em; line-height: 1.35; }
.content ul { margin: 0 0 1em; padding-left: 20px; line-height: 1.6; }
.content hr, .content .wp-block-separator {
  border: 0; border-top: 2px dotted #9fb9b5; margin: 35px 0; opacity: 1; background: none;
}

.sidebar h2 { font: bold 20.8px/1.3 var(--font); color: var(--teal-dark); margin: 18px 0 20px; }
.sidebar p { margin: 0 0 .6em; }
.sidebar .sep { border: 0; border-top: 1px dotted #9fb9b5; margin: 22px 0; }
.sidebar .badge { display: block; width: 115px; margin: 0 auto 0 0; }

/* Buttons wie im Original */
.btn, .wp-block-button__link, .wp-element-button {
  display: inline-block; background: var(--teal-dark); color: #eaeded !important;
  border: 1px solid var(--teal-dark); border-radius: 3px; padding: 8px 15px;
  font: 12px var(--font); text-decoration: none; cursor: pointer;
}
.btn:hover, .wp-block-button__link:hover { background: var(--teal); border-color: var(--teal); }
.wp-block-buttons.is-content-justification-right { justify-content: flex-end; }

/* Preistabelle */
.content table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
.content td, .content th, .content .wp-block-table td, .content .wp-block-table th { padding: 7px 8px; border: 0; border-bottom: 1px solid #b9cfcb; text-align: left; vertical-align: top; }
.content th { font-weight: bold; }
.content .wp-block-table { margin: 0 0 1.5em; }
.content .wp-block-table thead { border-bottom: 2px solid var(--teal); }
.content .wp-block-table thead th { text-transform: uppercase; font-size: 13px; }
.content .wp-block-table td:not(:first-child), .content .wp-block-table th:not(:first-child) { white-space: nowrap; }

/* ---------- Diashow (Galerie-Block mit Klasse "atoll-slideshow") ---------- */
.atoll-show { margin: 0 0 25px; user-select: none; }
.atoll-show .stage { position: relative; background: #fff; line-height: 0; cursor: zoom-in; aspect-ratio: 1024 / 678; overflow: hidden; }
.atoll-show .stage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .5s; }
.atoll-show .prev, .atoll-show .next {
  position: absolute; top: 50%; transform: translateY(-50%); border: 0; cursor: pointer;
  background: rgba(36,47,45,.45); color: #fff; width: 36px; height: 50px; font-size: 24px; line-height: 1;
  opacity: 0; transition: opacity .2s;
}
.atoll-show .stage:hover .prev, .atoll-show .stage:hover .next, .atoll-show .prev:focus, .atoll-show .next:focus { opacity: 1; }
.atoll-show .prev { left: 0; } .atoll-show .next { right: 0; }
.atoll-show .bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.atoll-show .thumbs { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.atoll-show .thumbs button { border: 2px solid transparent; padding: 0; background: none; cursor: pointer; line-height: 0; }
.atoll-show .thumbs img { width: 34px; height: 22px; object-fit: cover; display: block; }
.atoll-show .thumbs button.active { border-color: #fff; outline: 1px solid #9fb9b5; }
.atoll-show .ctl { border: 0; background: var(--text); color: #fff; width: 18px; height: 18px; border-radius: 50%; font-size: 9px; cursor: pointer; padding: 0; }
/* ohne JS: normale Galerie bleibt sichtbar */
.wp-block-gallery.atoll-slideshow.is-enhanced { display: none !important; }

/* Lightbox */
.atoll-lb { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 9999; }
.atoll-lb.open { display: flex; }
.atoll-lb img { max-width: 92vw; max-height: 88vh; box-shadow: 0 0 30px #000; }
.atoll-lb button { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; padding: 10px 18px; }
.atoll-lb .x { top: 10px; right: 10px; font-size: 34px; }
.atoll-lb .l { left: 10px; top: 50%; transform: translateY(-50%); }
.atoll-lb .r { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- Fuss ---------- */
.site-footer { background: var(--mint); border-top: 1px solid #c9dad7; padding: 14px 20px; font-size: 12px; color: var(--text); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .site { margin: 0 auto; max-width: 100%; padding: 8px; }
  .site-header .logo img { width: 80px; }
  .nav-toggle {
    display: block; width: 100%; background: var(--teal); color: #fff; border: 0;
    padding: 12px 16px; font: 15px var(--font); text-align: left; cursor: pointer;
  }
  .main-nav ul { display: none; flex-direction: column; }
  .main-nav.open ul { display: flex; }
  .main-nav li { border-right: 0; border-bottom: 1px solid #f2f9fa; }
  .main-nav a { text-align: left; padding: 12px 16px; }
  .content-wrap { flex-direction: column; }
  .content { padding: 22px 16px 30px; }
  .sidebar { flex-basis: auto; padding: 22px 16px; }
  .content h1, .content h2 { font-size: 18px; }
  .content .wp-block-table { overflow-x: auto; }
}

/* ---------- Druck ---------- */
@media print {
  body { background: #fff; }
  .site { width: auto; margin: 0; padding: 0; background: none; }
  .main-nav, .sidebar, .atoll-show .bar { display: none; }
}
