:root {
  --color-bg: #f7f5f0;
  --color-bg-alt: #ebe6dc;
  --color-surface: #ffffff;
  --color-text: #1c2419;
  --color-text-muted: #5c6658;
  --color-accent: #2d5a3d;
  --color-accent-dark: #1e3d29;
  --color-accent-light: #4a7c59;
  --color-gold: #b8956a;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(28, 36, 25, 0.08);
  --radius: 12px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

html.is-standalone .site-header {
  padding-top: env(safe-area-inset-top);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-dark);
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 90, 61, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  height: var(--header-h);
  padding: 0 clamp(1rem, 4vw, 2rem);
  max-width: 1200px;
  margin-inline: auto;
  width: 100%;
}

/* Top menu row: nav links + language icons (right-aligned) */
.nav-menu-line {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.75rem;
  min-width: 0;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a.nav-active {
  color: var(--color-accent);
  font-weight: 600;
}

/* Language switcher — far right on the main menu line */
.lang-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: 0;
}

.lang-btn {
  border: 2px solid transparent;
  background: none;
  padding: 0.2rem;
  cursor: pointer;
  border-radius: 6px;
  line-height: 0;
}

.lang-btn:hover {
  background: rgba(45, 90, 61, 0.1);
}

.lang-btn.lang-btn-active {
  border-color: var(--color-accent);
  background: rgba(45, 90, 61, 0.12);
}

.lang-icon {
  width: 32px;
  height: 32px;
  display: block;
}

@media (max-width: 768px) {
  .nav-menu-line {
    justify-content: flex-end;
  }
}

.page-main {
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 3rem;
}

.btn-nav {
  background: var(--color-accent);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.btn-nav:hover {
  background: var(--color-accent-dark);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--header-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-accent-dark);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 32, 22, 0.88) 0%,
    rgba(20, 32, 22, 0.4) 45%,
    rgba(20, 32, 22, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 0 5rem;
  color: #fff;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 42ch;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

.hero-stats span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-stats strong {
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-text);
  border-color: var(--color-gold);
}

.btn-primary:hover {
  background: #a68458;
  border-color: #a68458;
  color: var(--color-text);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-secondary.dark {
  color: var(--color-text);
  border-color: var(--color-accent);
}

.btn-secondary.dark:hover {
  color: #fff;
  background: var(--color-accent);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: 2rem;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 50ch;
  margin: -1rem 0 2rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
  min-height: 320px;
}

@media (max-width: 640px) {
  .gallery-item:first-child {
    grid-column: span 1;
    grid-row: span 1;
    min-height: auto;
  }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.desc-block {
  margin-bottom: 2.5rem;
}

.desc-block h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.desc-block p,
.desc-block li {
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.desc-block ul {
  padding-left: 1.25rem;
}

.desc-body {
  white-space: pre-line;
}

.info-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.info-card.highlight {
  background: var(--color-accent-dark);
  color: #fff;
}

.info-card.highlight h3,
.info-card.highlight p {
  color: rgba(255, 255, 255, 0.85);
}

.info-card.highlight .btn-primary {
  margin-top: 1rem;
}

.info-card .btn-block + .btn-block {
  margin-top: 0.5rem;
}

.muted {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.info-card.highlight .muted {
  color: rgba(255, 255, 255, 0.65);
}

/* Amenities */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.amenity-category h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-gold);
}

.amenity-category ul {
  list-style: none;
}

.amenity-category li {
  padding: 0.35rem 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.amenity-category li::before {
  content: '✓';
  color: var(--color-accent-light);
  margin-right: 0.5rem;
  font-weight: 600;
}

/* Location */
.location-content .desc-block {
  max-width: 720px;
}

/* CTA */
.cta {
  background: var(--color-accent-dark);
  color: #fff;
  text-align: center;
}

.cta-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.cta-inner p {
  opacity: 0.85;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(45, 90, 61, 0.12);
}

.auth-page {
  padding-top: calc(var(--header-h) + 2rem);
}

.auth-container {
  max-width: 520px;
}

.auth-panel label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

.auth-switch {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--color-accent-dark);
}

.form-message.error {
  color: #b00020;
}

.reservation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.booking-item,
.board-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid #e2e8de;
}

.board-content-wrap {
  display: grid;
  gap: 0;
}

.board-content-wrap.hidden {
  display: none !important;
}

.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* PWA install prompt (Android / Chrome) */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  background: var(--color-accent-dark);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.pwa-install-banner p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pwa-install-banner .btn-secondary.dark {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.status-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: capitalize;
  background: #e8efe9;
  color: var(--color-accent-dark);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

.stack input,
.stack textarea,
.stack button {
  font: inherit;
}

.stack input,
.stack textarea {
  border: 1px solid #d2d8cf;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  background: #fff;
}

.stack textarea {
  min-height: 120px;
}

.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

.mt {
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.airbnb-link {
  display: none !important;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 16, 12, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.25rem;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Loading / error */
.loading-screen,
.error-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.error-screen.hidden,
.loading-screen.hidden {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-bg-alt);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(45, 90, 61, 0.1);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-admin .nav-submenu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 0.75rem;
    margin-top: 0.25rem;
  }
}

/* Admin nav dropdown */
.nav-admin {
  position: relative;
}

.nav-admin-toggle {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-accent);
}

.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 220px;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid rgba(45, 90, 61, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  z-index: 120;
}

.nav-admin:hover .nav-submenu,
.nav-admin.open .nav-submenu {
  display: block;
}

.nav-submenu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.nav-submenu a:hover {
  background: rgba(45, 90, 61, 0.08);
}

/* Admin pages */
.admin-page {
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 5rem;
  min-height: 70vh;
}

.admin-page .container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.admin-photo-card {
  position: relative;
  border: 2px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: grab;
  background: var(--color-bg-alt);
  aspect-ratio: 4 / 3;
}

.admin-photo-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.admin-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-photo-card .admin-drag-hint {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.admin-fab {
  position: fixed;
  left: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1rem, 4vw, 2rem);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--color-accent);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(30, 61, 41, 0.35);
  z-index: 90;
}

.admin-fab:hover {
  background: var(--color-accent-dark);
}

.admin-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 20, 14, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-photo-modal.hidden {
  display: none;
}

.admin-photo-modal-inner {
  position: relative;
  max-width: min(900px, 92vw);
  max-height: 85vh;
}

.admin-photo-modal-inner img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.admin-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.admin-delete-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #b33;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.admin-delete-btn svg {
  width: 22px;
  height: 22px;
}

.admin-message-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.admin-message-item {
  text-align: left;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(45, 90, 61, 0.15);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}

.admin-message-item:hover {
  border-color: var(--color-accent);
}

.admin-message-item.active {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.admin-message-detail {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid rgba(45, 90, 61, 0.12);
}

.admin-mod-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.admin-mod-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.admin-mod-btn.approve {
  background: var(--color-accent);
  color: #fff;
}

.admin-mod-btn.reject {
  background: #8b3a3a;
  color: #fff;
}

.admin-status-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.admin-status-msg.error {
  color: #8b3a3a;
}
