* {
  font-family: "Open Sans", sans-serif;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.logo-bar {
  max-width: 1200px;
  margin: 16px auto 10px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.logo-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.logo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #ffffff, #f2f8ff);
}
.logo-item img {
  height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(20%) contrast(1.02);
  transition: filter 0.2s ease;
}
.logo-item:hover img {
  filter: none;
}
.logo-meta {
  min-width: 0;
}
.logo-meta .logo-title {
  font-weight: 800;
  color: #0b70c6;
  line-height: 1.25;
}
.logo-meta .logo-sub {
  color: #3a556a;
  opacity: 0.85;
  margin-top: 4px;
  font-size: 0.95rem;
}
.logo-meta a {
  color: #0b70c6;
  font-weight: 700;
  text-decoration: none;
  position: relative;
}
.logo-meta a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #0b70c6;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.logo-meta a:hover::after {
  transform: scaleX(1);
}
@media (max-width: 1100px) {
  .logo-item img {
    height: 64px;
  }
}
@media (max-width: 900px) {
  .logo-bar {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .logo-bar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px;
  }
  .logo-item {
    grid-template-columns: auto 1fr;
  }
  .logo-item img {
    height: 56px;
  }
  .logo-meta .logo-title {
    font-size: 1rem;
  }
  .logo-meta .logo-sub {
    font-size: 0.9rem;
  }
}
.logo-title,
.logo-sub {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
main {
  flex: 1;
  padding: 40px 20px;
  background-color: #f5f5f5;
}
.pager {
  max-width: 1200px;
  margin: 12px auto 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.pager-btn {
  background: white;
  border: 2px solid #00adef;
  color: #00adef;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
  min-width: 38px;
}
.pager-btn:hover {
  background: #00adef;
  color: #fff;
}
.pager-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pager-info {
  font-weight: 700;
  color: #007bbf;
  padding: 0 6px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  align-items: stretch;
}
 .gallery-item {
  display: flex;
  flex-direction: column;
  height: 100%; 
  position: relative;
  background: var(--group-bg, #ffffff);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, background 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 220px;    
  object-fit: cover; 
  border-bottom: 3px solid #00adef;
}

.gallery-item p {
  flex-grow: 1;    
  display: flex;
  align-items: center;     
  justify-content: center;  
  text-align: center;
  padding: 15px 20px;   
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b70c6;
  line-height: 1.4;    
}
.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.gallery-item .date-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 173, 239, 0.9);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 2;
  pointer-events: none;
}

/* --- WSPÓLNY TYTUŁ NAD POGRUPOWANYMI KAFELKAMI (np. w Aktualnościach) --- */
.gallery-group-title {
  grid-column: 1 / -1;
  text-align: center;
  margin: 14px 0 4px;
  padding: 0 10px;
  opacity: 0;
  transform: translateY(12px);
  animation: group-title-in 0.6s ease forwards;
}
.gallery-group-title span {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.35;
  color: #0b70c6;
  background: linear-gradient(90deg, #0b70c6, #00adef, #0b70c6);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: group-title-shimmer 3.5s linear infinite;
}
.gallery-group-title span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b70c6, #00adef);
  transform: translateX(-50%);
  animation: group-title-underline 0.7s ease forwards 0.25s;
}
@keyframes group-title-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes group-title-underline {
  to {
    width: 110px;
  }
}
@keyframes group-title-shimmer {
  to {
    background-position: -200% center;
  }
}
@media (max-width: 600px) {
  .gallery-group-title span {
    font-size: 1.1rem;
  }
}

.gallery-compact {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}
.powiat-things,
.kursy-things,
.schroniska-things,
.pttk-things,
.ptsm-things,
.cookies-things {
  max-width: 1100px;
  margin: 60px auto;
  background: #f9fcff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
  line-height: 1.8;
  color: #1c1c1c;
}
.powiat-things h2,
.kursy-things h2,
.schroniska-things h2,
.pttk-things h2,
.ptsm-things h2,
.cookies-things h2 {
  text-align: center;
  color: #0066cc;
  margin-bottom: 20px;
  font-size: 2em;
}
.pttk-things table,
.ptsm-things table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  margin: 10px 0 24px;
  font-size: 0.98rem;
}
.pttk-things td,
.ptsm-things td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid #e8f0ff;
}
.pttk-things tr:last-child td,
.ptsm-things tr:last-child td {
  border-bottom: none;
}
.pttk-things td:first-child,
.ptsm-things td:first-child {
  width: 42%;
  background: linear-gradient(180deg, #f6fbff, #eef6ff);
  color: #0b70c6;
  font-weight: 700;
}
.pttk-things td:last-child strong,
.ptsm-things td:last-child strong {
  color: #0b70c6;
}
.pttk-things tr:hover td,
.ptsm-things tr:hover td {
  background: #f9fcff;
}
.pttk-things tr:nth-child(2n) td,
.ptsm-things tr:nth-child(2n) td {
  background: #fbfdff;
}
@media (max-width: 600px) {
  .pttk-things table,
  .ptsm-things table {
    font-size: 0.97rem;
  }
  .pttk-things tr,
  .ptsm-things tr {
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid #e8f0ff;
  }
  .pttk-things tr:last-child,
  .ptsm-things tr:last-child {
    border-bottom: none;
  }
  .pttk-things td,
  .ptsm-things td {
    display: block;
    border: none;
    padding: 6px 0;
    background: transparent;
  }
  .pttk-things td:first-child,
  .ptsm-things td:first-child {
    background: transparent;
    color: #4a6fa1;
    padding-bottom: 2px;
  }
  .pttk-things td:last-child,
  .ptsm-things td:last-child {
    padding-top: 0;
  }
}
.map iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
  .map iframe {
    height: 400px;
  }
}

