/* ═══════════════════════════════════════════════════════════
   DABEH – STYLESHEET
   ═══════════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --ocean-deep:  #0d2137;
  --ocean:       #1a6b8a;
  --ocean-light: #4a9eca;
  --sky:         #fef3e8;
  --sand:        #fae3c4;
  --rope:        #c8964a;
  --text:        #1e2d3d;
  --text-light:  #5a6a7d;
  --white:       #ffffff;
  --radius:      8px;
  --shadow:      0 2px 16px rgba(80,40,10,.15);
  --transition:  .2s ease;
  --max-w:       1100px;
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'Source Sans 3', system-ui, sans-serif;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: #b8793a url('/media/background.jpeg') center / cover fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean); text-decoration: none; }
a:hover { color: var(--ocean-deep); }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--ocean-deep);
}
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .75rem; }
h3 { font-size: 1.3rem; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ocean-deep);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .75rem 1.5rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
}
.site-logo:hover { color: var(--rope); }
.logo-anchor { font-size: 1.5rem; }

.site-nav ul { list-style: none; display: flex; gap: 2rem; }
.site-nav a {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: color var(--transition);
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
  border-bottom-color: var(--rope);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* ── Hero ───────────────────────────────────────────────────── */
.site-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--ocean-deep);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .45;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  color: var(--white);
}
.hero-content h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 6vw, 5rem);
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.2rem;
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.btn-hero {
  display: inline-block;
  padding: .8rem 2rem;
  background: var(--rope);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .05em;
  transition: background var(--transition), transform var(--transition);
}
.btn-hero:hover { background: #b8935e; transform: translateY(-2px); color: var(--white); }

/* ── Post Feed ──────────────────────────────────────────────── */
.post-feed-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(2px);
}
.post-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.post-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(13,33,55,.18); }

.post-card-image-link { display: block; overflow: hidden; height: 220px; }
.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-image { transform: scale(1.04); }

.post-card-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card-tags { margin-bottom: .5rem; }
.post-card-tag {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ocean);
}
.post-card-title { font-size: 1.25rem; margin-bottom: .5rem; flex: 1; }
.post-card-title a { color: var(--ocean-deep); }
.post-card-title a:hover { color: var(--ocean); }
.post-card-excerpt { color: var(--text-light); font-size: .95rem; margin-bottom: 1rem; }
.post-card-meta { font-size: .85rem; color: var(--text-light); margin-top: auto; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  align-items: center;
}
.pagination a {
  padding: .5rem 1.25rem;
  border: 2px solid var(--ocean);
  border-radius: var(--radius);
  color: var(--ocean);
  font-weight: 600;
}
.pagination a:hover { background: var(--ocean); color: var(--white); }
.page-number { color: var(--text-light); }

/* ── Article ────────────────────────────────────────────────── */
.article-hero { height: 60vh; overflow: hidden; }
.article-hero-img { width: 100%; height: 100%; object-fit: cover; }

.article-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  background: rgba(255,255,255,.88);
  border-radius: var(--radius);
}
.page-wrapper { padding-top: 4rem; }

.article-tags { margin-bottom: .75rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.article-tag {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--white);
  background: var(--ocean);
  padding: .2rem .7rem;
  border-radius: 999px;
}
.article-title { margin-bottom: .75rem; }
.article-byline { color: var(--text-light); font-size: .9rem; margin-bottom: 2.5rem; }

.article-content { font-size: 1.1rem; }
.article-content h2 { margin: 2rem 0 .75rem; }
.article-content h3 { margin: 1.5rem 0 .5rem; }
.article-content p { margin-bottom: 1.25rem; }
.article-content img { border-radius: var(--radius); margin: 2rem 0; }
.article-content blockquote {
  border-left: 4px solid var(--rope);
  padding: 1rem 1.5rem;
  background: var(--sand);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ocean-deep);
}
.article-content a { text-decoration: underline; }
.article-content figure { margin: 2rem 0; }
.article-content figcaption { text-align: center; font-size: .85rem; color: var(--text-light); margin-top: .5rem; }

/* Ghost card styles */
.kg-width-wide { width: min(100%, 1100px); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.kg-image-card, .kg-gallery-card, .kg-video-card { margin: 2rem 0; }
.kg-video-card video, .kg-video-card iframe { width: 100%; border-radius: var(--radius); }
.kg-gallery-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: .5rem; }
.kg-gallery-image img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); }
.kg-bookmark-card { border: 1px solid #e0e0e0; border-radius: var(--radius); overflow: hidden; display: flex; }
.kg-bookmark-content { padding: 1rem; flex: 1; }
.kg-bookmark-title { font-weight: 700; }
.kg-bookmark-description { font-size: .9rem; color: var(--text-light); }

.article-footer { margin-top: 3rem; border-top: 1px solid #e0e0e0; padding-top: 2rem; }
.btn-back {
  color: var(--ocean);
  font-weight: 600;
  border: 2px solid var(--ocean);
  padding: .5rem 1.25rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn-back:hover { background: var(--ocean); color: var(--white); }

/* ── MAP PAGE ───────────────────────────────────────────────── */
.map-page { }
.map-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: var(--ocean-deep);
  color: var(--white);
}
.map-header h1 { color: var(--white); margin-bottom: .5rem; }
.map-header p { opacity: .85; }

#route-map {
  width: 100%;
  height: 70vh;
  min-height: 420px;
  background: var(--sky);
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  background: var(--sand);
  font-size: .9rem;
}
.legend-item { display: flex; align-items: center; gap: .5rem; }
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.2);
}
.legend-dot.current  { background: #e74c3c; }
.legend-dot.visited  { background: var(--ocean); }
.legend-dot.planned  { background: var(--text-light); }

.map-posts {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(2px);
}
.map-posts h2 { margin-bottom: 2rem; }

/* ── KOJEN PAGE ─────────────────────────────────────────────── */
.kojen-page { }
.kojen-header {
  text-align: center;
  padding: 4rem 1.5rem 2rem;
  background: var(--ocean-deep);
  color: var(--white);
}
.kojen-header h1 { color: var(--white); margin-bottom: .75rem; }
.kojen-header p { opacity: .85; max-width: 600px; margin: 0 auto; }

.berths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: var(--max-w);
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.berth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.berth-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(13,33,55,.18); }
.berth-icon { font-size: 2rem; }
.berth-name { font-family: var(--font-head); font-size: 1.3rem; color: var(--ocean-deep); }
.berth-desc { color: var(--text-light); font-size: .95rem; flex: 1; }
.berth-capacity { font-size: .85rem; color: var(--ocean); font-weight: 600; }
.btn-book {
  display: block;
  text-align: center;
  padding: .7rem 1.5rem;
  background: var(--ocean);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: background var(--transition);
  width: 100%;
}
.btn-book:hover { background: var(--ocean-deep); color: var(--white); }

