/* === Root Variables === */
:root {
  --color-bg: #f0ebe4;
  --color-bg-section: #fcf8f5;
  --color-text: #1c1914;
  --color-border: #e2dbd0;
  --color-secondary: #0b7583;
  --color-secondary-hover: #085f6b;
  --color-accent: #0b7583;
  --color-muted: #8a7f72;
  --font-main: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
}

/* === Base Styles === */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.85rem;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

input, textarea, select {
  font-size: 16px;
}

.text-primary {
  color: var(--color-text) !important;
}

.text-turquoise {
  color: var(--color-accent) !important;
}

.text-muted {
  color: var(--color-muted) !important;
}

/* === Typography Elements === */
.form-label,
.form-control,
.form-text,
.card-subtitle,
.card-text,
.btn,
.alert,
.card-title {
  font-size: 0.85rem;
  font-family: inherit;
}

.card-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--color-text);
}

.card-subtitle {
  font-size: 0.83rem;
  color: #4a3f35;
}

.card-text {
  color: #4a3f35;
}

.form-text.small-hint {
  font-size: 0.7rem;
  color: var(--color-muted);
}

/* === Containers === */
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.col {
  scroll-margin-top: 100px;
}

/* === Map Styling === */
#map {
  height: 361px;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.07), 0 8px 24px rgba(0,0,0,.09);
}

.leaflet-container,
.leaflet-container .leaflet-control,
.leaflet-popup-content {
  font-family: inherit;
}

#map .leaflet-control-attribution {
  font-size: 9px;
  line-height: 1.2;
  opacity: 0.75;
}

/* === Cards === */
.card {
  --bs-card-border-radius: 1rem;
  --bs-card-inner-border-radius: calc(1rem - 1px);
  background: var(--color-bg-section);
  border: 1px solid #e2dbd0 !important;
  border-radius: 1rem !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.07), 0 8px 24px rgba(0,0,0,.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0,0,0,.12), 0 20px 48px rgba(0,0,0,.10);
  z-index: 3;
}

.card-img-top {
  object-fit: cover;
  height: 280px;
  width: 100%;
  display: block;
  cursor: pointer;
  border-top-left-radius: calc(1rem - 1px);
  border-top-right-radius: calc(1rem - 1px);
}

@media (max-width: 576px) {
  .card-img-top {
    height: 200px;
  }
}

/* === Form Section === */
.form-section {
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.form-control {
  background: #fff !important;
  border: 1px solid #e2dbd0 !important;
  color: var(--color-text) !important;
  border-radius: 0.5rem !important;
}

.form-control:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(11,117,131,.12) !important;
  background: #fff !important;
}

.form-control::placeholder {
  color: var(--color-muted);
  opacity: 0.65;
}

.form-label {
  color: var(--color-text);
  font-weight: 500;
}

/* === Buttons === */
.btn-secondary-custom {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
  border-radius: 999px !important;
  font-weight: 500;
}

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

/* === Success Message === */
#successMsg {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin-top: 1rem;
}

#successMsg.show {
  opacity: 1;
  pointer-events: auto;
  height: auto;
}

/* === Image Modal === */
#imageModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

#imageModal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
  cursor: pointer;
}

/* === Image Wrapper & Badge === */
.image-wrapper {
  position: relative;
}

.credit-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 0.51rem;
  font-family: var(--font-main);
  color: rgba(255,255,255,0.9);
  padding: 1px 4px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

/* === Fav Button === */
.fav-toggle-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);

}

.fav-toggle-btn i {
  font-size: 1.2rem;
  pointer-events: none;
}

/* === Modals === */
.modal {
  padding: 0.4rem 0.6rem !important;
}

.modal-dialog {
  max-width: 720px !important;
  width: 100% !important;
  margin: 0.4rem auto !important;
  min-height: calc(100% - 0.8rem);
  display: flex;
  align-items: center;
}

.modal-dialog .modal-content {
  width: 100%;
}

