:root {
  --color-bg: #f4f7f5;
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-muted: #636363;
  --color-border: #d9e0dc;
  --color-link: #1f6f93;
  --color-link-hover: #0f3647;
  --color-accent: #28754e;
  --color-accent-soft: #e8f2ec;
  --font: "Open Sans", "Segoe UI", sans-serif;
  --max: 1100px;
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background:
    linear-gradient(180deg, rgba(232, 242, 236, 0.95) 0%, rgba(244, 247, 245, 0.98) 220px, var(--color-bg) 100%),
    url("/assets/img/logo-banner.jpg") repeat-x top left;
  background-size: auto, 311px 83px;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(4px);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 0.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.site-brand:hover {
  text-decoration: none;
}

.site-logo {
  display: block;
  width: 180px;
  height: auto;
  flex-shrink: 0;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  line-height: 1.1;
}

.site-tagline {
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.35;
}

.site-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 0.85rem;
}

.nav-toggle {
  display: none;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.nav-item a {
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-item a:hover,
.nav-item.is-active a {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.content-area {
  flex: 1 1 0;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 2rem;
  animation: fade-up 0.45s ease both;
}

.sidebar {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fade-up 0.55s ease 0.08s both;
}

.sidebar-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.sidebar-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sidebar-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-block li {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
}

.sidebar-block li:last-child {
  margin-bottom: 0;
}

.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
}

.tagcloud a {
  font-size: 0.85rem;
}

.page-header {
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.25;
  color: #222;
}

.page-meta {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--color-muted);
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 1rem;
}

.entry-content h2,
.entry-content h3 {
  margin: 1.4rem 0 0.65rem;
  line-height: 1.3;
  color: #222;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.35rem;
}

.entry-content iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-teaser {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--color-border);
  animation: fade-up 0.4s ease both;
}

.post-teaser:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-teaser h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.post-teaser .post-date {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.post-teaser .post-excerpt {
  margin: 0;
  color: #444;
}

.post-teaser img {
  border-radius: var(--radius);
  margin-bottom: 0.25rem;
}

.archive-title {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
}

.site-footer {
  margin-top: auto;
  background: #1f3d30;
  color: #d7e5dd;
}

.site-footer a {
  color: #fff;
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-brand {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.footer-tagline,
.footer-contact {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.romlicontainer {
  max-width: 100%;
}

.blog-container {
  width: 100%;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-card {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
}

.blog-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
}

.blog-preview p {
  margin: 0;
  color: #555;
}

.full-width .site-main {
  display: block;
}

.full-width .content-area {
  width: 100%;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .site-main {
    flex-direction: column;
  }

  .sidebar {
    flex: 1 1 auto;
    width: 100%;
  }

  .site-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-logo {
    width: 150px;
  }

  .nav-toggle {
    display: inline-block;
    margin-bottom: 0.5rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 0;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-item a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
  }
}
