:root {
  --ink: #17232f;
  --muted: #607080;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --navy: #0f2d3d;
  --teal: #0f766e;
  --coral: #c84c31;
  --gold: #d6a13d;
  --border: #dde3e1;
  --shadow: 0 18px 42px rgba(15, 45, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 44px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand,
.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  color: var(--navy);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: url("/uploads/lumora-logo.svg") center / cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.main-nav a {
  color: #34495a;
  font-weight: 700;
  padding: 8px 2px;
}

.main-nav a:hover {
  color: var(--coral);
}

.language-switcher {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.language-button {
  min-width: 42px;
  min-height: 34px;
  border: 0;
  color: var(--navy);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.language-button.active {
  color: #fff;
  background: var(--teal);
}

.hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(15, 45, 61, 0.92), rgba(15, 118, 110, 0.72)),
    url("/uploads/main-hero.svg") center / cover;
}

.hero-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0 92px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow,
.admin-hero .eyebrow {
  color: #ffd27b;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
}

.content-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 48px auto 84px;
}

.post-form,
.admin-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-box,
.post-form label {
  display: grid;
  gap: 8px;
  color: #34495a;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cad5d3;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  border-color: var(--teal);
}

.editor-shell {
  overflow: hidden;
  border: 1px solid #cad5d3;
  border-radius: 6px;
  background: #fff;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f3f7f6;
  border-bottom: 1px solid var(--border);
}

.editor-button,
.editor-select {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  font-weight: 900;
}

.editor-button {
  min-width: 38px;
  padding: 0 12px;
  cursor: pointer;
}

.editor-select {
  width: auto;
  padding: 0 10px;
}

.image-size-control {
  display: inline-grid;
  grid-template-columns: auto 120px 42px;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 900;
}

.image-size-control input {
  width: 120px;
  padding: 0;
}

.image-size-control output {
  color: var(--muted);
}

.rich-editor {
  min-height: 260px;
  padding: 16px;
  color: var(--ink);
  font-weight: 500;
  outline: 0;
}

.rich-editor:focus {
  box-shadow: inset 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.rich-editor img {
  display: block;
  max-width: 100%;
  margin: 16px 0;
  border-radius: 8px;
}

.rich-editor img.selected-editor-image {
  outline: 3px solid rgba(15, 118, 110, 0.45);
  outline-offset: 3px;
}

.rich-editor .editor-image,
.rich-content .editor-image {
  display: block;
  height: auto;
  border-radius: 8px;
}

.rich-editor .image-align-left,
.rich-content .image-align-left {
  margin-left: 0;
  margin-right: auto;
}

.rich-editor .image-align-center,
.rich-content .image-align-center {
  margin-left: auto;
  margin-right: auto;
}

.rich-editor .image-align-right,
.rich-content .image-align-right {
  margin-left: auto;
  margin-right: 0;
}

.rich-editor .image-size-small,
.rich-content .image-size-small {
  width: 50%;
  max-width: 100%;
}

.rich-editor .image-size-medium,
.rich-content .image-size-medium {
  width: 100%;
  max-width: 100%;
}

.rich-editor .image-size-large,
.rich-content .image-size-large {
  width: 75%;
  max-width: 100%;
}

.rich-editor .image-size-full,
.rich-content .image-size-full {
  width: 100%;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.section-heading.compact h2 {
  font-size: 1.55rem;
}

.admin-link,
.primary-button,
.ghost-button,
.delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}

.admin-link,
.primary-button {
  border: 0;
  color: #fff;
  background: var(--coral);
  padding: 0 18px;
}

.admin-link:hover,
.primary-button:hover {
  background: #a93e28;
}

.admin-link.light {
  background: #fff;
  color: var(--navy);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.bottom-search {
  margin-top: 34px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 45, 61, 0.1);
}

.post-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 45, 61, 0.1);
}

.post-card img {
  width: 100%;
  aspect-ratio: 1.56;
  object-fit: cover;
  background: #dce5e2;
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.post-type {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-date {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-card h3 {
  margin: 10px 0;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.18;
}

.post-card p {
  margin: 0 0 18px;
  color: #50606d;
}

.read-more {
  margin-top: auto;
  color: var(--coral);
  font-weight: 900;
}

.admin-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 54px max(24px, calc((100vw - 1180px) / 2));
  color: #fff;
  background:
    linear-gradient(90deg, rgba(15, 45, 61, 0.96), rgba(200, 76, 49, 0.76)),
    url("/uploads/admin-hero.svg") center / cover;
}

.admin-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 28px;
  width: min(1180px, calc(100% - 48px));
  margin: 42px auto 84px;
  align-items: start;
}

.post-form,
.admin-list {
  padding: 24px;
}

.post-form {
  display: grid;
  gap: 18px;
}

.post-form h2 {
  margin: 0;
  color: var(--navy);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.admin-post h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1rem;
}

.admin-post p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.language-status,
.language-badge {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.language-status {
  padding: 12px 14px;
  background: #f3f7f6;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.save-progress {
  padding: 12px 14px;
  color: var(--navy);
  background: #fff7e6;
  border: 1px solid rgba(214, 161, 61, 0.55);
  border-radius: 6px;
  font-weight: 900;
}

.language-badge {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 8px;
  color: var(--teal);
  background: #eef8f6;
  border-radius: 999px;
}

.ghost-button {
  border: 1px solid var(--border);
  color: var(--navy);
  background: #fff;
  padding: 0 14px;
}

.form-actions,
.admin-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.delete-button {
  border: 0;
  color: #fff;
  background: #7f2632;
  padding: 0 12px;
}

.hidden {
  display: none;
}

.post-detail {
  width: min(920px, calc(100% - 48px));
  margin: 44px auto 86px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.detail-body {
  padding: clamp(24px, 5vw, 54px);
}

.detail-body h1 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 4rem);
}

.detail-body .post-type {
  display: inline-block;
  margin-bottom: 14px;
}

.detail-meta {
  margin: 18px 0 24px;
  color: var(--muted);
  font-weight: 700;
}

.detail-body p {
  color: #34495a;
  font-size: 1.08rem;
}

.rich-content h2,
.rich-content h3 {
  color: var(--navy);
  line-height: 1.16;
}

.rich-content h2 {
  margin: 30px 0 14px;
  font-size: 1.85rem;
}

.rich-content h3 {
  margin: 24px 0 12px;
  font-size: 1.35rem;
}

.rich-content ul,
.rich-content ol {
  padding-left: 24px;
  color: #34495a;
  font-size: 1.08rem;
}

.rich-content img {
  display: block;
  max-width: 100%;
  margin-top: 24px;
  margin-bottom: 24px;
  border-radius: 8px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--coral);
  font-weight: 900;
}

.detail-back-link {
  margin: 18px 24px;
}

.empty-state {
  padding: 42px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 44px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--navy);
}

.site-footer div,
.footer-meta {
  display: grid;
  gap: 6px;
}

.footer-meta {
  text-align: right;
}

.footer-meta a {
  color: #ffd27b;
  font-weight: 800;
}

@media (max-width: 940px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .site-header,
  .admin-hero,
  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding: 18px 24px;
  }

  .footer-meta {
    text-align: left;
  }

  .hero-inner {
    padding: 64px 0 72px;
  }

  .content-shell,
  .admin-shell,
  .hero-inner,
  .post-detail {
    width: min(100% - 32px, 1180px);
  }

  .posts-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
