/* =============================================
   CLEARSTREAM — MAIN CSS
   Mobile-first, BEM-inspired
   ============================================= */

/* ── RESET & BASE ─────────────────────────── */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--cs-text);
  background-color: var(--cs-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--cs-green);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--cs-green-light);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

/* ── TYPOGRAPHY ───────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
  color: var(--cs-anthracite);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
}

p {
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

p:last-child {
  margin-bottom: 0;
}

strong { font-weight: 700; }

/* ── LAYOUT CONTAINERS ────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

@media (min-width: 640px) {
  .container { padding-inline: var(--space-8); }
}

@media (min-width: 1024px) {
  .container { padding-inline: var(--space-12); }
}

.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: var(--space-16);
}

@media (min-width: 768px) {
  .section { padding-block: var(--space-24); }
}

.section--sm { padding-block: var(--space-12); }
.section--lg { padding-block: var(--space-32); }

/* ── GRID SYSTEMS ─────────────────────────── */

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

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

/* Fix grid blowout */
.page-layout > *,
.blog-layout > *,
.blog-grid > *,
.grid > * {
  min-width: 0;
}

/* ── FLEX UTILITIES ───────────────────────── */

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ── BUTTONS ──────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-md);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn--primary {
  background-color: var(--cs-gold);
  color: var(--cs-white);
  border-color: var(--cs-gold);
  box-shadow: 0 4px 14px rgba(196, 154, 46, 0.35);
}

.btn--primary:hover {
  background-color: var(--cs-gold-dark);
  border-color: var(--cs-gold-dark);
  color: var(--cs-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 154, 46, 0.45);
}

.btn--secondary {
  background-color: transparent;
  color: var(--cs-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: var(--cs-white);
  color: var(--cs-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--cs-green);
  border-color: var(--cs-green);
}

.btn--outline:hover {
  background-color: var(--cs-green);
  color: var(--cs-white);
}

.btn--gold {
  background-color: var(--cs-gold);
  color: var(--cs-anthracite);
  border-color: var(--cs-gold);
  font-weight: 700;
}

.btn--gold:hover {
  background-color: #b8892a;
  border-color: #b8892a;
  color: var(--cs-anthracite);
}

.btn--ghost {
  background-color: transparent;
  color: var(--cs-text);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-inline: 0;
}

.btn--ghost:hover {
  color: var(--cs-green);
}

.btn--lg {
  padding: 1.125rem 2.25rem;
  font-size: var(--text-lg);
}

.btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ── BADGES ───────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: rgba(196, 154, 46, 0.15);
  color: var(--cs-gold);
  border: 1px solid rgba(196, 154, 46, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--white {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--cs-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.badge--green {
  background-color: rgba(56, 161, 105, 0.12);
  color: var(--cs-success);
  border-color: rgba(56, 161, 105, 0.25);
}

/* ── SECTION HEADERS ──────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header h2 {
  color: var(--cs-anthracite);
  max-width: 720px;
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--cs-text-muted);
  margin-inline: auto;
  margin-top: var(--space-4);
  max-width: 56ch;
}

/* ── CARDS ────────────────────────────────── */

.card {
  background: var(--cs-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cs-border);
  padding: var(--space-8);
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--cs-shadow-md);
}

/* ── FORM ELEMENTS ────────────────────────── */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--cs-text);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--cs-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  color: var(--cs-text);
  background: var(--cs-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--cs-green);
  box-shadow: 0 0 0 3px rgba(26, 74, 58, 0.12);
}

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

/* ── BREADCRUMB ───────────────────────────── */

.breadcrumb {
  padding-block: var(--space-4);
  font-size: var(--text-sm);
  color: var(--cs-text-muted);
}

.breadcrumb a {
  color: var(--cs-text-muted);
}

.breadcrumb a:hover {
  color: var(--cs-green);
}

.breadcrumb span::before {
  content: ' › ';
  color: var(--cs-border);
}

/* ── DIVIDER ──────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--cs-border);
  margin-block: var(--space-8);
}

/* ── ALERT / NOTICE ───────────────────────── */

.notice {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  border-left: 4px solid;
}

.notice--info {
  background: rgba(26, 74, 58, 0.07);
  border-color: var(--cs-green);
  color: var(--cs-green-dark);
}

.notice--warning {
  background: rgba(196, 154, 46, 0.1);
  border-color: var(--cs-gold);
  color: #7a5c10;
}

/* ── UTILITIES ────────────────────────────── */

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-white  { color: var(--cs-white); }
.text-green  { color: var(--cs-green); }
.text-gold   { color: var(--cs-gold); }
.text-muted  { color: var(--cs-text-muted); }

.bg-white     { background-color: var(--cs-white); }
.bg-off-white { background-color: var(--cs-off-white); }
.bg-green     { background-color: var(--cs-green); }
.bg-anthracite{ background-color: var(--cs-anthracite); }

.mt-0  { margin-top: 0; }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

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

/* ── CONTENT AREA (WordPress Editor) ─────── */

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.entry-content p {
  margin-bottom: var(--space-5);
}

.entry-content ul,
.entry-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
  list-style: revert;
}

.entry-content li {
  margin-bottom: var(--space-2);
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content blockquote {
  border-left: 4px solid var(--cs-gold);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  background: var(--cs-off-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--cs-text-muted);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
}

.entry-content th {
  background: var(--cs-green);
  color: var(--cs-white);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
}

.entry-content td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--cs-border);
}

.entry-content tr:nth-child(even) td {
  background: var(--cs-off-white);
}

.entry-content code {
  background: var(--cs-off-white);
  border: 1px solid var(--cs-border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ── PAGINATION ───────────────────────────── */

.pagination {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  padding-top: var(--space-12);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1.5px solid var(--cs-border);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--cs-text);
  transition: all var(--transition);
}

.pagination a:hover,
.pagination .current {
  background: var(--cs-green);
  border-color: var(--cs-green);
  color: var(--cs-white);
}

/* ── SCROLLBAR ────────────────────────────── */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cs-off-white); }
::-webkit-scrollbar-thumb { background: var(--cs-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cs-text-muted); }

/* ── SELECTION ────────────────────────────── */

::selection {
  background: var(--cs-green);
  color: var(--cs-white);
}

/* ── SKIP LINK ────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--cs-green);
  color: var(--cs-white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--transition);
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--cs-white);
}