/* ── Modal ──────────────────────────────────────────────────── */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,33,55,.7);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--white);
  border-radius: calc(var(--radius) * 2);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  padding: 2.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.modal-close:hover { background: var(--sand); color: var(--text); }
.modal-content h2 { margin-bottom: .25rem; }
.modal-berth-desc { color: var(--text-light); margin-bottom: 1.5rem; font-size: .95rem; }

/* Booking Calendar */
.booking-calendar {
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid #e0e0e0;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--ocean-deep);
  color: var(--white);
}
.cal-nav {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 .5rem;
  line-height: 1;
}
.cal-nav:hover { color: var(--rope); }
.cal-title { font-family: var(--font-head); font-size: 1rem; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--white);
}
.cal-day-label {
  text-align: center;
  padding: .5rem 0;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--sky);
}
.cal-day {
  text-align: center;
  padding: .6rem .25rem;
  font-size: .85rem;
  cursor: default;
  border: 1px solid transparent;
  transition: var(--transition);
}
.cal-day.empty { background: none; }
.cal-day.available { cursor: pointer; }
.cal-day.available:hover { background: var(--sky); border-color: var(--ocean-light); border-radius: var(--radius); }
.cal-day.booked { background: #fde8e8; color: #c0392b; text-decoration: line-through; cursor: not-allowed; }
.cal-day.past { color: #ccc; cursor: not-allowed; }
.cal-day.selected-from,
.cal-day.selected-to { background: var(--ocean); color: var(--white); border-radius: var(--radius); font-weight: 700; }
.cal-day.in-range { background: var(--sky); }

/* Form */
.form-row { display: flex; gap: 1rem; }
.form-row--2 > * { flex: 1; }
.form-group { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .9rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid #d0d7de;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  transition: border-color var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(74,158,202,.2);
}
.form-group textarea { resize: vertical; }
.btn-primary {
  width: 100%;
  padding: .85rem;
  background: var(--ocean);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--transition);
  margin-top: .5rem;
}
.btn-primary:hover { background: var(--ocean-deep); }
.btn-primary:disabled { background: var(--text-light); cursor: not-allowed; }

.form-message {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .95rem;
}
.form-message--error { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6cb; }
.form-message--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* FAQ */
.kojen-faq {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  background: rgba(255,255,255,.88);
  border-radius: var(--radius);
}
.kojen-faq h2 { margin-bottom: 1.5rem; }
details {
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--ocean-deep);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::after { content: '+'; font-size: 1.3rem; color: var(--ocean); }
details[open] summary::after { content: '−'; }
details > p { padding: 0 1.25rem 1.25rem; color: var(--text-light); }
summary::-webkit-details-marker { display: none; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--ocean-deep);
  color: rgba(255,255,255,.75);
  padding: 3rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: .4rem; }
.footer-brand strong { color: var(--white); font-family: var(--font-head); font-size: 1.1rem; }
.footer-brand .logo-anchor { font-size: 1.5rem; }
.footer-brand p { font-size: .9rem; opacity: .75; }
.footer-nav { display: flex; flex-direction: column; gap: .5rem; text-align: right; }
.footer-nav a { color: rgba(255,255,255,.75); font-size: .9rem; transition: color var(--transition); }
.footer-nav a:hover { color: var(--rope); }
.footer-copy {
  grid-column: 1 / -1;
  font-size: .8rem;
  opacity: .5;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

/* ── Error Page ─────────────────────────────────────────────── */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.error-content h1 { font-size: 6rem; color: var(--ocean); }
.error-content p { margin: 1rem 0 2rem; color: var(--text-light); }

/* ── Author / Tag ───────────────────────────────────────────── */
.author-header, .tag-header { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 3rem; }
.author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ocean-deep);
    padding: 1rem 1.5rem;
  }
  .site-nav.open ul { flex-direction: column; gap: 1rem; }
  .nav-toggle { display: flex; }

  .header-inner { position: relative; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { text-align: left; }

  .form-row { flex-direction: column; }
  .modal-content { padding: 1.5rem; }

  .map-legend { flex-wrap: wrap; gap: 1rem; }
  .post-feed { grid-template-columns: 1fr; }
}
