/* ═══════════════════════════════════════════════
   Biuro Rachunkowe Dagmara Kania — style.css
═══════════════════════════════════════════════ */

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

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

:root {
  --navy:  #0f2340;
  --navy2: #1a3560;
  --gold:  #c8a84b;
  --gold2: #e8c870;
  --light: #f5f3ee;
  --white: #ffffff;
  --text:  #2c2c2c;
  --muted: #6b6b6b;
  --line:  rgba(200,168,75,.22);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--light);
  color: var(--text);
  overflow-x: hidden;
}

/* ── NAVIGATION ─────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 70px;
  background: rgba(15,35,64,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
nav.scrolled { box-shadow: 0 4px 40px rgba(0,0,0,.45); }

.nav-brand {
  display: flex; flex-direction: column; gap: 2px;
  text-decoration: none; cursor: pointer;
}
.nav-brand strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; color: var(--white);
  letter-spacing: .03em; transition: color .25s;
}
.nav-brand span {
  font-size: .67rem; color: var(--gold);
  letter-spacing: .16em; text-transform: uppercase;
  transition: opacity .25s;
}
.nav-brand:hover strong { color: var(--gold); }
.nav-brand:hover span  { opacity: .65; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.68); letter-spacing: .1em; text-transform: uppercase;
  position: relative; padding-bottom: 3px; transition: color .25s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--gold); transition: width .3s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* ── HERO ────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: flex-start;
  gap: 80px;
  background: var(--navy);
  position: relative; overflow: hidden;
  padding: 80px 8vw 80px;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .glow {
  position: absolute; top: -20%; right: -10%;
  width: 65vw; height: 90vh;
  background: radial-gradient(ellipse at center, rgba(200,168,75,.07) 0%, transparent 65%);
}
.hero-bg .bottom-line {
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-kidp-corner {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: -30px;
  animation: fadeUp .8s .1s cubic-bezier(.22,1,.36,1) both;
}
.hero-kidp-logo {
  height: clamp(110px, 12vw, 180px); width: auto;
  opacity: .9; transition: opacity .3s;
}
.hero-kidp-logo:hover { opacity: 1; }
.hero-kidp-divider {
  width: 1px; height: clamp(48px, 6vw, 80px);
  background: var(--gold); opacity: .5;
}
.hero-kidp-text {
  font-size: clamp(.72rem, .95vw, .85rem);
  font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); opacity: .85;
}

.hero-content {
  flex: 1;
  max-width: 780px; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  animation: fadeUp .9s cubic-bezier(.22,1,.36,1) both;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5.2vw, 5.2rem);
  font-weight: 700; color: var(--white);
  line-height: .95; margin-bottom: 16px;
  white-space: nowrap;
}
h1 em { font-style: normal; color: var(--gold); }

.hero-subtitle {
  font-size: clamp(.95rem, 1.1vw, 1.1rem);
  color: rgba(255,255,255,.48);
  letter-spacing: .08em; margin-bottom: 28px;
}
.hero-desc {
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  color: rgba(255,255,255,.66);
  line-height: 1.85; max-width: 580px; margin-bottom: 48px;
}

.hero-since {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 14px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  margin-bottom: 52px;
}
.hero-since .year {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; color: var(--gold); font-weight: 700;
}
.hero-since .label {
  font-size: .8rem; color: rgba(255,255,255,.42);
  line-height: 1.4; text-transform: uppercase; letter-spacing: .1em;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 16px 36px; background: var(--gold); color: var(--navy);
  font-weight: 700; font-size: .9rem;
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .25s, transform .2s, box-shadow .25s;
}
.btn-primary:hover {
  background: var(--gold2); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,168,75,.28);
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 16px 36px; background: transparent;
  color: rgba(255,255,255,.68); font-weight: 500; font-size: .9rem;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  border: 1px solid rgba(255,255,255,.18);
  transition: border-color .25s, color .25s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── SECTIONS GENERIC ───────────────────────── */
section { padding: 100px 5vw; }