footer {
  margin-top: auto;
  color: #fff;
  background: linear-gradient(180deg, #00adef, #0078c2);
  padding: 42px 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 18px;
  align-items: start;
}
.footer-contact {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 18px 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.footer-contact:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  background: rgba(255, 255, 255, 0.1);
}
.footer-contact p {
  margin: 6px 0;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}
.footer-contact p strong {
  color: #fff;
  font-weight: 800;
}
footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  position: relative;
}
footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  opacity: 0.9;
}
footer a:hover::after {
  transform: scaleX(1);
}
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 980px) {
  footer {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 640px) {
  footer {
    grid-template-columns: 1fr;
    padding: 28px 16px;
  }
  .footer-contact {
    padding: 16px;
  }
}
#admin-login-btn {
  position: fixed !important;
  bottom: 6px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 1200;
}
#admin-login-btn:hover {
  transform: translateY(-1px);
}
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  margin-top: 10px;
  padding: 12px 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}
.footer-bottom .fb-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}
.fb-left {
  text-align: left;
}
.fb-center {
  text-align: center;
  opacity: 0.95;
}
.fb-right {
  text-align: right;
}
.footer-bottom a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  position: relative;
}
.footer-bottom a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.footer-bottom a:hover::after {
  transform: scaleX(1);
}
@media (max-width: 720px) {
  .footer-bottom .fb-wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .fb-left,
  .fb-center,
  .fb-right {
    text-align: center;
  }
}

#cookie-popup {
  position: fixed;
  bottom: 30px;
  right: 30px;
  max-width: 400px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
  padding: 20px 24px;
  color: #003366;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  z-index: 9999;
  display: none;
  animation: popupSlide 0.4s ease-out;
  border-top: 4px solid #00adef;
}

@keyframes popupSlide {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#cookie-popup h3 {
  margin-top: 0;
  color: #004c99;
  font-size: 18px;
}

#cookie-popup a {
  color: #007bff;
  text-decoration: underline;
  font-weight: 600;
}

#cookie-popup a:hover {
  text-decoration: none;
}

#cookie-popup .cp-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

#cookie-popup button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

#cookie-popup #cookie-necessary {
  background: #004c99;
  color: #fff;
}

#cookie-popup #cookie-necessary:hover {
  background: #0066cc;
  transform: translateY(-1px);
}

