/*
Theme Name: Haus Marinas
Description: Nachbau des IONOS-Baukasten-Designs von www.marinas.de (Strandhintergrund, beiger Rahmen, Kopfbild Yachthafen, blaue Navigation, Seitenleiste). Basis: Theme atoll-apartments.
Version: 1.0.1
Text Domain: haus-marinas
*/

:root {
  --mint: #e6f0f7;
  --mint-light: #f2f9fa;
  --frame: #ddd0b2;
  --text: #263a48;
  --teal: #4785b0;
  --teal-dark: #2d4b50;
  --nav-text-active: #edf3f7;
  --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: 160px; height: auto; display: block; }

/* ---------- Navigation ---------- */
.main-nav { background: var(--mint); border-top: 1px solid #c3dbec; }
.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(--text);
}
.main-nav a:hover { background: #c3dbec; 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 #99c2de; 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 #99c2de; 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 #c3dbec; 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 "hm-slideshow") ---------- */
.hm-show { margin: 0 0 25px; user-select: none; }
.hm-show .stage { position: relative; background: #fff; line-height: 0; cursor: zoom-in; aspect-ratio: 1024 / 678; overflow: hidden; }
.hm-show .stage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .5s; }
.hm-show .prev, .hm-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;
}
.hm-show .stage:hover .prev, .hm-show .stage:hover .next, .hm-show .prev:focus, .hm-show .next:focus { opacity: 1; }
.hm-show .prev { left: 0; } .hm-show .next { right: 0; }
.hm-show .bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hm-show .thumbs { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.hm-show .thumbs button { border: 2px solid transparent; padding: 0; background: none; cursor: pointer; line-height: 0; }
.hm-show .thumbs img { width: 34px; height: 22px; object-fit: cover; display: block; }
.hm-show .thumbs button.active { border-color: #fff; outline: 1px solid #99c2de; }
.hm-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.hm-slideshow.is-enhanced { display: none !important; }

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

/* ---------- Fuss ---------- */
.site-footer { background: var(--mint); border-top: 1px solid #c3dbec; 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, .hm-show .bar { display: none; }
}

/* ---------- Haus Marinas: Abweichungen vom atoll-Design (Werte aus www.marinas.de gemessen) ---------- */
.site-header .logo img { width: 228px; }
.main-nav a { font-size: 15.4px; }
.content h1 { font-size: 33px; font-weight: normal; line-height: 1.35; }
.sidebar h2 { font-size: 17.6px; }
@media (max-width: 760px) {
  .site-header .logo img { width: 140px; }
  .content h1 { font-size: 24px; }
}