.booxly-modal {
  background: var(--color-bg-section) !important;
  color: var(--color-text) !important;
  border: 1px solid #e2dbd0 !important;
  border-radius: 1rem !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-header {
  padding-bottom: 0;
  border-bottom: none !important;
}

.modal-title {
  margin-bottom: 0;
  color: var(--color-text);
}

.modal-body {
  padding-top: 20px;
  color: var(--color-text);
  font-size: 0.88rem;
  line-height: 1.65;
}

.modal-body p,
.modal-body li,
.modal-body address {
  color: var(--color-text);
}

.modal-body strong {
  font-weight: 600;
}

.modal-body a[href^="mailto"] {
  color: #0b7583 !important;
  text-decoration: none;
}

.modal-body a[href^="mailto"]:hover {
  color: #085f6b !important;
  text-decoration: underline;
}

.btn-close {
  filter: none !important;
  opacity: 0.45;
}

.btn-close:hover {
  opacity: 0.9;
}

/* Details/summary (FAQ) */
details {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}

details:last-of-type {
  border-bottom: none;
}

summary {
  cursor: pointer;
  font-weight: 500;
  padding: 8px 0 0;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::after {
  content: '+';
  font-size: 1rem;
  color: var(--color-muted);
}

details[open] summary::after {
  content: '−';
}

details p {
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--color-muted);
}

/* Search results */
#searchResults .list-group-item {
  background: var(--color-bg-section);
  border-color: var(--color-border) !important;
  color: var(--color-text);
  font-size: 0.85rem;
  padding: 10px 14px;
  transition: background 0.12s;
}

#searchResults .list-group-item:hover {
  background: rgba(11,117,131,.08);
}

/* Share links */
.share-links {
  border-top: 1px solid var(--color-border);
  margin-top: 0.65rem;
  padding-top: 0.813rem !important;
  padding-bottom: 0;
  margin-left: 0.1rem;
  margin-right: 0.1rem;
}

.share-links a {
  color: var(--color-text) !important;
  transition: color 0.15s;
}

.share-links a:hover {
  color: var(--color-text) !important;
}

/* Toast */
#successToast {
  background: var(--color-accent) !important;
  border-radius: 1rem !important;
  border: none !important;
  color: #fff !important;
}

/* === Bottom Navigation === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fcf8f5;
  background-color: #fcf8f5;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -1px 0 var(--color-border), 0 -6px 20px rgba(0,0,0,.04);
  z-index: 1050;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 4px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 7px);
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body.is-webapp .bottom-nav {
    padding-bottom: calc(env(safe-area-inset-bottom) + 22px);
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  html {
    background-color: #fcf8f5;
  }
}

.bottom-nav .nav-icon {
  flex-grow: 1;
  text-align: center;
  color: #6b5d4f;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 0;
  transition: color 0.15s;
}

.bottom-nav .nav-icon:hover {
  color: #6b5d4f;
}

.bottom-nav .nav-icon i {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.bottom-nav .nav-icon small {
  font-size: 0.58rem;
  opacity: 0.7;
  line-height: 1;
}

.bottom-nav .nav-icon:focus,
.bottom-nav .nav-icon:focus-visible {
  outline: none;
  box-shadow: none;
}

/* === Lucide SVG Icons === */
.bottom-nav .nav-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  margin-bottom: 6px;
  color: #6b5d4f;
  stroke: currentColor;
}

/* === Branding === */
.brand-logo {
  width: 105px;
  height: 28px;
  display: inline-block;
  margin-left: 0.5rem;
}

/* === Back to top === */
#backToTopBtn {
  background: var(--color-bg-section) !important;
  color: var(--color-text) !important;
  border: 1px solid #e2dbd0 !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: box-shadow 0.15s, transform 0.15s;
}

#backToTopBtn:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* === Easter Egg Message === */
#easterEggMessage {
  display: none;
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-bg-section);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 9999;
  font-size: 0.85rem;
  font-family: var(--font-main);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* === Misc === */
hr {
  border-color: var(--color-border);
  opacity: 1;
}

.alert-warning {
  background: #fdf8ec;
  border-color: #f0d98a;
  color: #7a5c00;
  border-radius: 0.5rem;
}

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

a:hover {
  color: var(--color-secondary-hover);
}

/* Card body bottom padding matches share-links top padding */
.card-body {
  padding-bottom: 0.813rem;
}

/* Extra spacing between cards */
#entries.row {
  --bs-gutter-y: 2rem;
}

/* Modal backdrop blur */
.modal-backdrop {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background-color: rgba(0,0,0,0.65) !important;
  opacity: 1 !important;
}

/* Card distance, in-view text and route link – force dark colors */
.card .text-muted {
  color: #4a3f35 !important;
}

.card .card-subtitle,
.card .card-subtitle a {
  color: #4a3f35 !important;
}

/* Extra space between route/subtitle and description text */
.card .card-subtitle {
  margin-bottom: 0.75rem;
}

/* Desktop only: extra top spacing above logo */
@media (min-width: 768px) {
  h1.mb-1.pt-1 {
    padding-top: 1.5rem !important;
  }
}

/* Desktop only: tagline closer to logo */
@media (min-width: 768px) {
  h1.mb-1 + p.mb-4.text-center {
    margin-top: -0.25rem !important;
    margin-bottom: 1.5rem !important;
  }
}