/* Global reset & base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}


:root {
  --color-bg: #ffffff;
  --color-primary: #2d6a4f;
  --color-primary-dark: #1b4332;
  --color-text: #333333;
  --color-text-muted: #666666;
  --color-border: #e0e0e0;
  --color-surface: #f8f9fa;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --font-sans: 'Montserrat', sans-serif;
  --container-width: 1200px;
  --sidebar-width: 320px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

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

ul {
  list-style: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

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

/* Top bar */
.top-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.top-bar-inner {
  padding: 0.5rem 1.25rem;
}

/* Header */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  gap: 1rem;
}

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

.logo-link {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: space-around;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.nav-list a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.25rem 0;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-primary);
}

.nav-search {
  display: flex;
  gap: 0.5rem;
}

.nav-search input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  min-width: 140px;
}

.nav-search button,
.sidebar-search button,
.contact-form button,
.comment-form button {
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
   font-family: var(--font-sans);
}

.nav-search button:hover,
.sidebar-search button:hover,
.contact-form button:hover,
.comment-form button:hover {
  background: var(--color-primary-dark);
}

/* Main layout */
.site-main {
  min-height: 60vh;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2.5rem;
  padding: 2rem 15px 3rem;
  align-items: start;
}

.content-area {
  min-width: 0;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

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

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.sidebar-search form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-search input {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.recent-posts-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.recent-posts-list li:last-child {
  border-bottom: none;
}

.recent-posts-list a {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.4;
}

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

.categories-list li {
  padding: 0.375rem 0;
}

.categories-list a {
  display: flex;
  justify-content: space-between;
  color: var(--color-text);
  font-size: 0.9375rem;
}

.cat-count {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Ad slots */
.ad-slot {
  margin: 15px -5px;
  padding: 5px;
  border: 1px dashed var(--color-border);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ad-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.5;
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: grid;
  place-items: center;
  gap: 1.3rem;
  text-align: center;
}

.footer-logo {
  height: 36px;
  width: auto;
  margin: 0 auto 0.75rem;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: 0.9375rem;
  color: #999;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
}

.footer-nav a {
  color: #ccc;
  font-size: 0.9375rem;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy,
.footer-powered {
  font-size: 0.875rem;
  color: #777;
}

/* Responsive */
@media (max-width: 992px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    display: none;
    box-shadow: var(--shadow);
  }

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

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    flex: 1;
    min-width: 0;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }
}