/* ═══════════════════════════════════════════════════════════
   Grav Tabler Theme — theme.css
   Nadpisania i rozszerzenia Tabler UI
   ═══════════════════════════════════════════════════════════ */

/* ── Czcionki ───────────────────────────────────────────── */

/* Lato jako domyślna czcionka treści */
body,
p, li, td, th, label, input, textarea, select, button,
.text-muted, .card-text, .nav-link, .dropdown-item {
  font-family: 'Lato', system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.8;
}

/* Cinzel dla wszystkich tytułów i nagłówków */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.page-title,
.navbar-brand,
.card-title,
.hero h1,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Cinzel dla brand w navbarze */
.navbar-brand span,
.navbar-brand {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ── Responsywny tytuł w headerze ──────────────────────── */
.header-title {
  font-size: 22px;
  line-height: 1.6;
}
@media (min-width: 576px) {
  .header-title { font-size: 28px; }
}
@media (min-width: 768px) {
  .header-title { font-size: 32px; }
}
@media (min-width: 992px) {
  .header-title { font-size: 36px; }
}
@media (min-width: 1200px) {
  .header-title { font-size: 40px; }
}

/* ── Cytat w headerze ─────────────────────────────────── */
.header-quote {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: #1a4570;
}

/* ── Obrazek w headerze — efekt 3D z cieniem ─────────── */
.header-image-wrap {
  position: relative;
  height: 100%;
  margin: 10px 0 0 10px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    -6px 6px 16px rgba(0, 0, 0, 0.25),
    -2px 2px 6px rgba(0, 0, 0, 0.15);
  transform: perspective(800px) rotateY(-2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.header-image-wrap:hover {
  transform: perspective(800px) rotateY(0deg);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1);
}
.header-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Navbar — zaokrąglone rogi + cień ────────────────── */
.navbar {
  border-radius: 6px;
  margin: 6px 10px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── Cieplejsze tło strony ────────────────────────────── */
body {
  background-color: #faf8f5;
}

/* Płynne przewijanie */
html { scroll-behavior: smooth; }

/* Hero — komponenty layoutu */
.hero {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero > .container-xl,
.hero > .container {
  position: relative;
  z-index: 1;
}

/* Odstępy przed nagłówkami h1 w treści */
.card-body h1,
.markdown h1 {
  margin-top: 1.5rem;
}

/* ── Czytelność dla starszych użytkowników ──────────────── */

/* Lepszy kontrast text-muted */
.text-muted {
  color: #495057 !important;
}

/* Większe, wyraźniejsze linki w menu */
.navbar .nav-link {
  font-size: 1.05rem;
  padding: 0.6rem 1rem;
}
.navbar .dropdown-item {
  font-size: 1.05rem;
  padding: 0.5rem 1rem;
}

/* Wyraźniejsze aktywne menu */
.navbar .nav-link.active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Większe przyciski — łatwiejsze celowanie */
.btn {
  font-size: 1.05rem;
  padding: 0.55rem 1.2rem;
}

/* Większy, czytelniejszy footer */
.footer p,
.footer .text-muted {
  font-size: 1rem;
}

/* Większe odstępy między akapitami */
.markdown p,
.card-body p {
  margin-bottom: 1.1em;
}

/* ── Karty-linki na stronie startowej ───────────────────── */
.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Sekcje — domyślne odstępy */
section { width: 100%; }

/* Obrazki w treści stron */
.card-body img {
  max-width: 100%;
  height: auto;
}

/* ── Obrazek 3D — klasa wielokrotnego użytku ──────────── */
.img-3d {
  border-radius: 6px;
  box-shadow:
    -6px 6px 16px rgba(0, 0, 0, 0.25),
    -2px 2px 6px rgba(0, 0, 0, 0.15);
  transform: perspective(800px) rotateY(-2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.img-3d:hover {
  transform: perspective(800px) rotateY(0deg);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Obrazek z cieniem (statyczny) ───────────────────── */
.img-shadow {
  border-radius: 6px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 1px 4px rgba(0, 0, 0, 0.1);
  display: inline-block;
  max-width: 100%;
  height: auto;
}

/* Counter — duże liczby */
[data-controller="counter"] .display-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

/* Animacja wejścia */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    animation: fadeUp 0.5s ease both;
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
  }
}