.section-label {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.section-label::before {
  content: ''; display: block; width: 32px; height: 1px; background: var(--gold);
}
.section-label span {
  font-size: .73rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700; color: var(--navy);
  line-height: 1.2; margin-bottom: 18px;
}
.section-intro {
  font-size: 1.02rem; color: var(--muted);
  line-height: 1.8; max-width: 760px; margin-bottom: 56px;
}

/* ── SERVICES ───────────────────────────────── */
#uslugi { background: var(--white); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 2px;
}

.service-card {
  padding: 40px 34px; background: var(--light);
  border-top: 3px solid transparent;
  position: relative; overflow: hidden;
  transition: border-color .3s; cursor: default;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--navy);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .44s cubic-bezier(.22,1,.36,1);
  z-index: 0;
}
.service-card:hover { border-color: var(--gold); }
.service-card:hover::before { transform: scaleY(1); }
.service-card:hover .card-title,
.service-card:hover .card-items li { color: rgba(255,255,255,.8); }
.service-card:hover .card-icon svg { stroke: var(--gold); }

.card-icon {
  width: 46px; height: 46px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(26,53,96,.18); background: rgba(26,53,96,.04);
  position: relative; z-index: 1;
  transition: border-color .3s, background .3s;
}
.service-card:hover .card-icon {
  border-color: rgba(200,168,75,.3); background: rgba(200,168,75,.06);
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--navy2); transition: stroke .3s; }

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 600; color: var(--navy);
  margin-bottom: 16px; position: relative; z-index: 1; transition: color .3s;
}
.card-items { list-style: none; position: relative; z-index: 1; }
.card-items li {
  font-size: .87rem; color: var(--muted);
  padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.06);
  transition: color .3s;
  display: flex; align-items: center; gap: 8px;
}
.card-items li:last-child { border-bottom: none; }
.card-items li::before { content: '–'; color: var(--gold); font-size: .78rem; flex-shrink: 0; }

/* ── AKTUALNOŚCI ────────────────────────────── */
#aktualnosci { background: var(--light); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-loading {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--muted); font-style: italic;
}

.news-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,.06);
  padding: 32px 30px;
  position: relative;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  cursor: pointer;
  display: flex; flex-direction: column;
  border-top: 3px solid var(--gold);
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,35,64,.08);
  border-color: rgba(200,168,75,.4);
}

.news-category {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.news-category--ciekawostka { color: var(--gold); }
.news-category--zmiana { color: #b8553e; }
.news-category--ogloszenie { color: var(--navy2); }

.news-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 600;
  color: var(--navy); line-height: 1.3;
  margin-bottom: 14px;
}

.news-excerpt {
  font-size: .92rem; color: var(--muted);
  line-height: 1.7; margin-bottom: 18px;
  flex: 1;
  text-align: justify;
  hyphens: auto;
}

.news-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.06);
}
.news-date {
  font-size: .78rem; color: var(--muted);
  letter-spacing: .05em;
}
.news-readmore {
  font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy2);
  display: flex; align-items: center; gap: 6px;
  transition: color .25s, gap .25s;
}
.news-card:hover .news-readmore {
  color: var(--gold); gap: 10px;
}

.news-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 80px 20px;
  color: var(--muted); font-style: italic;
}

/* Modal dla pełnego postu */
.news-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,35,64,.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .3s ease;
}
.news-modal.open { display: flex; }
.news-modal-content {
  background: var(--white);
  max-width: 720px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  position: relative;
  border-top: 4px solid var(--gold);
  animation: fadeUp .4s cubic-bezier(.22,1,.36,1);
}
.news-modal-close {
  position: absolute; top: 16px; right: 20px;
  background: transparent; border: none;
  font-size: 2rem; line-height: 1;
  color: var(--muted); cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.news-modal-close:hover { color: var(--navy); }
.news-modal-body {
  padding: 50px 50px 40px;
}
.news-modal-body .news-category { font-size: .72rem; margin-bottom: 16px; }
.news-modal-body .news-title {
  font-size: 1.8rem; margin-bottom: 12px;
}
.news-modal-body .news-date { margin-bottom: 28px; display: block; }
.news-modal-body .news-content {
  font-size: 1rem; color: var(--text);
  line-height: 1.85;
  white-space: pre-wrap;
  text-align: justify;
  hyphens: auto;
}

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ── ABOUT ──────────────────────────────────── */
#o-nas { background: var(--navy); position: relative; overflow: hidden; }
#o-nas::before {
  content: ''; position: absolute; top: -30%; right: -5%;
  width: 50vw; height: 80%;
  background: radial-gradient(ellipse, rgba(200,168,75,.06) 0%, transparent 65%);
  pointer-events: none;
}
#o-nas h2 { color: var(--white); }
#o-nas .section-intro { color: rgba(255,255,255,.52); }

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.about-text p {
  font-size: 1rem; color: rgba(255,255,255,.66); line-height: 1.9; margin-bottom: 20px;
}
.about-text strong { color: var(--gold); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.stat-box {
  padding: 32px 26px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(200,168,75,.12);
  transition: background .3s, border-color .3s;
}
.stat-box:hover { background: rgba(200,168,75,.05); border-color: rgba(200,168,75,.28); }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; font-weight: 700;
  color: var(--gold); line-height: 1; margin-bottom: 8px;
}
.stat-label {
  font-size: .75rem; color: rgba(255,255,255,.38);
  text-transform: uppercase; letter-spacing: .13em;
}

