/*
Theme Name: DG-GP Cyberbezpieczeństwo Onepager
Theme URI: https://dg-gp.pl
Author: DG-GP Doradztwo Gospodarcze Grzegorz Pająk
Author URI: https://dg-gp.pl
Description: Motyw onepager "Sovereign Trust & Cyber Resilience" dla doradztwa w zakresie cyberbezpieczeństwa (ISO 27001, ISO 22301, NIS 2, DORA). Każda sekcja strony jest osobnym, edytowalnym modułem (blokiem edytora), a nagłówek i stopkę ustawia się w Wygląd → Dostosuj.
Version: 2.4.0
Requires at least: 6.3
Requires PHP: 7.4
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dg-gp-onepager
*/

/*
 * Wygląd sekcji budują klasy Tailwind CSS (assets/css/tailwind.css, konfiguracja
 * w tailwind.config.js). Poniżej: zmienne projektu (kolory, czcionki,
 * odstępy) oraz style elementów, których Tailwind nie obejmuje.
 */

:root {
  /* --- Rdzeń marki --- */
  --color-primary: #000000;
  --color-on-primary: #ffffff;
  --color-primary-container: #0d1c32;
  --color-on-primary-container: #76849f;

  --color-secondary: #006398;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #5bb8fe;
  --color-on-secondary-container: #00476e;

  --color-tertiary: #000000;
  --color-on-tertiary: #ffffff;
  --color-tertiary-container: #002114;
  --color-on-tertiary-container: #069669;

  --color-error: #ba1a1a;
  --color-on-error: #ffffff;
  --color-error-container: #ffdad6;
  --color-on-error-container: #93000a;

  /* --- Powierzchnie / tła --- */
  --color-background: #faf8ff;
  --color-on-background: #131b2e;
  --color-surface: #faf8ff;
  --color-surface-dim: #d2d9f4;
  --color-surface-bright: #faf8ff;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #f2f3ff;
  --color-surface-container: #eaedff;
  --color-surface-container-high: #e2e7ff;
  --color-surface-container-highest: #dae2fd;
  --color-on-surface: #131b2e;
  --color-on-surface-variant: #44474d;
  --color-inverse-surface: #283044;
  --color-inverse-on-surface: #eef0ff;

  /* --- Powierzchnie funkcjonalne (karty, tabele, modale) --- */
  --color-surface-canvas: #f8fafc;
  --color-surface-card: #ffffff;
  --color-surface-subtle: #f1f5f9;

  /* --- Linie podziału --- */
  --color-outline: #75777e;
  --color-outline-variant: #c5c6cd;
  --color-border-subtle: #e2e8f0;
  --color-border-strong: #cbd5e1;

  /* --- Akcenty funkcjonalne (statusy, telemetria) --- */
  --color-cyber-cyan-glow: #38bdf8;
  --color-amber-heritage: #d97706;
  --color-critical-red: #dc2626;

  /* --- Typografia --- */
  --font-display: "Plus Jakarta Sans", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --text-display: 800 48px/56px var(--font-display);
  --text-display-mobile: 800 34px/42px var(--font-display);
  --text-headline-xl: 700 36px/44px var(--font-display);
  --text-headline-lg: 700 28px/36px var(--font-display);
  --text-headline-md: 600 22px/30px var(--font-display);
  --text-headline-sm: 600 18px/26px var(--font-display);
  --text-body-lead: 400 18px/28px var(--font-body);
  --text-body-md: 400 15px/24px var(--font-body);
  --text-body-sm: 400 13px/20px var(--font-body);
  --text-label-md: 600 14px/20px var(--font-body);
  --text-label-sm: 500 12px/16px var(--font-body);
  --text-label-badge: 700 11px/14px var(--font-body);
  --text-code-mono: 500 13px/20px var(--font-mono);

  /* --- Zaokrąglenia --- */
  --radius-sm: 0.125rem; /* 2px – checkboxy, tagi, komórki tabel */
  --radius-md: 0.25rem;  /* 4px */
  --radius-lg: 0.5rem;   /* 8px – karty, przyciski */
  --radius-full: 0.75rem;

  /* --- Odstępy (siatka 8pt / 4pt) --- */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --gutter-mobile: 1rem;
  --gutter: 1.5rem;
  --margin-mobile: 1rem;
  --margin: 2rem;
  --margin-desktop: 3rem;

  /* --- Głębia / cienie (tonal layering, bez mocnych dropshadow) --- */
  --elevation-1: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --elevation-2: 0 4px 6px -1px rgba(10, 25, 47, 0.07), 0 2px 4px -2px rgba(10, 25, 47, 0.05);
  --elevation-3: 0 10px 15px -3px rgba(10, 25, 47, 0.09), 0 4px 6px -4px rgba(10, 25, 47, 0.05);
  --elevation-4: 0 20px 25px -5px rgba(10, 25, 47, 0.12), 0 8px 10px -6px rgba(10, 25, 47, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-surface-canvas);
  color: var(--color-on-surface);
  font: var(--text-body-md);
}

