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

:root {
  --bg:           #f5f4f0;
  --surface:      #ffffff;
  --primary:      #1a2332;
  --accent:       #c8a96e;
  --accent-light: #fdf5e8;
  --accent-dark:  #a8883e;
  --text:         #2d3748;
  --text-muted:   #718096;
  --border:       #e8e4db;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.07);
  --shadow:       0 2px 14px rgba(0,0,0,.09);
  --radius:       14px;
  --radius-sm:    8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }

/* ── password screen ───────────────────────────────── */
.pw-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2332 0%, #2d3f57 100%);
  padding: 1rem;
}

.pw-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.pw-logo {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: .5rem;
}

.pw-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .25rem;
}

.pw-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 1.75rem;
}

.pw-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.pw-input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.pw-input:focus { border-color: var(--accent); }

.pw-btn {
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: .95rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.pw-btn:hover { background: var(--accent-dark); color: #fff; }
.pw-btn:active { transform: scale(.98); }

.pw-error {
  color: #e53e3e;
  font-size: .85rem;
  margin-top: .5rem;
}

.pw-lang {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.5rem;
}

/* shake animation */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
.shake { animation: shake .5s ease; }

/* ── header ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.site-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  white-space: nowrap;
}

.lang-switcher {
  display: flex;
  gap: .35rem;
}

/* shared lang button style */
.lang-btn {
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary);
}

/* nav scrollable row */
.site-nav {
  display: flex;
  overflow-x: auto;
  gap: .15rem;
  padding: .4rem 1rem .5rem;
  max-width: 900px;
  margin: 0 auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-link {
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: .3rem .65rem;
  border-radius: 20px;
  transition: all .15s;
  text-decoration: none;
}
.nav-link:hover { color: var(--primary); background: var(--accent-light); text-decoration: none; }
.nav-link.active { color: var(--primary); background: var(--accent-light); font-weight: 600; }

/* ── main layout ───────────────────────────────────── */
.main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── section card ──────────────────────────────────── */
.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--accent-light);
}

/* ── subsection ────────────────────────────────────── */
.subsection h3,
.info-item h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .35rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── info boxes ────────────────────────────────────── */
.info-box {
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-size: .9rem;
  line-height: 1.6;
}
.info-box--warn {
  background: #fff8e1;
  border-left: 3px solid #f6c944;
}
.info-box--blue {
  background: #ebf4ff;
  border-left: 3px solid #63b3ed;
}
.info-box--green {
  background: #f0fff4;
  border-left: 3px solid #68d391;
}
.info-box--red {
  background: #fff5f5;
  border-left: 3px solid #fc8181;
}

/* ── address block ─────────────────────────────────── */
.address-block {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.address-main {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
}
.address-floor {
  color: var(--text-muted);
  font-size: .9rem;
}

.maps-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

/* ── buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .15s;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary);
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }

/* ── photo placeholder ─────────────────────────────── */
.photo-placeholder {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .9rem;
}
.photo-placeholder.small { height: 110px; }

/* ── info grid (2-col) ─────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) { .info-grid { grid-template-columns: 1fr; } }

/* ── HA block ──────────────────────────────────────── */
.ha-block {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.ha-url {
  font-family: monospace;
  font-size: .9rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: .35rem .65rem;
  border-radius: 6px;
  display: inline-block;
  word-break: break-all;
}
.app-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ── calendar placeholder ──────────────────────────── */
.calendar-placeholder {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── WiFi block ────────────────────────────────────── */
.wifi-block {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.wifi-info {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.wifi-row {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.wifi-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.wifi-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  font-family: "Inter", monospace;
  word-break: break-all;
}
.wifi-pw-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.copy-btn {
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 6px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  cursor: pointer;
  transition: all .15s;
}
.copy-btn:hover { background: var(--accent); color: var(--primary); }

.wifi-qr-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.wifi-qr-label {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 500;
}
#qr-code {
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
#qr-code img, #qr-code canvas { display: block; }

/* ── misc grid ─────────────────────────────────────── */
.misc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) { .misc-grid { grid-template-columns: 1fr; } }

.misc-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
}
.misc-item h3 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .3rem;
}
.misc-item p { font-size: .87rem; color: var(--text); }

/* ── poi cards (restaurants, sports) ──────────────── */
.poi-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.poi-card {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
}
.poi-emoji {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: .1rem;
}
.poi-body { flex: 1; }
.poi-body strong { font-size: .93rem; color: var(--primary); display: block; margin-bottom: .15rem; }
.poi-body p { font-size: .85rem; color: var(--text-muted); margin: 0; }
.poi-map {
  font-size: 1.2rem;
  flex-shrink: 0;
  align-self: center;
  text-decoration: none;
  opacity: .7;
  transition: opacity .15s;
}
.poi-map:hover { opacity: 1; }

/* ── checklist ─────────────────────────────────────── */
.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.reset-btn {
  font-size: .8rem;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .25rem .65rem;
  cursor: pointer;
  transition: all .15s;
}
.reset-btn:hover { border-color: var(--accent); color: var(--accent-dark); }

.check-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
  margin-bottom: .4rem;
}
.check-item:hover { background: var(--accent-light); }
.check-input { display: none; }
.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.check-input:checked ~ .check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.check-input:checked ~ .check-box::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid var(--primary);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.check-input:checked ~ .check-label {
  text-decoration: line-through;
  color: var(--text-muted);
}
.check-label { font-size: .9rem; }

/* ── footer ────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
  max-width: 860px;
  margin: 0 auto;
}
.site-footer p + p { margin-top: .25rem; }

/* ── subsections ───────────────────────────────────── */
.subsections {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

/* ── section photos ────────────────────────────────── */
.section-photo {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg);
  cursor: zoom-in;
  transition: opacity .15s;
}
.section-photo:hover { opacity: .9; }
.section-photo.small {
  max-height: 200px;
  object-position: center;
}

/* ── lightbox ───────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(95vw, 900px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
  background: none;
  border: none;
  transition: opacity .15s;
}
.lightbox-close:hover { opacity: 1; }

/* ── whatsapp link ─────────────────────────────────── */
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #25d366;
  font-weight: 600;
  text-decoration: none;
}
.whatsapp-link:hover { text-decoration: underline; }

/* ── logout link ───────────────────────────────────── */
.logout-link {
  font-size: .75rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  transition: color .15s;
}
.logout-link:hover { color: #e53e3e; text-decoration: none; }

/* ── greeting bar ──────────────────────────────────── */
.greeting-bar {
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.greeting-bar strong { color: var(--text); }

/* ── level-2 badge ─────────────────────────────────── */
.level2-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  background: #fed7e2;
  color: #97266d;
  border-radius: 10px;
  padding: .1rem .5rem;
  vertical-align: middle;
  margin-left: .4rem;
  letter-spacing: .03em;
}

/* ── calendar iframe ───────────────────────────────── */
.calendar-frame {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: var(--radius-sm);
  display: block;
}

/* ── responsive ────────────────────────────────────── */
@media (max-width: 600px) {
  .section-card { padding: 1.25rem 1rem; }
  .section-title { font-size: 1.1rem; }
  .misc-grid { grid-template-columns: 1fr; }
}