#cookie-popup #cookie-accept-all {
  background: #00adef;
  color: #fff;
}

#cookie-popup #cookie-accept-all:hover {
  background: #26c6ff;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  #cookie-popup {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: unset;
    padding: 18px;
  }

  #cookie-popup .cp-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  #cookie-popup button {
    width: 100%;
  }
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.tab-button {
  background-color: white;
  border: 2px solid #00adef;
  color: #00adef;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}
.tab-button:hover {
  background-color: #00adef;
  color: white;
}
.tab-button.active {
  background-color: #00adef;
  color: white;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.main-tab {
  display: none;
  animation: fadeIn 0.3s ease;
}
.main-tab.active {
  display: block;
}
.subtabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.subtab-button {
  background-color: white;
  border: 1px solid #00adef;
  color: #00adef;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}
.subtab-button:hover {
  background-color: #00adef;
  color: white;
}
.subtab-button.active {
  background-color: #00adef;
  color: white;
}
.subtab-content {
  display: none;
  background: white;
  border-radius: 12px;
  padding: 25px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}
.subtab-content.active {
  display: block;
}
.documents-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.documents-item {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}
.documents-item h3 {
  margin-bottom: 8px;
  color: #333;
}
.documents-item a {
  color: #00adef;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}
.documents-item a:hover {
  color: #007bbf;
}

.results-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.result-card.konkurs-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid #eef2f7;
}

.result-card.konkurs-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 173, 239, 0.15);
}

.result-card.konkurs-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 3px solid #00adef;
}

.result-card.konkurs-card p {
 font-size: 1rem;
  font-weight: 700;
  color: #0b70c6;
  text-align: center;
  padding: 10px 0 0 0;
}

.badge {
  display: inline-block;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  background: #00adef;
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
}

.result-block {
  background: #fff;
  border: 1px solid #e8f0ff;
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  box-shadow: 0 2px 10px rgba(0, 60, 120, 0.06);
}
.result-block .category {
  margin: 0 0 8px 0;
  font-weight: 700;
}
.pill {
  display: inline-block;
  margin: 6px 0 4px;
  color: #0f3b66;
  background: linear-gradient(180deg, #f6fbff, #eef6ff);
  border: 1px solid #d9e8ff;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 800;
}
.eq {
  display: inline-block;
  margin-left: 6px;
  font-weight: 800;
  color: #007bbf;
  background: #e6f6ff;
  border: 1px solid #bfe8ff;
  border-radius: 999px;
  padding: 2px 8px;
}
.plain-list {
  list-style: none;
  margin: 6px 0 10px;
  padding: 0;
}
.plain-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.plain-list li:hover {
  background: #f7fbff;
}
.plain-list li strong {
  font-weight: 700;
}
@media (min-width: 1024px) {
  .results-gallery {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  }
}
.result-card.konkurs-card img {
  height: 240px;
  object-fit: cover;
}

.plain-list li {
  gap: 12px;
  padding: 8px 10px;
}
.mini-thumb {
  width: 400px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}
.result-gallery-grid .result-card img {
  height: 240px;
}
.plain-list li strong {
  font-size: 16px;
  line-height: 1.2;
}
.pill {
  display: block;
  text-align: center;
}
.result-block .category {
  text-align: center;
}
.plain-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  justify-items: center;
  margin-top: 10px;
}
.plain-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 10px;
  border-radius: 12px;
}
.mini-thumb {
  display: block;
  width: 400px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  margin-bottom: 8px;
}
.plain-list li strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}
@media (max-width: 600px) {
  .plain-list {
    grid-template-columns: 1fr;
  }
  .mini-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
  }
}

#gallery-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.group-row {
  display: flex;
  flex-direction: column;
  background: #f2f6fa;  
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.group-row:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.group-row img.gallery-cover {
  width: 100%;
  max-height: 250px;     
  object-fit: contain;   
  object-position: top;   
  display: block;
  background-color: #f2f6fa; 
  border-radius: 16px 16px 0 0;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.group-row img.gallery-cover:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.group-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0b70c6;
  text-align: center;
  padding: 10px 0 0 0;
}

