/*
Theme Name: Audyt Bezpieczenstwa
Theme URI: https://audytbezpieczenstwa.pro
Author: Fabryka Bezpieczenstwa PSA
Author URI: https://fabryкabezpieczenstwa.pl
Description: Motyw dla AudytBezpieczenstwa.pro — platforma metodyczna MAB
Version: 1.0
License: Proprietary
Text Domain: audyt-bezpieczenstwa
*/

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

/* === PALETA === */
:root {
  --navy:      #0D1B2E;
  --navy-mid:  #112336;
  --blue:      #1A5FA8;
  --blue-dark: #0F4A8A;
  --ice:       #5AB0E0;
  --text:      #1A2B3A;
  --text-muted:#44607A;
  --bg:        #F4F7FA;
  --white:     #FFFFFF;
  --border:    #D0DCE8;
}

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--ice); }

/* === LAYOUT === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === HEADER === */
.site-header {
  background: var(--navy);
  border-bottom: 2px solid var(--blue);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo img {
  height: 64px;
  width: auto;
  display: block;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

.site-nav a {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.current { color: var(--ice); }

/* === HERO === */
.hero {
  background: var(--navy);
  padding: 80px 0 72px;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero h1 em {
  color: var(--ice);
  font-style: italic;
}

.hero p {
  color: #A8C4D8;
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero__cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* === PRZYCISKI === */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}
.btn--primary:hover { background: var(--blue-dark); color: var(--white); }

.btn--outline {
  background: transparent;
  color: var(--ice);
  border: 1.5px solid var(--ice);
}
.btn--outline:hover { background: var(--ice); color: var(--navy); }

/* === SEKCJE === */
.section { padding: 64px 0; }
.section--alt { background: var(--bg); }
.section--dark { background: var(--navy); color: var(--white); }
.section--dark h2 { color: var(--white); }
.section--dark p { color: #A8C4D8; }

.section__title {
  text-align: center;
  margin-bottom: 48px;
}

.section__title h2 { margin-bottom: 12px; }
.section__title p { color: var(--text-muted); font-size: 1.05rem; }

/* === KARTY (dla kogo) === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: 4px;
  padding: 32px;
}

.card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.card h3 { margin-bottom: 12px; font-size: 1.2rem; }
.card p { color: var(--text-muted); margin-bottom: 0; font-size: 0.95rem; }

/* === BLOG LISTA === */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.post-card:hover { box-shadow: 0 4px 20px rgba(13,27,46,0.1); }

.post-card__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.post-card__cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}

.post-card__cat--audytor { background: #1A5FA820; color: var(--blue); }
.post-card__cat--audytowany { background: #5AB0E020; color: #0F6A9A; }

.post-card__body { padding: 24px; }
.post-card__date { font-size: 0.8rem; color: var(--text-muted); }
.post-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.post-card h3 a { color: var(--navy); }
.post-card h3 a:hover { color: var(--blue); }
.post-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

/* === SINGLE POST === */
.post-header {
  background: var(--navy) !important;
  padding: 56px 0 48px;
}

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

.post-header h1 {
  color: var(--white);
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.post-header__meta {
  color: #A8C4D8;
  font-size: 0.85rem;
}

.post-content {
  padding: 56px 0;
}

.post-content h2 { margin: 2rem 0 1rem; }
.post-content h3 { margin: 1.5rem 0 0.8rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
  border-left: 3px solid var(--ice);
  padding: 12px 20px;
  margin: 1.5rem 0;
  background: var(--bg);
  color: var(--text-muted);
  font-style: italic;
}

/* === SIDEBAR === */
.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.sidebar { position: sticky; top: 96px; }

.sidebar__widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar__widget h4 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* === CTA BOXY === */
.cta-box {
  background: var(--navy);
  border-radius: 4px;
  padding: 40px;
  text-align: center;
  margin: 48px 0;
}

.cta-box h3 { color: var(--white); margin-bottom: 12px; }
.cta-box p { color: #A8C4D8; margin-bottom: 24px; }

/* === FOOTER === */
.site-footer {
  background: var(--navy);
  border-top: 2px solid var(--blue);
  padding: 48px 0 24px;
  color: #A8C4D8;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer__brand img { height: 70px; width: 300px; min-width: 300px; margin-bottom: 16px; display: block; }
.footer__brand p { font-size: 0.85rem; line-height: 1.6; }

.footer__col h4 {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 8px; }
.footer__col a { color: #A8C4D8; font-size: 0.85rem; }
.footer__col a:hover { color: var(--ice); }

.footer__bottom {
  border-top: 1px solid #1A3550;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer__bottom a { color: #A8C4D8; }
.footer__bottom a:hover { color: var(--ice); }

.footer__powered {
  font-style: italic;
  color: var(--ice);
}

.footer__powered span { color: #A8C4D8; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .content-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 2rem; }
  .site-nav ul { gap: 20px; }
}

@media (max-width: 480px) {
  .site-nav { display: none; }
  .hero h1 { font-size: 1.6rem; }
}

/* === CYTATY Z PRZEPISOW === */
.post-content blockquote footer {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.post-content blockquote footer::before {
  content: "Zrodlo: ";
  font-weight: 600;
}

/* === TIMELINE MAB === */
.mab-timeline {
  position: relative;
  padding-left: 0;
  margin-top: 40px;
}

.mab-timeline::before {
  content: '';
  position: absolute;
  left: 120px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.mab-timeline__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  margin-bottom: 40px;
  position: relative;
}

.mab-timeline__item::before {
  content: '';
  position: absolute;
  left: 112px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue);
  z-index: 1;
}

.mab-timeline__item--current::before {
  background: var(--ice);
  box-shadow: 0 0 0 2px var(--ice);
}

.mab-timeline__item--future::before {
  background: var(--white);
  box-shadow: 0 0 0 2px var(--border);
}

.mab-timeline__year {
  text-align: right;
  padding-right: 24px;
  padding-top: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.mab-timeline__item--future .mab-timeline__year {
  color: var(--text-muted);
}

.mab-timeline__content {
  padding-bottom: 8px;
}

.mab-timeline__content h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--navy);
}

.mab-timeline__item--future .mab-timeline__content h3 {
  color: var(--text-muted);
}

.mab-timeline__content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .mab-timeline::before { left: 80px; }
  .mab-timeline__item { grid-template-columns: 80px 1fr; gap: 16px; }
  .mab-timeline__item::before { left: 72px; }
  .mab-timeline__year { font-size: 0.72rem; }
}

/* === TIMELINE WIDE (bez sidebara) === */
.mab-timeline--wide {
  max-width: 680px;
}

.mab-timeline--wide::before {
  left: 140px;
}

.mab-timeline--wide .mab-timeline__item {
  grid-template-columns: 140px 1fr;
}

.mab-timeline--wide .mab-timeline__item::before {
  left: 132px;
}

.mab-timeline--wide .mab-timeline__year {
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .mab-timeline--wide::before { left: 80px; }
  .mab-timeline--wide .mab-timeline__item { grid-template-columns: 80px 1fr; }
  .mab-timeline--wide .mab-timeline__item::before { left: 72px; }
}

/* === AUDYTOR WYKAZ === */
.audytor-filtry {
  margin-bottom: 40px;
  padding: 20px 24px;
  background: var(--bg);
  border-radius: 4px;
}

.audytor-filtry__row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.audytor-filtry__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audytor-filtry__group label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.audytor-filtry__group select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
}

.audytor-filtry__reset {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 20px;
  text-decoration: underline;
}

.audytor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.audytor-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s;
}

.audytor-card:hover {
  box-shadow: 0 4px 16px rgba(13,27,46,0.08);
}

.audytor-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.audytor-card__header h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--navy);
}

.audytor-card__cert {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 2px;
}

.audytor-card__tagi {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.audytor-card__tagi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-right: 2px;
}

.audytor-tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--blue);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--blue);
  text-decoration: none;
  transition: all 0.15s;
}

.audytor-tag:hover {
  background: var(--blue);
  color: var(--white);
}

.audytor-card__kontakt {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.audytor-card__link {
  color: var(--text-muted);
  transition: color 0.15s;
}

.audytor-card__link:hover {
  color: var(--blue);
}
