/* --------------
   Base Styles (Green Theme)
----------------- */

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #0f172a;
  /* Soft green overall background */
  background-color: #e3f4e0;
}

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

a {
  color: #166534;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --------------
   Layout Helpers
----------------- */

.container {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
}

.section {
  padding: 3rem 0;
}

/* light sections slightly different shade of green */
.light-section {
  background-color: #f0fdf4;
}

/* alternate sections a bit deeper green tint */
.alt-section {
  background-color: #dcfce7;
}

/* --------------
   Header & Nav
----------------- */

.site-header {
  background: #064e3b;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo-area {
  display: flex;
  align-items: center;
  max-width: 400px;
  gap: 0.75rem;
}

.logo-circle {
  min-width: 64px;
  min-height: 64px;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.logo-text h1 {
  font-size: 1.1rem;
  margin: 0 0 0.1rem;
}

.logo-text p {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Nav */

.main-nav {
  display: flex;
  gap: 0.6rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  color: #e5e7eb;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}

.main-nav a:hover {
  background-color: rgba(209, 250, 229, 0.2);
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.5rem;
}

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

.hero {
  padding: 3.5rem 0 3rem;
}

/* Use cover as background with a green overlay */
.hero-cover {
  position: relative;
  height: 420px;
  background-image: url('cover.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 4px solid #16a34a;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 78, 59, 0.7);
}

.hero-inner-cover {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-text h1 {
  color: #bbf7d0;
}

.hero-text h4 {
  font-size: 1.9rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #bbf7d0;
}

.hero-text p {
  margin: 0.4rem 0;
  color: #e5f9ed;
}

.hero-cta-text {
  font-weight: 500;
}

.hero-buttons {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.primary-btn {
  background: #16a34a;
  color: #ffffff;
}

.primary-btn:hover {
  background: #15803d;
  text-decoration: none;
}

.outline-btn {
  border-color: #bbf7d0;
  background: transparent;
}

.outline-btn:hover {
  background: rgba(187, 247, 208, 0.1);
  text-decoration: none;
}
.hero-buttons .outline-btn {
  color: #bbf7d0;
}

/* --------------
   Sections
----------------- */

.section h2 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #064e3b;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid #bbf7d0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* Lists */

.clean-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0;
}

.clean-list li {
  margin-bottom: 0.35rem;
}

/* Editorial */

.editorial-text p {
  margin-bottom: 0.85rem;
}

/* --------------
   TOC
----------------- */

.toc-search {
  margin-bottom: 1rem;
}

.toc-search input {
  width: 100%;
  max-width: 420px;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #86efac;
  font-size: 0.9rem;
  background-color: #f0fdf4;
}

.toc-list {
  display: grid;
  gap: 1rem;
}

.toc-item {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid #bbf7d0;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.toc-item:hover {
  box-shadow: 0 12px 30px rgba(22, 101, 52, 0.25);
  transform: translateY(-1px);
}

.toc-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #065f46;
}

.toc-authors {
  font-size: 0.9rem;
  color: #166534;
  margin: 0 0 0.1rem;
}

.toc-pages {
  font-size: 0.8rem;
  color: #4b5563;
  margin: 0;
}

/* --------------
   COVER SECTION LAYOUT
----------------- */

.cover-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr);
  gap: 1.5rem;
  align-items: center;
}

.cover-image-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.75rem;
  border: 1px solid #bbf7d0;
  box-shadow: 0 10px 25px rgba(22, 101, 52, 0.25);
  text-align: center;
  cursor: zoom-in;
}

.cover-image-card img {
  border-radius: 0.7rem;
}

.cover-caption {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #166534;
}

.cover-text-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid #bbf7d0;
  box-shadow: 0 6px 18px rgba(22, 101, 52, 0.2);
}

.cover-text-card h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.download-buttons {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.small-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #166534;
}

/* --------------
   Article page
----------------- */

.article-body {
  background-color: #dcfce7;
}

.article-container {
  max-width: 800px;
}

.article-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.7rem 1.6rem;
  border: 1px solid #bbf7d0;
  box-shadow: 0 10px 30px rgba(22, 101, 52, 0.25);
}

.article-meta {
  font-size: 0.8rem;
  color: #4b5563;
  margin-top: 0;
}

.article-title {
  margin-top: 0.3rem;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  color: #064e3b;
}

.article-author {
  font-size: 0.9rem;
  color: #166534;
}

.article-card h3 {
  margin-top: 1.3rem;
  margin-bottom: 0.4rem;
  color: #065f46;
}

.article-card p {
  margin-bottom: 0.75rem;
}

.article-back {
  margin-top: 1.3rem;
}

/* Contact form */

.contact-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-row label {
  font-size: 0.9rem;
  color: #064e3b;
}

.form-row input,
.form-row textarea {
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #86efac;
  font-size: 0.9rem;
  font-family: inherit;
}

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

.site-footer {
  background-color: #022c22;
  color: #d1fae5;
  padding: 1.75rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.footer-meta {
  text-align: right;
}

/* --------------
   LIGHTBOX
----------------- */

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 101;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 0.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
}

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

@media (max-width: 900px) {
  .hero-cover {
    height: 340px;
    background-position: top;
  }

  .cover-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hero {
    padding-top: 3rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    inset: 56px 0 auto 0;
    background: #022c22;
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-cover {
    height: 280px;
  }

  .hero-text h2 {
    font-size: 1.4rem;
  }
}