/* ── CONTACT ────────────────────────────────── */
#kontakt { background: var(--light); }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.contact-block { margin-bottom: 34px; }
.contact-block-title {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.contact-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.contact-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 17px; height: 17px; stroke: var(--gold); }
.contact-detail { font-size: .95rem; color: var(--text); line-height: 1.65; padding-top: 8px; }
.contact-detail a {
  color: var(--navy2); text-decoration: none;
  border-bottom: 1px solid rgba(200,168,75,.25);
  transition: color .2s, border-color .2s;
}
.contact-detail a:hover { color: var(--gold); border-color: var(--gold); }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table tr { border-bottom: 1px solid rgba(0,0,0,.07); }
.hours-table tr:last-child { border-bottom: none; }
.hours-table td { padding: 9px 0; font-size: .9rem; color: var(--text); }
.hours-table td:last-child { color: var(--muted); text-align: right; }
.hours-table tr.closed td { opacity: .4; }

.map-wrapper {
  border: 2px solid var(--navy); overflow: hidden; height: 340px;
}
.map-wrapper iframe {
  width: 100%; height: 100%; border: none; display: block;
  filter: grayscale(20%) contrast(1.05);
}
.map-meta {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 12px; font-size: .78rem; color: var(--muted);
}

/* ── FOOTER ─────────────────────────────────── */
footer {
  background: var(--navy); padding: 36px 5vw;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  border-top: 1px solid rgba(200,168,75,.12);
}
footer p { font-size: .78rem; color: rgba(255,255,255,.3); }
footer strong { color: rgba(255,255,255,.46); }
.footer-badge {
  display: flex; align-items: center; gap: 10px;
  font-size: .76rem; color: rgba(255,255,255,.3);
}
.badge-dot {
  width: 6px; height: 6px; background: var(--gold);
  border-radius: 50%; animation: pulse 2.4s infinite;
}

/* Link do panelu admina w stopce */
.footer-admin-link {
  font-size: .72rem;
  color: rgba(255,255,255,.35);
  text-decoration: none;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,.12);
  transition: color .25s, border-color .25s, background .25s;
}
.footer-admin-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(200,168,75,.06);
}

/* ── ANIMATIONS ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity: 1; } 50% { opacity: .2; }
}

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .75s ease, transform .75s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  footer { flex-direction: column; text-align: center; }
  h1 { white-space: normal; }
  .hero-kidp-text { font-size: .7rem; }
  #hero { padding: 80px 8vw 60px; }
  .hero-kidp-corner { margin-bottom: -20px; }
  .news-modal-body { padding: 40px 28px 30px; }
  .news-modal-body .news-title { font-size: 1.4rem; }
}
@media (max-width: 500px) {
  #hero { padding: 80px 6vw 60px; }
  .hero-kidp-corner { gap: 12px; margin-bottom: -15px; }
  .hero-kidp-logo { height: 90px; }
  .hero-kidp-divider { height: 40px; }
  .hero-since { padding: 12px 20px; }
  .hero-since .year { font-size: 1.8rem; }
  .btn-primary, .btn-ghost { padding: 13px 24px; font-size: .8rem; }
  .news-card { padding: 26px 22px; }
}
