:root {
  --ink: #18392f;
  --body: #2c443b;
  --paper: #fcfcf8;
  --soft: #edf2e8;
  --accent: #416754;
  --warm: #cda67c;
  --line: #cbd7ca;
  --max: 1170px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--body);
  background: var(--paper);
  font: 17px/1.75 Rubik, Arial, sans-serif;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

a:hover {
  color: #244d3c;
}

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

h1, h2, h3, h4, .brand {
  font-family: Forum, Georgia, serif;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
}

h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  margin: 15px 0 20px;
}

h2 {
  font-size: clamp(30px, 3.8vw, 44px);
  margin: 0 0 20px;
}

h3 {
  font-size: 26px;
  margin: 24px 0 12px;
}

h4 {
  font-size: 21px;
  margin: 18px 0 8px;
  font-family: Rubik, Arial, sans-serif;
  font-weight: 600;
  color: var(--ink);
}

p {
  margin: 0 0 18px;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: auto;
}

/* Header */
.header {
  background: #edf0e7;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  min-height: 98px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

.brand {
  font-size: 34px;
  text-decoration: none;
  white-space: nowrap;
}

.brand small {
  font: 10px Rubik, Arial, sans-serif;
  display: block;
  letter-spacing: .17em;
  text-transform: uppercase;
  margin-top: 5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  text-decoration: none;
  font-size: 14px;
  color: #35594b;
  font-weight: 500;
  padding: 4px 0;
}

.nav a.active {
  border-bottom: 2px solid var(--warm);
  padding-bottom: 4px;
}

/* Buttons & Badges */
.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button.outline {
  color: var(--accent);
  background: transparent;
}

.button:hover {
  background: #284d3d;
  color: white;
}

.button.outline:hover {
  background: var(--accent);
  color: #fff;
}

.eyebrow {
  font: 12px Rubik, Arial, sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
}

/* Hero Section */
.hero {
  padding: 56px 0 80px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: center;
}

.hero-media {
  min-height: 540px;
  overflow: hidden;
  border-radius: 48% 48% 0 0;
  background: #dce8d8;
  box-shadow: 0 16px 36px rgba(24, 57, 47, 0.06);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  z-index: 2;
  margin-left: -72px;
  background: #edf0e7;
  padding: 48px;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(24, 57, 47, 0.05);
}

.hero-copy p {
  font-size: 18px;
}

/* Sections & Layout */
.section {
  padding: 68px 0;
}

.soft {
  background: var(--soft);
}

.center {
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Original Organic Shape Cards */
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
  box-shadow: 0 10px 24px rgba(24, 57, 47, 0.06);
  transition: box-shadow 0.25s ease;
}

.card:hover .card-image {
  box-shadow: 0 16px 32px rgba(24, 57, 47, 0.12);
}

.arch {
  border-radius: 50% 50% 0 0;
}

.circle {
  border-radius: 50%;
}

.u {
  border-radius: 0 0 50% 50%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card h3 {
  font-size: 24px;
  margin: 12px 0 10px;
  line-height: 1.25;
}

.card p {
  font-size: 15px;
  color: var(--body);
  line-height: 1.6;
}

.card .button {
  margin-top: auto;
  padding: 9px 18px;
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Category Hero & Media */
.category-hero {
  padding: 54px 0;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.category-hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 48px;
}

.category-media {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 48% 48% 0 0;
  background: #dce8d8;
  margin-left: auto;
  box-shadow: 0 14px 32px rgba(24, 57, 47, 0.08);
}

.category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Topic Grid (Category pages) */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.topic {
  border: 1px solid var(--line);
  padding: 32px;
  background: #fff;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(24, 57, 47, 0.06);
}

.topic h2 {
  font-size: 28px;
  margin: 0 0 12px;
  line-height: 1.22;
}

.topic p {
  font-size: 16px;
  margin-bottom: 18px;
}

/* Contact Page Optimization */
.contact-layout {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 50px;
  align-items: start;
  margin-top: 30px;
}

.contact-form {
  display: grid;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(24, 57, 47, 0.04);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .02em;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  font-size: 15px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbf9;
  color: var(--body);
  transition: border-color .2s, box-shadow .2s, background .2s;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(65, 103, 84, 0.15);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-card {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: 20px;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 26px;
}

.contact-card ul {
  padding-left: 20px;
  margin: 16px 0;
}

.contact-card li {
  margin: 8px 0;
  font-size: 15px;
}

/* Article Detailed Styling (for AdSense in-depth content) */
.intro {
  max-width: 860px;
  padding: 56px 0 24px;
}

.intro p {
  font-size: 20px;
  color: #3b5349;
}

.meta {
  font-size: 13px;
  color: #61766b;
}

.article {
  max-width: 820px;
  margin: auto;
  padding: 14px 0 80px;
}

.article h2 {
  font-size: 34px;
  margin-top: 50px;
  border-bottom: 1px solid #e1e9df;
  padding-bottom: 10px;
}

.article h3 {
  font-size: 26px;
  margin-top: 32px;
}

.article p, .article li {
  font-size: 17px;
  line-height: 1.8;
}

.article li {
  margin: 10px 0;
}

.toc {
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: #fafbf9;
  border-radius: 16px;
  margin: 32px 0;
}

.toc h2 {
  font-size: 24px;
  margin: 0 0 12px;
  border-bottom: none;
  padding-bottom: 0;
}

.toc ol {
  margin: 0;
  padding-left: 22px;
}

.toc li {
  font-size: 15px;
  margin: 6px 0;
}

.note {
  background: var(--soft);
  border-left: 4px solid var(--accent);
  padding: 22px 24px;
  margin: 28px 0;
  border-radius: 0 12px 12px 0;
}

.warning {
  background: #fbf5eb;
  border-left-color: #a87538;
}

.visual {
  margin: 38px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(24, 57, 47, 0.06);
}

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

.caption, .small {
  font-size: 13px;
  color: #65776d;
}

.diagram {
  margin: 38px 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 22px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(24, 57, 47, 0.04);
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram figcaption {
  font-size: 13px;
  color: #65776d;
  margin-top: 12px;
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  background: #fff;
}

th, td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
}

details {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  transition: color 0.2s;
}

summary:hover {
  color: var(--accent);
}

details p {
  margin-top: 12px;
}

.related {
  border-top: 2px solid var(--line);
  margin-top: 55px;
  padding-top: 35px;
}

.related ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 40px;
  padding-left: 20px;
}

/* Footer */
footer {
  background: var(--soft);
  border-top: 1px solid var(--line);
  padding: 48px 0;
  font-size: 14px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 35px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 24px;
  align-items: start;
  flex-wrap: wrap;
}

.mobile {
  display: none;
}

/* Responsive Media Queries */
@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-media {
    min-height: 380px;
    max-width: 600px;
  }
  .hero-copy {
    margin: -50px 0 0 24px;
    max-width: 680px;
    padding: 36px;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .split, .contact-layout {
    grid-template-columns: 1fr;
  }
  .category-hero .wrap {
    grid-template-columns: 1fr;
  }
  .category-media {
    margin: auto;
    max-width: 500px;
  }
  .header-inner {
    min-height: 88px;
  }
  .nav {
    gap: 18px;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .header-inner {
    padding: 16px 0;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .brand {
    font-size: 28px;
  }
  .nav {
    display: none;
  }
  .mobile {
    display: block;
  }
  .mobile summary {
    padding: 7px 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    font-size: 14px;
  }
  .mobile nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
  }
  .hero {
    padding: 30px 0 45px;
  }
  .hero-media {
    min-height: 300px;
  }
  .hero-copy {
    margin: -25px 0 0 8px;
    padding: 26px 20px;
  }
  .grid, .split, .topic-grid, .contact-layout {
    grid-template-columns: 1fr;
  }
  .card-image {
    max-width: 320px;
  }
  .section {
    padding: 46px 0;
  }
  .intro {
    padding: 38px 0 18px;
  }
  .article {
    padding-bottom: 50px;
  }
  .article h2 {
    font-size: 28px;
  }
  .related ul {
    grid-template-columns: 1fr;
  }
  .category-hero {
    padding: 40px 0;
  }
  .footer-grid {
    display: block;
  }
  .footer-links {
    margin: 20px 0;
    flex-direction: column;
    gap: 12px;
  }
  .diagram {
    padding: 12px;
  }
}
