/* style.css */
:root {
  --bg: #F6F1E9;
  --bg-alt: #EFE6D5;
  --ink: #2A2420;
  --ink-soft: #34302A;
  --ink-border: #4A4238;
  --cream: #FFF8F1;
  --card-bg: #FBF8F3;
  --card-border: #E4DACB;
  --input-border: #D8CBB5;
  --text-body: #443C34;
  --text-muted: #6B6259;
  --text-faint: #9C9284;
  --accent: #2F5D3A;
  --accent-dark: #24492D;
  --accent-soft-bg: #DCE7D6;
  --error: #9A3324;
  --font-serif: 'Spectral', serif;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  nav.site-nav, header.site-header.nav-open nav.site-nav { transition: none; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
input, textarea, select, button { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-serif); margin: 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.container-legal { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-admin { max-width: 640px; margin: 0 auto; padding: 0 24px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--cream);
  border: none;
  border-radius: 6px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-outline {
  background: rgba(255,248,241,0.12);
  color: var(--cream);
  border: 1px solid rgba(255,248,241,0.55);
  border-radius: 8px;
  padding: 14px 26px;
  font-size: 16px;
  font-weight: 600;
}
.btn-outline-ink {
  background: none;
  color: var(--accent-dark);
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}
.btn-outline-ink:hover { background: var(--accent-soft-bg); text-decoration: none; }
.btn-ghost {
  background: none;
  border: none;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-size: 15px;
}
.btn-back {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-label { font-size: 13px; font-weight: 600; color: var(--text-body); display: block; margin-bottom: 6px; }
.field-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  font-size: 15px;
  background: var(--card-bg);
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,241,233,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--card-border);
}
.header-row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-serif); font-size: 21px; font-weight: 600; color: var(--ink); }
.brand-place { font-size: 11px; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
nav.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; flex: 1; }
nav.site-nav a, nav.site-nav button { font-size: 15px; color: var(--ink); font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions select, .header-actions .btn { flex-shrink: 0; }
.header-actions select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23FFF8F1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--cream);
  border: none;
  border-radius: 6px;
  height: 38px;
  padding: 0 34px 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.header-actions select:hover { background-color: var(--accent-dark); }
.header-actions select:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.nav-toggle { display: none; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 1px; transition: transform 0.15s ease, opacity 0.15s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 800px) {
  .header-row { padding: 12px 16px; gap: 10px 12px; }
  .header-actions { order: 1; margin-left: auto; }
  .nav-toggle {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 10px 2px;
  }
  nav.site-nav {
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out, visibility 0s linear 0.3s;
  }
  header.site-header.nav-open nav.site-nav {
    max-height: 340px;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.3s ease-out, opacity 0.25s ease-out 0.05s, visibility 0s;
  }
  nav.site-nav a { font-size: 15px; padding: 12px 2px; border-top: 1px solid var(--card-border); }
  .header-actions .btn { padding: 0 12px; font-size: 14px; }
  .header-actions select { font-size: 14px; padding: 0 30px 0 12px; }
  .brand-name { font-size: 18px; }
}

