/* Marczyce Village Styles */

:root {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-dark: #1b4332;
  --bg: #f8faf9;
  --surface: #ffffff;
  --surface-alt: #e8f5e9;
  --text: #52796f;
  --text-h: #1b4332;
  --border: #d8e8d4;
  --accent: #95d5b2;
}

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

body {
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---- Site Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #3ce496;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo-link {
  display: flex;
  align-items: center;
}

.site-header .site-logo {
  height: 48px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  border: none;
  padding: 0;
  margin: 0;
}

.site-header nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  margin: 0;
}

.site-header nav a:hover {
  color: rgba(0, 0, 0, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
}

/* ---- Hero ---- */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 100%);
  padding: 4rem 2rem 0;
  overflow: hidden;
  text-align: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--primary-dark);
  margin: 0 0 0.5rem;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--primary-light);
  font-weight: 400;
}

/* ---- Mountains ---- */

.mountains {
  position: relative;
  height: 180px;
  width: 100%;
}

.mountain-layer {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
}

.mountain-back {
  height: 140px;
  background: var(--accent);
  opacity: 0.6;
  clip-path: polygon(
    0% 100%, 0% 65%, 5% 45%, 12% 30%, 18% 15%, 24% 28%, 30% 40%,
    35% 25%, 42% 10%, 48% 22%, 55% 35%, 60% 20%, 65% 8%, 72% 25%,
    78% 38%, 83% 22%, 88% 12%, 93% 30%, 97% 45%, 100% 55%, 100% 100%
  );
}

.mountain-mid {
  height: 120px;
  background: var(--primary-light);
  opacity: 0.5;
  clip-path: polygon(
    0% 100%, 0% 70%, 4% 55%, 10% 40%, 16% 50%, 22% 35%, 28% 22%,
    34% 38%, 40% 50%, 46% 32%, 52% 18%, 58% 30%, 64% 45%, 70% 28%,
    76% 15%, 82% 32%, 88% 48%, 94% 35%, 100% 50%, 100% 100%
  );
}

.mountain-front {
  height: 90px;
  background: var(--primary);
  opacity: 0.4;
  clip-path: polygon(
    0% 100%, 0% 60%, 6% 50%, 12% 55%, 20% 40%, 28% 50%, 36% 35%,
    44% 45%, 52% 55%, 60% 40%, 68% 50%, 76% 38%, 84% 48%, 92% 55%,
    100% 45%, 100% 100%
  );
}

.trees {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0 5%;
  z-index: 1;
}

.tree {
  display: inline-block;
  width: 20px;
  height: 28px;
  background: var(--primary);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  opacity: 0.45;
}

.tree-sm {
  width: 14px;
  height: 20px;
  opacity: 0.3;
}

/* ---- Main Content ---- */

.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.main-content > h1 {
  color: var(--text-h);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* ---- Headings ---- */

h1, h2, h3 {
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  color: var(--text-h);
  line-height: 1.2;
}

h1 { font-size: 2.5rem; letter-spacing: -0.5px; }
h2 { font-size: 1.5rem; }

/* ---- Links ---- */

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ---- Article List ---- */

.article-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 0;
}

.article-list li {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  box-shadow: rgba(45, 106, 79, 0.08) 0 4px 12px, rgba(0, 0, 0, 0.04) 0 2px 4px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.article-list li:hover {
  box-shadow: rgba(45, 106, 79, 0.14) 0 8px 24px, rgba(0, 0, 0, 0.06) 0 4px 8px;
  transform: translateY(-2px);
}

.article-list a {
  color: var(--text-h);
  text-decoration: none;
}

.article-list a:hover {
  color: var(--primary);
}

.article-list h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

time {
  color: var(--text);
  font-size: 0.85rem;
}

.author {
  color: var(--text);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.excerpt {
  color: var(--text);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ---- Layout with navigation sidebar ---- */

.layout-with-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.layout-with-nav main {
  flex: 1;
  min-width: 0;
}

/* ---- Article Navigation Sidebar ---- */

.article-nav {
  width: 250px;
  flex-shrink: 0;
  border-right: 2px solid var(--border);
  padding-right: 1rem;
}

.article-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-nav ul ul {
  padding-left: 1rem;
}

.article-nav li {
  margin: 0.25rem 0;
}

.article-nav li a {
  color: var(--primary);
  text-decoration: none;
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.article-nav li a:hover {
  background: var(--surface-alt);
}

.article-nav li.active > a {
  background: var(--surface-alt);
  font-weight: 600;
  color: var(--primary-dark);
  border-left: 3px solid var(--primary);
}

.article-nav .nav-label {
  color: var(--text);
  display: block;
  padding: 0.3rem 0.5rem;
  font-style: italic;
  font-size: 0.9rem;
}

/* ---- Breadcrumbs ---- */

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 1rem;
  padding: 0;
  border: none;
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary-light);
}

.breadcrumbs span {
  color: var(--text-h);
}

/* ---- Article Content ---- */

.content {
  margin-top: 1.5rem;
  line-height: 1.75;
}

.content h1, .content h2, .content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.content p {
  margin-bottom: 1rem;
}

.content ul, .content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.content code {
  background: var(--surface-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: ui-monospace, Consolas, monospace;
}

.content pre {
  background: var(--surface-alt);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
}

.content pre code {
  background: none;
  padding: 0;
}

.content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

.content th, .content td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
}

.content th {
  background: var(--surface-alt);
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}

/* ---- Comments ---- */

.comments {
  margin-top: 2.5rem;
  background: var(--surface);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: rgba(45, 106, 79, 0.06) 0 2px 8px;
}

.comments h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 500;
}

.comment {
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: transparent;
}

.comment-author {
  font-weight: 600;
  color: var(--text-h);
  font-size: 0.85rem;
  display: inline;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text);
  opacity: 0.7;
  display: inline;
  margin-left: 0.5rem;
}

.comment-content {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  color: var(--text);
}

/* ---- Comment Form ---- */

.comment-form {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  max-width: 480px;
}

.comment-form label {
  display: block;
  margin-bottom: 0.2rem;
  margin-top: 0.6rem;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.5rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-family: inherit;
  font-size: 0.9rem;
  background: transparent;
  color: var(--text-h);
  transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

.comment-form textarea {
  min-height: 60px;
  resize: vertical;
}

.comment-form button {
  margin-top: 0.75rem;
  padding: 0.4rem 1.2rem;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.comment-form button:hover {
  background: var(--primary);
  color: white;
}

.comment-form button:disabled {
  border-color: var(--border);
  color: var(--text);
  cursor: not-allowed;
}

/* ---- Footer ---- */

.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Legacy footer fallback */
footer:not(.site-footer) {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  text-align: center;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  body { font-size: 16px; }

  .hero h1 { font-size: 2.4rem; }

  .mountains { height: 120px; }
  .mountain-back { height: 100px; }
  .mountain-mid { height: 80px; }
  .mountain-front { height: 60px; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.25rem; }

  .article-list {
    grid-template-columns: 1fr;
  }

  .layout-with-nav {
    flex-direction: column;
    padding: 1rem;
  }

  .article-nav {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--border);
    padding-right: 0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .header-inner {
    padding: 0.5rem 1rem;
  }

  .main-content {
    padding: 2rem 1rem;
  }
}
