/* ── DICLARX Journal v4 — Main Stylesheet ──────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --dark:       #0a2e35;
  --dark-mid:   #0d3940;
  --teal:       #1a7c74;
  --teal-light: #1e9088;
  --teal-pale:  #e8f5f3;
  --white:      #ffffff;
  --off-white:  #f8fafa;
  --text:       #1a2e35;
  --muted:      #6b8089;
  --border:     #dde8e7;
  --font-sans:  'DM Sans', -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --max-w:      760px;
  --max-w-wide: 1100px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal-light); }
img { max-width: 100%; display: block; }

/* ── HEADER ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-decoration: none;
}

.site-logo span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.site-nav li a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0.4rem 0.85rem;
  transition: color .2s;
}

.site-nav li a:hover,
.site-nav li.current-menu-item a { color: var(--teal); }

.header-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: 3px;
  font-size: 0.75rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  white-space: nowrap;
  transition: background .2s !important;
}

.header-cta:hover { background: var(--teal-light) !important; color: var(--white) !important; }

/* ── HERO STRIP ─────────────────────────────────────────────────────────── */
.journal-hero {
  background: var(--dark);
  background-image:
    radial-gradient(ellipse 120% 80% at 60% 50%, rgba(26,124,116,0.18) 0%, transparent 65%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a7c74' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  padding: 4rem 2rem 3.5rem;
  text-align: center;
}

.journal-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.journal-hero p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
  font-weight: 300;
}

/* ── PILLAR FILTER TABS ─────────────────────────────────────────────────── */
.pillar-tabs {
  background: var(--dark-mid);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pillar-tabs::-webkit-scrollbar { display: none; }

.pillar-tabs-inner {
  display: flex;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 2rem;
  gap: 0;
  white-space: nowrap;
}

.pillar-tab {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding: 0.9rem 1.1rem;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  flex-shrink: 0;
}

.pillar-tab:hover,
.pillar-tab.active {
  color: var(--white);
  border-bottom-color: var(--teal);
}

/* ── BLOG LAYOUT ─────────────────────────────────────────────────────────── */
.blog-container {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}

.blog-main {}

/* ── FEATURED POST ──────────────────────────────────────────────────────── */
.featured-post {
  background: var(--dark);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
}

.featured-post-image {
  position: relative;
  overflow: hidden;
  background: var(--dark-mid);
}

.featured-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity .3s;
}

.featured-post:hover .featured-post-image img { opacity: 1; }

.featured-post-no-image {
  background: linear-gradient(135deg, var(--dark-mid) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
}

.featured-post-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-pillar-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 0.75rem;
}

.featured-post-content .post-pillar-tag { color: rgba(26,224,208,0.8); }

.featured-post-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.9rem;
}

.featured-post-content h2 a {
  color: var(--white);
  text-decoration: none;
}

.featured-post-content h2 a:hover { color: rgba(255,255,255,0.8); }

.featured-post-content .post-excerpt {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-post-content .post-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
}

/* ── POST GRID ───────────────────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}

.post-card:hover {
  box-shadow: 0 8px 30px rgba(10,46,53,0.10);
  transform: translateY(-2px);
}

.post-card-image {
  height: 180px;
  background: var(--dark-mid);
  overflow: hidden;
}

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

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

.post-card-no-image {
  height: 180px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-no-image span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.post-card-content {
  padding: 1.4rem;
}

.post-card-content .post-pillar-tag {
  margin-bottom: 0.5rem;
}

.post-card-content h3 {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.post-card-content h3 a { color: inherit; text-decoration: none; }
.post-card-content h3 a:hover { color: var(--teal); }

.post-card-content .post-excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.post-meta {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-meta .sep { opacity: 0.4; }

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.blog-sidebar {}

.sidebar-widget {
  margin-bottom: 2.5rem;
}

.sidebar-widget-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--teal);
  margin-bottom: 1.1rem;
}

.pillar-list {
  list-style: none;
}

.pillar-list li {
  border-bottom: 1px solid var(--border);
}

.pillar-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 400;
  transition: color .2s, padding-left .2s;
}

.pillar-list li a:hover {
  color: var(--teal);
  padding-left: 4px;
}

.pillar-list li a .count {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--teal-pale);
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
}

/* ── SINGLE POST ─────────────────────────────────────────────────────────── */
.single-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header .post-pillar-tag {
  margin-bottom: 1rem;
  display: block;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-meta .sep { opacity: 0.4; }

.article-meta .dimension-tag {
  background: var(--teal-pale);
  color: var(--teal);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-featured-image {
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  max-height: 420px;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── ARTICLE BODY ────────────────────────────────────────────────────────── */
.article-body {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body strong {
  font-weight: 600;
  color: var(--dark);
}

.article-body em {
  font-style: italic;
  color: var(--text);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0 1.5rem;
}

.article-body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(26,124,116,0.3);
  text-underline-offset: 2px;
}

.article-body a:hover {
  text-decoration-color: var(--teal);
}

/* CTA paragraph at end */
.article-body hr + p {
  font-size: 0.82em;
  color: #888;
  line-height: 1.6;
  margin-top: 0;
}

/* ── PAGINATION ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 4px;
  color: var(--text);
  border: 1px solid var(--border);
  transition: all .2s;
}

.pagination a:hover { background: var(--teal-pale); border-color: var(--teal); color: var(--teal); }
.pagination span.current { background: var(--teal); color: var(--white); border-color: var(--teal); }

/* ── RELATED POSTS ───────────────────────────────────────────────────────── */
.related-posts {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 2px solid var(--border);
}

.related-posts-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.related-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.2rem;
  transition: box-shadow .2s;
}

.related-card:hover { box-shadow: 0 4px 16px rgba(10,46,53,0.08); }

.related-card .post-pillar-tag { margin-bottom: 0.4rem; }

.related-card h4 {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--dark);
}

.related-card h4 a { color: inherit; text-decoration: none; }
.related-card h4 a:hover { color: var(--teal); }

/* ── INTEGRITY STRIP ─────────────────────────────────────────────────────── */
.integrity-strip {
  background: var(--dark);
  padding: 3rem 2rem;
  text-align: center;
}

.integrity-strip h3 {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.integrity-strip p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

.integrity-strip-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
}

.integrity-strip-links li a {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.2);
}

.integrity-strip-links li a:hover { color: rgba(255,255,255,0.8); }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
}

.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.footer-subscribe {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.footer-subscribe input {
  border: none;
  outline: none;
  padding: 0.55rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text);
  background: transparent;
  width: 220px;
}

.footer-subscribe input::placeholder { color: var(--muted); }

.footer-subscribe button {
  background: var(--teal);
  border: none;
  color: var(--white);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background .2s;
  display: flex;
  align-items: center;
}

.footer-subscribe button:hover { background: var(--teal-light); }

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

.footer-cta a {
  background: var(--teal);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background .2s;
  text-decoration: none;
}

.footer-cta a:hover { background: var(--teal-light); color: var(--white); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-container { grid-template-columns: 1fr; gap: 2.5rem; }
  .blog-sidebar { display: none; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-image { height: 220px; }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-subscribe { justify-content: center; }
  .footer-cta { text-align: center; }
}