.hero { position: relative; height: clamp(460px, 78vh, 720px); overflow: hidden; background: var(--ink); }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(24,19,16,0.88) 0%, rgba(24,19,16,0.72) 46%, rgba(24,19,16,0.18) 100%);
}
.hero-content {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-title { font-size: clamp(36px, 6vw, 68px); line-height: 1.08; font-weight: 600; margin: 0 0 18px; color: var(--cream); max-width: 800px; }
.hero-subtitle { font-size: 19px; line-height: 1.6; color: #EFE4D8; margin: 0 0 32px; max-width: 560px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.section { max-width: 1180px; margin: 0 auto; padding: 64px 24px; }
.section-alt { background: var(--bg-alt); padding: 56px 24px; }
.section-dark { background: var(--ink); padding: 64px 24px; }
.section-title { font-size: 30px; font-weight: 600; margin: 0 0 32px; text-align: center; }

.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.hours-row { display: flex; justify-content: space-between; font-size: 15px; color: var(--text-body); border-bottom: 1px solid var(--card-border); padding-bottom: 8px; }

.photo-grid { max-width: 1180px; margin: 0 auto; padding: 12px 24px 64px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.photo-tile { height: 220px; border-radius: 4px; overflow: hidden; background: #EFE8DB; display: flex; align-items: center; justify-content: center; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile-empty { font-size: 13px; color: var(--text-faint); text-align: center; padding: 12px; }

.leader-card {
  box-sizing: border-box; flex: 1 1 260px; min-width: 240px; max-width: 300px;
  background: #FFFFFF; border: 1px solid var(--card-border); border-radius: 4px;
  padding: 28px 20px; text-align: center; display: flex; flex-direction: column;
  align-items: center; justify-content: center; min-height: 200px;
}
.leader-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft-bg);
  color: var(--accent-dark); font-family: var(--font-serif); font-size: 20px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; margin: 0 0 14px;
}

.bank-card { background: var(--ink-soft); border: 1px solid var(--ink-border); border-radius: 4px; padding: 26px; width: 320px; text-align: left; }

footer.site-footer { background: var(--ink); padding: 40px 24px 28px; color: var(--cream); }

.news-card, .legal-section-title { }
.news-card { background: #FFFFFF; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; }
.news-card-body { padding: 20px 24px; min-width: 0; }
.news-date {
  font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--accent-dark); font-weight: 700; margin-bottom: 6px;
}
.news-title { font-size: 20px; margin: 0 0 6px; overflow-wrap: anywhere; }
.news-body { font-size: 15px; line-height: 1.6; color: #504840; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.news-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.news-page { max-width: 780px; margin: 0 auto; padding: 48px 24px 80px; }
.news-page-title { font-size: 32px; margin: 0 0 8px; text-align: center; }
.news-lang-note { font-size: 13px; color: var(--text-faint); text-align: center; margin: 0 0 28px; }
.news-list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.news-teaser { display: flex; align-items: stretch; }
.news-teaser-thumb {
  flex: none; width: 120px; min-height: 120px; object-fit: cover; display: block;
  border-right: 1px solid var(--card-border);
}
.news-teaser .news-card-body { padding: 16px 20px; }
.news-teaser .news-title { font-size: 18px; }
.news-teaser-text {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  white-space: normal;
}

table, .table-scroll { max-width: 100%; overflow-x: auto; }

/* Admin */
.admin-shell { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.admin-toolbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  background: rgba(246,241,233,0.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--card-border);
  margin: 0 -24px; padding: 12px 24px;
}
.admin-toolbar-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; flex: 1; }
.admin-toolbar-actions { display: flex; align-items: center; gap: 14px; }
.admin-toast { color: var(--accent-dark); font-size: 14px; font-weight: 600; }
.admin-error { color: var(--error); font-size: 14px; font-weight: 600; }

.admin-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 440px;
  gap: 28px; align-items: start; padding: 28px 0 80px;
}
.admin-edit { display: flex; flex-direction: column; gap: 22px; max-width: 720px; }
.admin-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px; padding: 24px; }
.admin-card > h2 { font-size: 18px; margin-bottom: 4px; }
.admin-card-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 18px; }
.admin-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-news-item { background: #FFFFFF; border: 1px solid var(--card-border); border-radius: 6px; padding: 14px; }
.admin-news-index {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft-bg); color: var(--accent-dark);
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.admin-remove {
  flex: none; background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 15px; padding: 6px;
}
.admin-remove:hover { color: var(--error); }
.admin-news-media { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.admin-news-media img {
  width: 96px; height: 64px; object-fit: cover; border-radius: 4px;
  border: 1px solid var(--card-border); display: block;
}
.admin-news-media-empty { font-size: 13px; color: var(--text-faint); flex: none; }
.admin-news-media input[type="file"] { font-size: 12px; flex: 1; min-width: 0; }
.admin-add {
  background: none; border: 1px dashed var(--input-border); color: var(--text-muted);
  border-radius: 6px; padding: 11px 16px; cursor: pointer; width: 100%;
  margin-top: 12px; font-size: 14px; font-weight: 500;
}
.admin-add:hover { border-color: var(--accent); color: var(--accent-dark); }
.admin-images-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.admin-image-tile { background: #FFFFFF; border: 1px solid var(--card-border); border-radius: 6px; padding: 12px; }
.admin-image-thumb {
  height: 96px; border-radius: 4px; overflow: hidden; background: #EFE8DB;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 13px; margin-bottom: 8px;
}
.admin-image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-image-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.admin-image-tile input[type="file"] { font-size: 12px; width: 100%; }

.admin-preview-pane { position: sticky; top: 73px; }
.admin-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-preview-toggle { display: inline-flex; background: var(--bg-alt); border-radius: 999px; padding: 3px; gap: 2px; }
.admin-preview-toggle button {
  border: none; background: none; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer;
}
.admin-preview-toggle button.active { background: var(--cream); color: var(--ink); box-shadow: 0 1px 2px rgba(42,36,32,0.12); }
.admin-preview-hint { font-size: 12px; color: var(--text-faint); }
.admin-preview-scroll {
  max-height: calc(100vh - 120px); overflow-y: auto; overflow-x: hidden;
  background: var(--ink); border-radius: 10px; border: 1px solid var(--ink-border); padding: 10px;
}
.admin-preview-frame { overflow: hidden; background: var(--bg); border-radius: 6px; }
.admin-preview-scale { width: 1280px; transform-origin: top left; }
.admin-preview-content { pointer-events: none; }
.admin-preview-content header.site-header { position: static; }

.admin-pin-gate { max-width: 640px; margin: 0 auto; padding: 96px 24px 80px; }

@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-preview-pane { position: static; }
  .admin-preview-scroll { max-height: none; }
  .admin-fields-grid { grid-template-columns: 1fr; }
}
