/*
Theme Name:  Zweryfikuj Suplement
Theme URI:   https://zweryfikujsuplement.pl
Description: Motyw ekspercki dla bloga naukowego o suplementach diety. Blog + WooCommerce. Oparty na meta-analizach i badaniach klinicznych.
Version:     1.0.0
Author:      Zweryfikuj Suplement
Author URI:  https://zweryfikujsuplement.pl
License:     GPL-2.0-or-later
Text Domain: zweryfikuj
Tags:        blog, e-commerce, woocommerce, health, science, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, full-width-template, sticky-post, threaded-comments, translation-ready
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Forest green ramp */
  --forest-950: #0d1f0f;
  --forest-900: #152b17;
  --forest-800: #1e3d21;
  --forest-700: #2a5430;
  --forest-600: #376840;
  --forest-500: #4a8455;
  --forest-400: #62a46e;
  --forest-300: #8fc49a;
  --forest-200: #b8ddc0;
  --forest-100: #dff0e3;
  --forest-50:  #f1f8f3;

  /* Sand / beige ramp */
  --sand-950: #1a1510;
  --sand-900: #2e2519;
  --sand-800: #4a3d2a;
  --sand-700: #6b5a3e;
  --sand-600: #8c7a58;
  --sand-500: #a99570;
  --sand-400: #c4b28e;
  --sand-300: #d9cdb0;
  --sand-200: #ece5d3;
  --sand-100: #f5f0e6;
  --sand-50:  #faf7f2;

  /* Ink (neutral text) */
  --ink-900: #111410;
  --ink-700: #2d3228;
  --ink-500: #5a6354;
  --ink-300: #9aa394;
  --ink-200: #c4cbbf;
  --ink-100: #e8ece6;

  /* Accents */
  --lime:      #7ab648;
  --lime-dark: #5e9232;
  --rust:      #c45c2a;
  --rust-light:#fef0e8;

  /* Semantic */
  --color-bg:        var(--sand-50);
  --color-surface:   #ffffff;
  --color-border:    var(--sand-200);
  --color-border-light: var(--ink-100);
  --color-text:      var(--ink-900);
  --color-text-muted:var(--ink-500);
  --color-text-faint:var(--ink-300);
  --color-primary:   var(--forest-700);
  --color-primary-dark: var(--forest-800);
  --color-primary-light:var(--forest-50);
  --color-cta:       var(--lime);
  --color-cta-dark:  var(--lime-dark);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Scale */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.8125rem; /* 13px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.125rem;  /* 18px */
  --text-lg:   1.25rem;   /* 20px */
  --text-xl:   1.5rem;    /* 24px */
  --text-2xl:  1.875rem;  /* 30px */
  --text-3xl:  2.25rem;   /* 36px */
  --text-4xl:  3rem;      /* 48px */
  --text-5xl:  3.75rem;   /* 60px */

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-xl:   22px;
  --radius-2xl:  32px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(13,31,15,.05);
  --shadow-sm:   0 1px 3px rgba(13,31,15,.06), 0 2px 8px rgba(13,31,15,.05);
  --shadow-md:   0 2px 8px rgba(13,31,15,.07), 0 6px 24px rgba(13,31,15,.06);
  --shadow-lg:   0 4px 16px rgba(13,31,15,.09), 0 12px 40px rgba(13,31,15,.08);
  --shadow-lift: 0 6px 28px rgba(13,31,15,.12);

  /* Layout */
  --container-max:  1200px;
  --container-blog: 780px;
  --sidebar-width:  300px;
  --nav-height:     68px;

  /* Transitions */
  --ease:      cubic-bezier(.4,0,.2,1);
  --ease-out:  cubic-bezier(0,0,.2,1);
  --dur-fast:  150ms;
  --dur-base:  220ms;
  --dur-slow:  350ms;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--color-primary-dark); }

ul, ol { list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   TYPOGRAPHY — GLOBAL
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--forest-900);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h2 { font-size: clamp(var(--text-xl),  3vw, var(--text-3xl)); }
h3 { font-size: clamp(var(--text-lg),  2.5vw, var(--text-2xl)); font-family: var(--font-body); font-weight: 500; }
h4 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 500; }
h5 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 500; }
h6 { font-size: var(--text-sm); font-family: var(--font-body); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 500; }
em, i     { font-style: italic; }

code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--forest-50);
  color: var(--forest-800);
  padding: .1em .35em;
  border-radius: var(--radius-sm);
}