.group-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 12px;
  background: #f9fcff;
}

.group-count {
  font-weight: 700;
  color: #007bbf;
}

.group-link {
  text-decoration: none;
  color: #00adef;
  font-weight: 600;
  transition: color 0.2s ease;
}
.group-link:hover {
  color: #007bbf;
  text-decoration: underline;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.pager-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 2px solid #00adef;
  background: white;
  color: #00adef;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.pager-btn:hover {
  background: #00adef;
  color: white;
}

.pager-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pager-info {
  font-weight: 700;
  color: #007bbf;
  padding: 0 8px;
}

.modal {
  display: none; 
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  padding: 60px 40px 40px; 
  border-radius: 24px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}


.modal-content h2 {
    color: #0b70c6;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
    text-align: center;
}

#modal-body, 
.modal-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: black;
    text-align: justify; 
    hyphens: auto;
    margin-bottom: 15px;
}

.modal-content .date-info {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-style: italic;
    text-align: center;
}

.modal-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.modal-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 40px 20px 20px;
    }
    
    .modal-content h2 {
        font-size: 1.4rem;
    }
    
    #modal-body, 
    .modal-content p {
        text-align: left; 
        font-size: 0.95rem;
    }
}

#modal-body a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, #00adef 0%, #007bbf 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#modal-body a:hover {
    background: linear-gradient(135deg, #007bbf 0%, #005a8c 100%);
    transform: translateY(-2px);
    color: #fff !important;
}


#modal-body {
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: #fff;
  color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  cursor: pointer;
  z-index: 10002;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.2s;
  border: 1px solid #eee;
}

.modal .close:hover {
  background: #00adef;
  color: #fff;
}

.modal-image-container {
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

.modal-image-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  display: inline-block;
}


.modal-content .plain-list {
  display: flex ;
  flex-direction: column ;
  align-items: center ;
  grid-template-columns: none ; 
  width: 100% ;
  max-width: 100% ;
}


.modal-results-wrapper {
  display: flex ;
  flex-direction: column ;
  align-items: center ;
  width: 100%;
}

.modal-content .result-block {
  margin-left: auto ;
  margin-right: auto ;
  width: 100%;
  max-width: 800px; 
}

.modal-content .mini-thumb {
  width: auto ;
  max-width: 100% ;
  margin: 0 auto 10px auto ;
}

#wyniki-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#wyniki-modal .modal-content {
  margin: auto; 
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

#wyniki-modal[style*="display: block"],
#wyniki-modal[style*="display: flex"] {
  display: flex !important;
}

.main-title {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 0 20px;
  text-align: center;
}

.main-title h1 {
  font-size: 2.1rem;
  font-weight: 900;
  color: #0b70c6;
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.main-title p {
  font-size: 1rem;
  font-weight: 600;
  color: #3a556a;
  opacity: 0.85;
}

.main-title::after {
  content: "";
  display: block;
  width: 160px;
  height: 3px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, #00adef, transparent);
  border-radius: 999px;
}

@media (max-width: 768px) {
  .main-title h1 {
    font-size: 1.6rem;
  }

  .main-title p {
    font-size: 0.95rem;
  }
}
@media (max-width: 900px) {
  #gallery-box {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #gallery-box {
    grid-template-columns: 1fr;
  }
}


#articles-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.article-list-item {
    width: 100%;
    background: #ffffff;
    border-radius: 16px; 
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.article-list-item:hover {
    transform: translateY(-4px);
}

.article-list-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #00adef, #0b70c6);
    transition: width 0.2s ease;
}

.article-list-item:hover::before {
    width: 10px;
}


.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.article-category {
    background: rgba(0, 173, 239, 0.1);
    color: #0b70c6;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.article-date {
    color: #3a556a;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.7;
}

.article-list-item h2 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    color: #0b70c6; 
    font-weight: 800;
    line-height: 1.3;
}

.article-excerpt {
    margin: 0;
    color: #3a556a;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-more {
    margin-top: 18px;
    display: inline-block;
    color: #00adef;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.article-list-item:hover .article-more {
    color: #0b70c6;
}