:root {
  --bg: #f5efe7;
  --panel: #ffffff;
  --panel-soft: #f1ede4;
  --primary: #173452;
  --primary-2: #214669;
  --accent: #d69b45;
  --accent-soft: rgba(214, 155, 69, 0.14);
  --text: #1c2630;
  --muted: #5a6470;
  --border: rgba(28, 38, 48, 0.12);
  --shadow: 0 18px 40px rgba(18, 28, 36, 0.12);
  --success: #1f6c4a;
  --danger: #9c2f2f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(18, 28, 36, 0.05);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 8px 12px;
}

.header-brand {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.15;
}

.header-brand span {
  font-size: 1.16rem;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.header-brand small {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
}

.header-brand:hover span {
  color: #a56a1a;
}

.main-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.main-nav > a,
.nav-item > a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  padding: 10px 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.submenu a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav > a:hover,
.nav-item > a:hover,
.submenu a:hover {
  color: #a56a1a;
  background: var(--accent-soft);
}

.nav-item {
  position: relative;
}

.nav-highlight {
  color: #a56a1a !important;
}

.dropdown .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  display: none;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow);
}

.dropdown:hover .submenu,
.dropdown:focus-within .submenu {
  display: block;
}

.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.hero-banner {
  position: relative;
  isolation: isolate;
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Common-Kestrel-4.jpg/1280px-Common-Kestrel-4.jpg');
  background-size: cover;
  background-position: center 42%;
  min-height: clamp(380px, 48vw, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-banner::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(8, 18, 27, 0.28), rgba(8, 18, 27, 0.58) 52%, rgba(8, 18, 27, 0.24)),
    linear-gradient(0deg, rgba(8, 18, 27, 0.48), transparent 58%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0;
}

.hero-copy {
  max-width: 850px;
  margin: 0 auto;
  color: #fff;
}

.hero-kicker {
  margin: 0 0 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(3rem, 8vw, 6.3rem);
  line-height: 0.96;
  letter-spacing: 0.12em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

.hero-tagline {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.hero-credit {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  background: #fff;
  border-color: var(--border);
  color: var(--primary);
}

.content-shell {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.85fr);
  gap: 28px;
  padding-top: 42px;
  padding-bottom: 60px;
}

.posts-column {
  display: grid;
  gap: 22px;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  color: var(--primary);
}

.news-card,
.panel,
.article-page,
.empty-state,
.info-card,
.featured-post,
.promo-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.news-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.news-card.no-image {
  grid-template-columns: minmax(0, 1fr);
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}

.news-body {
  padding: 26px clamp(22px, 3vw, 36px);
}

.news-card h3 {
  margin: 6px 0 10px;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.news-card h3 a,
.featured-copy h2 a,
.mini-post h3 a {
  text-decoration: none;
  color: var(--primary);
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-body p {
  max-width: 68ch;
  line-height: 1.75;
  text-wrap: pretty;
  margin: 0 0 12px;
  color: var(--text);
}

.read-more {
  display: inline-block;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.promo-card {
  padding: 22px 20px;
}

.promo-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.promo-card h3 {
  margin: 0 0 8px;
  color: var(--primary);
}

.promo-card p {
  margin: 0;
  color: var(--muted);
}

.promo-card a {
  display: inline-block;
  margin-top: 14px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.logo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.logo-row span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 18px 0 0;
  color: var(--muted);
}

.pagination a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.article-page,
.admin-shell,
.form-shell {
  padding: 32px 0 50px;
}

.article-page,
.panel,
.empty-state {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.article-header,
.page-header,
.author-header {
  margin-bottom: 22px;
}

.article-header h1,
.page-header h1,
.author-header h1 {
  color: var(--primary);
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  margin: 8px 0 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.article-content,
.rich-text,
.page-content {
  color: var(--text);
  line-height: 1.8;
}

.article-content p,
.rich-text p,
.page-content p {
  max-width: 72ch;
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

.article-content h2,
.article-content h3,
.rich-text h2,
.rich-text h3,
.page-content h2,
.page-content h3 {
  margin: 1.65em 0 0.55em;
  line-height: 1.3;
}

.article-content img,
.rich-text img,
.page-content img {
  height: auto;
  max-height: 520px;
  margin: 24px auto;
  object-fit: contain;
  border-radius: 14px;
}

.rich-text ul,
.rich-text ol,
.page-content ul,
.page-content ol {
  max-width: 72ch;
  padding-left: 1.4em;
  margin: 0 0 1.4em;
}

.article-footer {
  margin-top: 24px;
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 58px;
}

.page-header {
  max-width: 72ch;
  margin: 0 auto 28px;
}

.page-layout,
.author-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.page-content,
.info-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 22px 12px;
}

.page-content {
  padding: clamp(24px, 4vw, 44px);
  overflow-wrap: anywhere;
}

.page-layout.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
}

.page-content,
.info-card {
  margin-bottom: 16px;
}

.info-card h3 {
  margin-top: 0;
  color: var(--primary);
}

.page-subtitle {
  margin: 12px 0 0;
  font-size: 1.08rem;
  color: var(--muted);
}

.embedded-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  margin-top: 28px;
}

.embed-card {
  min-width: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.embed-card h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  line-height: 1.4;
}

.embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9eef0;
  border-radius: 12px;
}

.embed-frame.map-frame {
  aspect-ratio: 4 / 3;
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.author-shell {
  padding-top: 32px;
  padding-bottom: 40px;
}

.featured-post {
  overflow: hidden;
  margin-bottom: 20px;
}

.featured-post img {
  width: 100%;
  max-height: 290px;
  object-fit: cover;
}

.featured-copy {
  padding: 18px 20px 20px;
}

.featured-copy h2 {
  margin: 8px 0 10px;
}

.author-posts {
  display: grid;
  gap: 14px;
}

.mini-post {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.mini-post h3 {
  margin: 0 0 8px;
}

.empty-state {
  padding: 32px;
  text-align: center;
}

.empty-state-inline {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
}

.flash-stack {
  padding-top: 22px;
}

.flash {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 700;
}

.flash-success {
  background: rgba(31, 108, 74, 0.11);
  color: var(--success);
}

.flash-error,
.flash-danger {
  background: rgba(156, 47, 47, 0.12);
  color: var(--danger);
}

.flash-warning {
  background: rgba(214, 155, 69, 0.12);
  color: #896325;
}

.panel {
  padding: 26px;
}

.panel h1 {
  margin-top: 0;
  color: var(--primary);
}

.form-shell {
  padding-top: 44px;
}

.narrow {
  max-width: 760px;
  margin: 0 auto;
}

.stacked-form {
  display: grid;
  gap: 14px;
}

label {
  display: block;
  font-weight: 700;
  color: var(--primary);
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.textarea.large {
  min-height: 220px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.actions a,
.actions button {
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-help,
.page-editor + small {
  color: var(--muted);
  line-height: 1.6;
}

.admin-help {
  margin: 0 0 20px;
}

.page-editor {
  min-height: 360px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
}

.page-editor-group {
  display: grid;
  gap: 12px;
}

.sidebar-editor {
  min-height: 220px;
}

.rich-editor {
  min-height: 360px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.rich-editor:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rich-editor:empty::before {
  color: var(--muted);
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  border-radius: 10px;
}

.rich-editor figure {
  margin: 18px 0;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-toolbar button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
}

.editor-toolbar button:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.embed-editor {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.embed-editor legend {
  padding: 0 8px;
  color: var(--primary);
  font-weight: 700;
}

.embed-editor .admin-help {
  margin: 0;
}

.embed-editor-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(170px, 0.8fr) minmax(220px, 2fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.embed-editor-row label {
  display: grid;
  gap: 6px;
}

.embed-editor-row .button {
  white-space: nowrap;
}

.field-error {
  color: var(--danger);
  margin: -8px 0 2px;
  font-size: 0.88rem;
}

small {
  color: var(--muted);
}

.inline-form {
  display: inline;
}

.site-footer {
  background: #122c42;
  color: rgba(255, 255, 255, 0.76);
  padding: 28px 0 18px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.footer-inner p {
  margin: 0;
  font-size: 0.88rem;
}

.footer-admin,
.photo-credit a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-admin {
  font-size: 0.82rem;
}

.photo-credit {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.74rem;
}

@media (max-width: 900px) {
  .content-shell,
  .page-layout,
  .author-layout {
    grid-template-columns: 1fr;
  }

  .embed-editor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    align-items: center;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    padding: 10px 8px 8px;
  }

  .header-brand {
    text-align: center;
  }

  .header-brand span {
    font-size: 1.05rem;
  }

  .header-brand small {
    font-size: 0.64rem;
  }

  .main-nav {
    justify-content: center;
    gap: 4px;
    font-size: 0.74rem;
  }

  .main-nav > a,
  .nav-item > a {
    padding: 8px;
  }

  .hero-banner {
    min-height: 360px;
  }

  .hero-copy h1 {
    font-size: clamp(1.8rem, 10vw, 3rem);
    letter-spacing: 0.02em;
  }

  .hero-credit {
    right: 10px;
    left: 10px;
    text-align: right;
  }

  .content-shell {
    padding-top: 30px;
  }

  .news-body {
    padding: 22px 20px 24px;
  }

  .page-shell {
    width: min(100% - 24px, 1100px);
    padding-top: 30px;
    padding-bottom: 40px;
  }

  .page-content {
    padding: 22px;
  }

  .article-page,
  .panel,
  .empty-state {
    width: min(100% - 24px, 1100px);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .embed-editor-row {
    grid-template-columns: 1fr;
  }
}