blockquote {
  border-left: 3px solid var(--forest-400);
  padding: var(--space-4) var(--space-6);
  background: var(--forest-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--ink-700);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

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

.container--wide {
  max-width: 1400px;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding-top: var(--space-10);
  padding-bottom: var(--space-16);
}

/* Two-column layout (content + sidebar) */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 900px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SCREEN READER / ACCESSIBILITY
   ============================================================ */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--forest-700);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: var(--text-sm);
  z-index: 10000;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 0; }

/* ============================================================
   WP CORE / BLOCK EDITOR ALIGNMENT
   ============================================================ */
.alignnone  { margin: var(--space-4) 0; }
.aligncenter { display: block; margin: var(--space-6) auto; }
.alignleft  { float: left; margin: 0 var(--space-6) var(--space-4) 0; }
.alignright { float: right; margin: 0 0 var(--space-4) var(--space-6); }

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-2);
}

/* WP gallery */
.gallery { display: grid; gap: var(--space-3); }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   BUTTONS — GLOBAL
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  padding: .6875rem 1.375rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              transform var(--dur-fast) var(--ease);
  -webkit-user-select: none;
  user-select: none;
}

.btn:active { transform: scale(.97); }

.btn--primary {
  background: var(--forest-700);
  color: #fff;
  border-color: var(--forest-700);
}
.btn--primary:hover {
  background: var(--forest-800);
  border-color: var(--forest-800);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  color: var(--forest-700);
  border-color: var(--forest-400);
}
.btn--secondary:hover {
  background: var(--forest-50);
  border-color: var(--forest-600);
  color: var(--forest-800);
}

.btn--ghost {
  background: var(--sand-100);
  color: var(--ink-700);
  border-color: var(--sand-200);
}
.btn--ghost:hover {
  background: var(--sand-200);
  color: var(--ink-900);
}

.btn--cta {
  background: var(--lime);
  color: var(--forest-950);
  border-color: var(--lime);
  font-weight: 500;
}
.btn--cta:hover {
  background: var(--lime-dark);
  border-color: var(--lime-dark);
  color: var(--forest-950);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  font-size: var(--text-xs);
  padding: .4375rem 1rem;
}

.btn--lg {
  font-size: var(--text-base);
  padding: .875rem 2rem;
}

.btn--full { width: 100%; }

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .625rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1;
}

.badge--category {
  background: var(--forest-100);
  color: var(--forest-700);
}
.badge--category:hover {
  background: var(--forest-200);
  color: var(--forest-800);
}

.badge--study {
  background: var(--sand-200);
  color: var(--sand-800);
}

.badge--rct {
  background: #e8f4fe;
  color: #1a5276;
}

.badge--meta {
  background: #eaf4fb;
  color: #154360;
}

.badge--weak {
  background: var(--rust-light);
  color: #7d3511;
}

.badge--score {
  background: var(--forest-700);
  color: #fff;
  font-size: 12px;
  padding: .3rem .75rem;
}

/* ============================================================
   FORMS — GLOBAL
   ============================================================ */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-700);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: .625rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--forest-500);
  box-shadow: 0 0 0 3px rgba(74,132,85,.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--ink-300);
}

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

/* ============================================================
   CARDS — BASE
   ============================================================ */
.card {
  background: var(--color-surface);
  border: .5px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card--hover {
  transition: box-shadow var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease);
}
.card--hover:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

/* ============================================================
   SECTION UTILITIES
   ============================================================ */
.section {
  padding-block: var(--space-16);
}

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

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

.section--dark {
  background: var(--forest-800);
  color: #fff;
}

.section--sand {
  background: var(--sand-100);
}

.section--forest-light {
  background: var(--forest-50);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  color: var(--forest-900);
  margin-bottom: var(--space-2);
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

/* ============================================================
   GRIDS
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

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

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: var(--color-border-light);
  margin-block: var(--space-6);
  border: none;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: all var(--dur-fast) var(--ease);
}

.pagination a:hover {
  background: var(--forest-50);
  border-color: var(--forest-300);
  color: var(--forest-700);
}

.pagination .current {
  background: var(--forest-700);
  border-color: var(--forest-700);
  color: #fff;
}

/* ============================================================
   WP RESPONSIVE EMBEDS
   ============================================================ */
.wp-block-embed__wrapper,
.embed-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.wp-block-embed__wrapper iframe,
.embed-responsive iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
