/* ==========================================================================
   Ateamo Ghost Theme — Styles
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  --brand-green: #006854;
  --brand-green-light: #33c4a0;
  --brand-green-dark: #004d3e;
  --brand-gold: #FF9700;
  --brand-yellow: #FFC200;
  --bg-light: #ffffff;
  --bg-warm: #FAF6EA;
  --bg-dark: #070A14;
  --bg-footer: #050810;
  --bg-header: #282828;
  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --border-card: #e8e8e4;
  --border-section: #e5e5e5;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-warm);
}

::selection {
  background-color: rgba(0, 104, 84, 0.3);
  color: var(--text-dark);
}

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

a {
  color: var(--brand-green);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-green-dark);
  text-decoration: underline;
}

/* --- Container --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1024px) {
  .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
  .container { max-width: 1280px; }
}

/* --- Section Label --- */
.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-green);
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-green);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--brand-green-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--brand-green);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: none;
}

.btn-ghost:hover {
  color: var(--brand-green-dark);
  text-decoration: underline;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background-color: rgba(0, 104, 84, 0.1);
  color: var(--brand-green);
}

/* --- Utilities --- */
.text-muted {
  color: var(--text-muted);
}

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

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

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

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav-link--active {
  color: #ffffff;
  font-weight: 600;
}

.nav-cta {
  display: none;
  align-items: center;
  gap: 12px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: none;
  color: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  text-decoration: none;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.mobile-menu-btn:hover {
  color: #ffffff;
}

.mobile-menu-btn .icon-close {
  display: none;
}

.mobile-menu-btn[aria-expanded="true"] .icon-menu {
  display: none;
}

.mobile-menu-btn[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}

.mobile-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.mobile-link--active {
  color: #ffffff;
  font-weight: 600;
}

.mobile-cta {
  text-align: center;
}

.site-main {
  padding-top: 80px;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: flex; }
  .mobile-menu-btn { display: none; }
  .mobile-menu { display: none !important; }
}

/* --- Footer --- */
.site-footer {
  background-color: var(--bg-footer);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer .container {
  padding-top: 64px;
  padding-bottom: 64px;
}

.footer-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.footer-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.footer-tagline {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-email {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-email svg {
  flex-shrink: 0;
}

.footer-email a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-email a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.footer-links {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-bottom {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* --- Post Card --- */
.post-card {
  background-color: var(--bg-light);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-card-link:hover {
  text-decoration: none;
  color: inherit;
}

.post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-content {
  padding: 24px;
}

.post-card-content .badge {
  margin-bottom: 12px;
}

.post-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.post-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.post-card-date::before {
  content: "·";
  margin-right: 8px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 48px 0 0;
}

.pagination-page {
  font-size: 14px;
  color: var(--text-muted);
}

.pagination-link {
  font-size: 14px;
}

/* --- Blog Hero --- */
.blog-hero {
  padding: 80px 0 48px;
  background-color: var(--bg-warm);
  text-align: center;
}

.blog-hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-dark);
}

.blog-hero-subtitle {
  margin-top: 12px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .blog-hero-title { font-size: 48px; }
}

/* --- Blog Feed --- */
.blog-feed {
  padding: 48px 0 80px;
}

/* --- Post Grid --- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Single Post --- */
.post-container {
  max-width: 720px;
}

.post-header {
  padding: 80px 0 32px;
}

.post-header .badge {
  margin-bottom: 16px;
}

.post-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .post-title { font-size: 44px; }
}

.post-meta {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-meta-sep {
  color: var(--border-card);
}

.post-feature-image {
  margin-bottom: 40px;
}

.post-feature-image img {
  width: 100%;
  border-radius: 12px;
}

.post-feature-image figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.post-content {
  padding-bottom: 48px;
}

.post-content p {
  margin-bottom: 24px;
}

.post-content h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.post-content h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.post-content blockquote {
  border-left: 3px solid var(--brand-green);
  padding-left: 20px;
  font-style: italic;
  color: var(--text-muted);
  margin: 32px 0;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content pre {
  background-color: var(--bg-warm);
  padding: 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 32px 0;
  font-size: 14px;
  line-height: 1.5;
}

.post-content code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  font-size: 14px;
}

.post-content p code,
.post-content li code {
  background-color: var(--bg-warm);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content img {
  border-radius: 8px;
  margin: 32px 0;
}

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content a {
  color: var(--brand-green);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-section);
  margin: 48px 0;
}

.post-content figure {
  margin: 32px 0;
}

.post-content figcaption {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

.post-author-box {
  padding-bottom: 64px;
}

.author-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background-color: var(--bg-warm);
  border-radius: 12px;
  padding: 24px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.author-bio {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.related-posts {
  padding: 64px 0 80px;
  border-top: 1px solid var(--border-section);
}

.related-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 32px;
}

/* --- Author Hero --- */
.author-hero {
  display: flex;
  align-items: center;
  gap: 24px;
}

.author-hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* --- Error Page --- */
.error-page {
  padding: 120px 0;
  text-align: center;
}

.error-content {
  max-width: 600px;
  margin: 0 auto;
}

.error-code {
  font-size: 96px;
  font-weight: 800;
  color: var(--brand-green);
  line-height: 1;
}

.error-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 16px;
}

.error-description {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 32px;
}

/* --- Koenig Editor Width Classes --- */
.kg-width-wide {
  margin-left: -10%;
  margin-right: -10%;
  max-width: calc(100% + 20%);
}

.kg-width-full {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

.kg-width-wide img,
.kg-width-full img {
  width: 100%;
}

/* --- Ghost Custom Font Variables --- */
:root {
  --gh-font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gh-font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
