/*
Theme Name: ZPP Lubelskie
Theme URI: https://zpplubelskie.pl
Author: Polski Instytut Ksiegowosci i Finansow
Description: Autorski motyw dla Zwiazku Przedsiebiorcow i Pracodawcow Lubelskie.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: zpp-lubelskie
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --green-deep: #0B3D2A;
  --green-mid: #14573B;
  --emerald: #1F8F5F;
  --emerald-soft: #E4EFE7;
  --cream: #FAF8F3;
  --paper: #F3EFE6;
  --ink: #16231C;
  --ink-soft: #47554C;
  --gold: #B8963E;
  --line: #DDD6C6;
  --white: #FFFFFF;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Source Serif 4", "Charter", Georgia, serif;

  --measure: 68ch;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(11, 61, 42, 0.08), 0 8px 24px rgba(11, 61, 42, 0.06);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--green-deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { max-width: var(--measure); margin: 0 0 1.1em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-text);
  font-style: italic;
  color: var(--emerald);
  font-size: 0.95rem;
  margin: 0 0 0.4em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-deep);
  color: var(--white);
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-size: 1rem;
  border: 1px solid var(--green-deep);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--emerald); border-color: var(--emerald); }
.btn-outline {
  background: transparent;
  color: var(--green-deep);
  border: 1px solid var(--green-deep);
}
.btn-outline:hover { background: var(--green-deep); color: var(--white); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--green-deep); }
.btn-gold:hover { background: #a5842f; border-color: #a5842f; }

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 24px;
  flex-wrap: wrap;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-branding img { height: 48px; width: auto; }
.site-branding__text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--green-deep);
  line-height: 1.1;
}
.site-branding__text small {
  display: block;
  font-family: var(--font-text);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-style: normal;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 100%;
  order: 3;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 4px;
}
.primary-nav > ul { display: flex; gap: 2px; align-items: center; }
.primary-nav li { position: relative; }
.primary-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.92rem;
  color: var(--ink);
  border-radius: var(--radius);
  white-space: nowrap;
}

/* podmenu - ukryte domyslnie, pokazuje sie po najechaniu/fokusie */
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 240px;
  padding: 6px 0;
  z-index: 60;
  border-radius: var(--radius);
}
.primary-nav .menu-item:hover > .sub-menu,
.primary-nav .menu-item:focus-within > .sub-menu {
  display: flex;
}
.primary-nav .sub-menu a { white-space: normal; padding: 10px 18px; }
.primary-nav .sub-menu a:hover { background: var(--emerald-soft); color: var(--green-deep); }
.primary-nav .menu-item-has-children > a::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.7;
}

@media (min-width: 1240px) {
  .primary-nav { order: 2; flex: 1 1 auto; border-top: none; margin-top: 0; padding-top: 0; overflow: visible; }
}
.primary-nav a:hover { background: var(--emerald-soft); color: var(--green-deep); }
.primary-nav .current-menu-item > a { color: var(--emerald); font-style: italic; }



.header-cta { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; }

/* ============================================
   HERO / EVENT SLIDER
   ============================================ */
.hero-slider {
  position: relative;
  background: linear-gradient(135deg, var(--green-deep), var(--green-mid) 55%, var(--emerald));
  color: var(--white);
  overflow: hidden;
}
.hero-slider__track {
  display: flex;
  transition: transform 0.6s cubic-bezier(.65,0,.35,1);
}
.hero-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 72px 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.hero-slide__eyebrow {
  font-style: italic;
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 0.6em;
}
.hero-slide h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
}
.hero-slide p { color: rgba(255,255,255,0.86); }
.hero-slide__date {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 6px 14px;
  font-family: var(--font-text);
  font-size: 0.9rem;
  margin-bottom: 14px;
  border-radius: var(--radius);
}
.hero-slide__media {
  position: relative;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-slide__media img { width: 100%; height: 100%; object-fit: cover; }

.hero-nav {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-nav button {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  padding: 0;
}
.hero-nav button.is-active { background: var(--gold); }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.hero-arrow--prev { left: 20px; }
.hero-arrow--next { right: 20px; }

@media (max-width: 760px) {
  .hero-slide { grid-template-columns: 1fr; padding: 48px 24px 64px; }
  .hero-slide__media { order: -1; }
}

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 72px 0; }
.section--tint { background: var(--paper); }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.section__head h2 { margin: 0; }
.section__head a { font-style: italic; color: var(--emerald); white-space: nowrap; }

/* Aktualnosci grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}
.news-card { display: flex; flex-direction: column; }
.news-card__media {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--emerald-soft);
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: var(--radius);
}
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
/* wspolny "ribbon" z kategoria - uzywany na kartach i w hero */
.cat-badge {
  position: absolute;
  top: 18px;
  right: 0;
  background: var(--green-deep);
  color: var(--white);
  font-family: var(--font-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.75rem;
  padding: 9px 18px 9px 22px;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  z-index: 2;
}
.news-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.news-card h3 a:hover { color: var(--emerald); }
.news-card p { font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 0; }
.news-card__date { font-size: 0.85rem; color: var(--ink-soft); margin-top: auto; padding-top: 12px; }

@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* Wydarzenia list */
.events-list { display: flex; flex-direction: column; }
.events-list__item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.events-list__date {
  font-family: var(--font-display);
  color: var(--emerald);
  font-size: 1.1rem;
}
.events-list__item h3 { font-size: 1.1rem; margin: 0; }

/* Join CTA band */
.cta-band {
  background: var(--green-deep);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0 auto 28px; }

/* Members grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.member-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 22px;
  border-radius: var(--radius);
  text-align: center;
}
.member-card h3 { font-size: 1rem; margin: 0; }
@media (max-width: 900px) { .members-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================
   CONTENT / SINGLE / PAGE
   ============================================ */
.content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 28px 88px;
}
.content-wrap .entry-header { margin-bottom: 32px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.entry-meta { font-size: 0.9rem; color: var(--ink-soft); font-style: italic; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); margin: 1.4em 0; }
.entry-content a { color: var(--emerald); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.entry-content blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 24px;
  font-style: italic;
  color: var(--ink-soft);
}

.archive-header { padding: 56px 0 20px; text-align: center; background: var(--paper); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.82);
  padding: 64px 0 28px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h4 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.pagination .current { background: var(--green-deep); color: var(--white); border-color: var(--green-deep); }

/* skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-deep); color: var(--white);
  padding: 12px 20px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