/* Pasek administratora WordPress nie może zasłaniać przyklejonego nagłówka. */
.admin-bar .dg-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .dg-header {
    top: 46px;
  }
}

/* ---------------------------------------------------------------------------
 * Zwykła treść (strony tekstowe, wpisy, bloki inne niż moduły DG-GP).
 * Moduły (.dg-section) zajmują pełną szerokość; pozostałe elementy dostają
 * wąską kolumnę i typografię projektu.
 * ------------------------------------------------------------------------ */
.dg-content > :not(.dg-section) {
  width: min(100% - 2rem, 48rem);
  margin: 0.75rem auto;
}

.dg-content > .alignwide:not(.dg-section) {
  width: min(100% - 2rem, 80rem);
}

.dg-content > .alignfull:not(.dg-section) {
  width: 100%;
}

.dg-content--plain {
  padding: 1.5rem 0 5rem;
}

.dg-content > :is(h1, h2, h3, h4, h5, h6):not(.dg-section),
.dg-content > :not(.dg-section) :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  color: var(--color-primary);
  letter-spacing: -0.015em;
  margin-top: 2rem;
}

.dg-content > h1:not(.dg-section),
.dg-content > :not(.dg-section) h1 { font: var(--text-headline-xl); }
.dg-content > h2:not(.dg-section),
.dg-content > :not(.dg-section) h2 { font: var(--text-headline-lg); }
.dg-content > h3:not(.dg-section),
.dg-content > :not(.dg-section) h3 { font: var(--text-headline-md); }
.dg-content > :is(h4, h5, h6):not(.dg-section),
.dg-content > :not(.dg-section) :is(h4, h5, h6) { font: var(--text-headline-sm); }

.dg-content > :is(p, ul, ol, blockquote, table):not(.dg-section),
.dg-content > :not(.dg-section) :is(p, li, td, th) {
  font: 400 16px/26px var(--font-body);
  color: var(--color-on-surface-variant);
}

.dg-content > :is(ul, ol):not(.dg-section),
.dg-content > :not(.dg-section) :is(ul, ol) {
  padding-left: 1.5rem;
}

.dg-content > ul:not(.dg-section),
.dg-content > :not(.dg-section) ul { list-style: disc; }
.dg-content > ol:not(.dg-section),
.dg-content > :not(.dg-section) ol { list-style: decimal; }

.dg-content > :not(.dg-section) a,
.dg-content > :is(p, ul, ol):not(.dg-section) a {
  color: var(--color-secondary);
  text-decoration: underline;
}

.dg-content > blockquote:not(.dg-section) {
  padding-left: 1rem;
  border-left: 3px solid var(--color-secondary);
}

.dg-content > :not(.dg-section) img {
  border-radius: var(--radius-lg);
  height: auto;
}

.dg-content > :not(.dg-section) :is(td, th) {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
  text-align: left;
}

/* Stronicowanie listy wpisów */
.dg-pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dg-pagination .page-numbers {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface-card);
}

.dg-pagination .page-numbers.current {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

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