﻿/* =========================================================
   STYL GŁÓWNY STRONY
   ========================================================= */
body {
  background-color: #f2efed;
}
body.entries-page {
  background-color: #f8f9fa;
}

/* --- Karty i przyciski --- */
.card {
  transition: transform 0.2s;
  cursor: pointer;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: scale(1.05);
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}
.card-text {
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
}

/* =========================================================
   PRZYCISKI
   ========================================================= */
.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}
.btn-primary:hover {
  background-color: #0056b3;
  border-color: #004085;
}
.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}
.btn-danger:hover {
  background-color: #bb2d3b;
  border-color: #a12633;
}
.btn-warning {
  background-color: #ffc107;
  border-color: #ffc107;
}
.btn-warning:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}

/* =========================================================
   SLAJDER ✅ WERSJA “NIE UCINA, DOPASOWUJE SIĘ”
   ========================================================= */
.slider {
  position: relative;
  width: 100%;
  height: auto;         /* klucz: brak stałej wysokości */
  overflow: visible;    /* klucz: nic nie ucinamy */
  line-height: 0;       /* usuwa mikroszczelinę pod obrazem */
}

/* Obraz zachowuje proporcje */
.slider img {
  width: 100%;
  height: auto;         /* klucz: proporcjonalne skalowanie */
  display: block;
  object-fit: initial;  /* tu object-fit nie jest potrzebny */
}

/* Jeśli kiedyś dodasz tekst na sliderze */
.slider-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: bold;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  line-height: 1.2;
  padding: 0.5rem 0.75rem;

  /* responsywny rozmiar – nie “wychodzi” poza ekran */
  font-size: clamp(1.1rem, 4vw, 3rem);
  max-width: min(92vw, 900px);
}

/* =========================================================
   SEKCJE TREŚCI
   ========================================================= */
.welcome-text {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-size: 1.1rem;
}
.latest-entries h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.latest-entries .row {
  justify-content: center;
}
.latest-entries .card-body {
  text-align: left;
}

/* =========================================================
   MENU I PANEL ADMINA
   ========================================================= */
.logout-btn { margin-left: 1rem; }
.offcanvas { background-color: #910000; }
.offcanvas-title { color: #ffffff; }
.nav-link {
  color: #ffffff !important;
  position: relative;
  padding: 0.5rem 1rem;
}
.nav-item:not(:last-child)::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 20%, rgba(255,255,255,1) 80%, rgba(255,255,255,0) 100%);
  margin: 0.5rem 0;
}
.offcanvas .btn-close {
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707A1 1 0 01.293.293z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  opacity: 1;
}

/* =========================================================
   AKTUALNOŚCI
   ========================================================= */
.news-card {
  border-radius: 12px;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}
.news-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  background-color: #f8f8f8;
  border-bottom: 1px solid #ddd;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: transform 0.2s ease;
}
.news-card:hover .news-thumbnail {
  transform: scale(1.03);
}

/* =========================================================
   GALERIA - Lista albumów (galeria.php)
   ========================================================= */
.album-card {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #fff;
  border: 1px solid #e6e6e6;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.album-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* Miniaturki — dopasowane proporcjonalnie, bez przycinania */
.album-slideshow {
  position: relative;
  width: 100%;
  height: 340px; /* większy kafelek */
  overflow: hidden;
  background: #f2f2f2;
  display: flex;
  justify-content: center;
  align-items: center;
}
.album-slideshow img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ nie ucina zdjęcia */
  background-color: #f2f2f2;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.album-slideshow img.active {
  opacity: 1;
  z-index: 1;
}

.album-info {
  background: #fff;
  padding: 1rem;
  text-align: center;
  border-top: 1px solid #eee;
}
.album-info h5 {
  font-weight: 700;
  color: #222;
  margin-bottom: 0.3rem;
}
.album-info p {
  color: #777;
  font-size: 0.9rem;
  margin: 0;
}

/* =========================================================
   GALERIA - Widok pojedynczego albumu (galeria-album.php)
   ========================================================= */
.gallery-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.gallery-tile {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e7e7e7;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.gallery-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}
.gallery-tile img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: #f2f2f2;
  transition: transform .35s ease;
}
.gallery-tile:hover img { transform: scale(1.02); }
.photo-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .5rem .65rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 75%);
  color: #fff;
  font-size: .92rem;
  opacity: 0;
  transition: opacity .25s ease;
  text-align: center;
}
.gallery-tile:hover .photo-caption { opacity: 1; }

#lightboxModal .modal-content { background: #000; }
#lightboxModal img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
}
#lightboxCaption {
  font-size: 1rem;
  color: #fff;
  text-align: center;
  padding: .75rem 1rem 1rem;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  font-size: 2.2rem;
  padding: .25rem .7rem;
  cursor: pointer;
  z-index: 10;
  transition: background .2s ease;
}
.lightbox-arrow:hover { background: rgba(0,0,0,.7); }
.lightbox-arrow.left { left: 10px; }
.lightbox-arrow.right { right: 10px; }

/* =========================================================
   RESPONSYWNOŚĆ
   ========================================================= */
@media (max-width: 992px) {
  .album-slideshow { height: 280px; }
}
@media (max-width: 768px) {
  .album-slideshow { height: 220px; }
  .gallery-tile img { height: 200px; }
}
@media (max-width: 576px) {
  .album-slideshow { height: 180px; }
  .gallery-tile img { height: 180px; }
}

/* --- Poprawka: zmniejszenie odstępu między tytułem a treścią artykułu w kafelku --- */
.news-card .card-title {
    margin-bottom: 0.2rem !important; /* było 0.75rem */
    line-height: 1.3;
}

.news-card .card-text {
    margin-top: 0 !important;
    margin-bottom: 0.8rem; /* lekki oddech przed przyciskiem */
    line-height: 0.4;
}

.article-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* upewnij się, że font jest załadowany (np. z Google Fonts) */
.wwsi-brand{
  font-family: "Noto Serif", serif;
  font-weight: 400;     /* bez bolda */
  font-style: normal;   /* bez kursywy */
}

/* Cookie */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #212529;
    color: #fff;
    padding: 15px 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cookie-text {
    font-size: 14px;
}

.cookie-text a {
    color: #C62828;
    text-decoration: none;
}

.cookie-btn {
    background: #C62828;
    border: none;
    color: white;
    font-size: 18px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 5px;
}

/* MOBILE */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-btn {
        align-self: flex-end;
    }
}