:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1c231d;
  --muted: #4d5b4f;
  --accent: #2f7a4d;
  --accent-dark: #235e3b;
  --border: #dde3dc;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding-top: 5px;
  background: var(--surface);
}

.logo {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-img{
  width: 190px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-icon {
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.search-icon:hover {
  color: var(--accent);
  background: var(--bg);
}

.search-page {
  padding: 48px 16px 72px;
}

.search-page h1 {
  font-size: 2.4rem;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}

.search-form {
  display: flex;
  gap: 12px;
  max-width: 560px;
  margin-bottom: 40px;
}

.search-form input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
}

.search-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-form button {
  padding: 12px 22px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.search-form button:hover {
  background: var(--accent-dark);
}

.no-results {
  color: var(--muted);
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 32px 0 56px;
}

@media (min-width: 641px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    padding: 40px 0 64px;
  }
}

@media (min-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding: 48px 0 72px;
  }
}

.card {
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, color 0.15s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  color: var(--accent);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 8px 0;
}

.card-body h2 {
  font-size: 1.65rem;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 300px;
  gap: 30px;
  align-items: start;
  padding: 16px 16px 80px;
  justify-content: center;
}

.article-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.article {
  /* optimal measure: ~60ch keeps line length in the 50-75 character sweet spot */
  width: 100%;
  max-width: 60ch;
  font-size: 1.125rem;
  line-height: 1.7;
  margin: 0 auto;
}

@media (min-width: 1000px) {
  .article {
    max-width: 65ch;
    font-size: 1.125rem;
  }
}

.article h1 {
  font-size: 3.1rem;
  margin: 20px 0 28px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.back {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
}

.fb-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  padding: 10px 18px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: #1877f2;
  border-radius: 10px;
  text-decoration: none;
}

.fb-share:hover {
  background: #145dc4;
}

.newsletter {
  width: 100%;
  max-width: none;
  margin: 36px 0 0;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(110, 160, 120, 0.28);
  border-radius: 20px;
  background: linear-gradient(135deg, rgb(76 175 80), rgb(44 137 47) 45%, rgb(40 135 20));
  box-shadow: 0 18px 35px rgba(22, 55, 36, 0.18);
  color: #f8fafc;
}

.newsletter h2,
.newsletter p {
  margin: 0;
}

.newsletter h2 {
  font-size: clamp(1.75rem, 2vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
}

.newsletter > p {
  color: rgba(226, 232, 240, 0.8);
  margin-top: 10px;
}

.newsletter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 20px;
}

.newsletter-form input {
  min-width: 0;
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font: inherit;
  box-sizing: border-box;
}

.newsletter-form input::placeholder {
  color: #64748b;
}

.newsletter-form button {
  border: 0;
  border-radius: 12px;
  min-width: 170px;
  height: 54px;
  padding: 0 22px;
  background: linear-gradient(135deg, #f97316, #fb7185);
  color: #fff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.32);
}

.newsletter-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  width: min(90vw, 420px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.newsletter-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.newsletter-toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
}

.newsletter-toast .newsletter-message {
  margin: 0;
  padding: 14px 44px 14px 18px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.newsletter-message { font-weight: 600; }
.newsletter-message--success {
  color: #ecfdf5 !important;
  background: rgba(21, 128, 61, 0.95);
}
.newsletter-message--error {
  color: #fff1f2 !important;
  background: rgba(185, 28, 28, 0.94);
}

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

@media (max-width: 480px) {
  .newsletter { padding: 20px; }
  .newsletter-form { grid-template-columns: 1fr; }
  .newsletter-form button { width: 100%; }
}

.cover {
  width: 100%;
  border-radius: var(--radius);
  margin: 0 0 24px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.body p {
  color: var(--text);
  margin: 0 0 1.5em;
}

.body h2 {
  font-size: 2rem;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}

.body h3 {
  font-size: 1.6rem;
  margin: 32px 0 14px;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.35;
}

.body img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin: 24px 0;
}

.recommended {
  width: 100%;
  max-width: 100%;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.recommended h2 {
  font-size: 1.5rem;
  margin: 0 0 24px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.recommended .grid {
  padding: 0;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 641px) {
  .recommended .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

.recommended .card-body h3 {
  font-size: 1.55rem;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.ad-col {
  position: sticky;
  top: 32px;
}

.ad-slot {
  width: 100%;
  min-height: 600px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .ad-col {
    position: static;
  }
  .ad-slot {
    min-height: 120px;
  }
}

@media (max-width: 640px) {
  .article { font-size: 1rem; }
  .article h1 { font-size: 2rem; }
}

.ad-unit {
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ad-unit .adsbygoogle {
  max-width: 100%;
}

.ad-col-mobile { display: none; }

@media (max-width: 640px) {
  .ad-col-desktop { display: none; }
  .ad-col-mobile { display: flex; flex-direction: column; align-items: center; }
}

.ad-banner {
  padding: 24px 0 0;
}

.ad-unit-card {
  grid-column: 1 / -1;
}

.not-found-page {
  padding: 96px 0;
  text-align: center;
}

.not-found-page h1 {
  font-size: 4rem;
  margin: 0 0 12px;
  color: var(--accent);
}

.not-found-page p {
  color: var(--muted);
  font-size: 1.2rem;
  margin: 0 0 24px;
}
