@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');




:root {
  --primary-color: #1a1a1a;
  --secondary-color: #800000;
  --text-color: #213547;
  --background-color: #ffffff;
}

body {
  font-family: "Lexend", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;


  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

.main-header {
  padding: 2rem 0;
  background-color: #800000;
}

.logo {
  max-width: 239px;
  height: auto;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.sticky-header {
  position: sticky;
  top: 0;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1rem 0;
  z-index: 1000;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-primary {
  background-color: #800000 !important;
  border-color: #800000 !important;
}

.btn-primary:hover {
  background-color: #600000 !important;
  border-color: #600000 !important;
}

.btn-outline-primary {
  color: #800000 !important;
  border-color: #800000 !important;
}

.btn-outline-primary:hover, .btn-outline-primary.active {
  background-color: #800000 !important;
  color: white !important;
}

.content-box {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.gallery-section {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: #f8f9fa;
  padding: 12px;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px; /* lekko zaokrąglone rogi */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


.gallery-item:hover {
  transform: translateY(-5px);
}

.category-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.contact-box {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: #f8f9fa;
  margin-bottom: 2rem;
}

/* Modal styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
}

.modal-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-description {
  margin-top: 15px;
  color: var(--text-color);
  text-align: center;
  font-size: 1.1em;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #800000;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
}

.close-button:hover {
  background: #600000;
}

@media (max-width: 768px) {
  .nav-buttons {
    flex-wrap: wrap;
  }
  
  .nav-buttons .btn {
    width: calc(50% - 0.5rem);
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
}

.Nazwa-Strony {
  color: #fff7f3;
}

body.dark-mode {
  --background-color: #121212;
  --text-color: #f1f1f1;
}

body.dark-mode .main-header {
  background-color: #4a0000; /* ciemniejszy bordowy dla nagłówka */
}

body.dark-mode .sticky-header {
  background-color: #1e1e1e;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

body.dark-mode .content-box,
body.dark-mode .contact-box,
body.dark-mode .gallery-section {
  background-color: #2c2c2c;
}

body.dark-mode .modal-content {
  background-color: #2c2c2c;
  color: var(--text-color);
}

/* Animacja przejścia trybu jasny <-> ciemny */
body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-mode {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.main-header,
.sticky-header,
.content-box,
.contact-box,
.gallery-section,
.modal-content {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.site-title {
  font-size: 1.5rem;
  color: var(--text-color);
  transition: color 0.5s;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2001;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: 0.4s;
}

.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.menu-content {
  max-height: 0;
  overflow: hidden;
  background-color: #f8f9fa;
  transition: max-height 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  margin-top: 5px;
}

.menu-content.open {
  max-height: 300px;
}

.menu-item {
  margin: 10px 0;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

.menu-item:hover {
  transform: scale(1.1);
  color: var(--secondary-color);
}

.switch-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.switch-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

.switch-btn:hover {
  background: var(--secondary-color);
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  z-index: 2001;
}

.menu-toggle .bar {
  width: 30px;
  height: 3px;
  background-color: var(--text-color);
  transition: 0.4s;
}

.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Rozwijane menu */
.menu-content {
  max-height: 0;
  overflow: hidden;
  background-color: var(--background-color);
  transition: max-height 0.5s ease, padding 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0;
}

.menu-content.open {
  max-height: 400px;
  padding: 20px 0 30px 0; /* ⬅️ Dodałem dolny padding */
}

body.dark-mode .menu-content {
  background-color: #2c2c2c;
}

.menu-item {
  margin: 10px 0;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

.menu-item:hover {
  transform: scale(1.1);
  color: var(--secondary-color);
}

@media (min-width: 992px) {
  #menuToggle {
    display: none !important;
  }

  .menu-content {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    max-height: none !important;
    padding: 0 !important;
    gap: 1.5rem;
  }

  .menu-content.open {
    max-height: none;
  }

  .switch-group {
    flex-direction: row;
    margin-top: 0;
    gap: 0.5rem;
  }

  .menu-item {
    margin: 0;
  }
}

@media (max-width: 991.98px) {
  #stickyHeader .container {
    flex-direction: column;
    align-items: stretch;
  }

  .menu-content {
    width: 100%;
    align-items: flex-start;
    padding: 1rem 1rem 2rem;
    gap: 0.75rem;
    background-color: var(--background-color);
    border-top: 1px solid #ccc;
  }

  .menu-item {
    width: 100%;
    text-align: left;
    padding-left: 0.5rem;
  }

  .switch-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0.5rem;
  }
}

@media (max-width: 991.98px) {
  #stickyHeader .container {
    flex-direction: column;
    align-items: stretch;
  }

  #menuToggle {
    align-self: center;
    margin: 0 0 0 auto;
  }

  .menu-content {
    width: 100%;
    align-items: flex-start;
    padding: 1rem;
    background-color: var(--background-color);
    border-top: 1px solid #ccc;
  }

  .menu-item {
    width: 100%;
    text-align: left;
    padding-left: 0.5rem;
  }

  .switch-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0.5rem;
  }
}

/* Domyślnie ukryj menu */
.menu-content {
  display: none;
  background-color: transparent;
}

/* Gdy menu otwarte — pokaż */
.menu-content.open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 1rem;
  gap: 0.75rem;
  background-color: var(--background-color);
  border-top: 1px solid #ccc;
  
}

/* Styl tylko dla dużych ekranów */
@media (min-width: 992px) {
  .menu-content {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 0 !important;
  }

  .menu-content.open {
    display: flex !important;
  }
}

@media (max-width: 991.98px) {
  .sticky-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .menu-content {
    flex-direction: column;
  }
}

/* Domyślnie ukryj menu */
.menu-content {
  display: none;
}

.menu-content.open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 1rem;
  gap: 0.75rem;
  background-color: var(--background-color);
  border-top: 1px solid #ccc;
}

/* Styl dla desktopu */
@media (min-width: 992px) {
  .menu-content {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: 0 !important;
    gap: 1.5rem;
  }

  #menuToggle {
    display: none !important;
  }
}

/* Styl dla mobile */
@media (max-width: 991.98px) {
  .nav-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  #menuToggle {
    margin-left: auto;
  }

  .menu-content {
    width: 100%;
  }

  .menu-item {
    width: 100%;
    text-align: left;
    padding-left: 0.5rem;
  }

  .switch-group {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0.5rem;
    width: 100%;
  }
}

@media (min-width: 992px) {
  .sticky-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
  }

  .menu-content {
    background-color: transparent;
    padding: 0;
    border: none;
    width: auto;
  }

  .menu-item {
    padding: 0 1rem;
  }

  .switch-group {
    flex-direction: row;
    gap: 0.5rem;
  }
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  margin-left: 0.5rem;
}

.toggle-switch input {
  display: none;
}

.toggle-switch .slider {
  width: 42px;
  height: 22px;
  background-color: #ccc;
  border-radius: 34px;
  position: relative;
  transition: background-color 0.3s;
}

.toggle-switch .slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch input:checked + .slider {
  background-color: #800000;
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(20px);
}

.toggle-switch .label {
  font-size: 0.9rem;
  color: var(--text-color);
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  display: none;
}

.toggle-switch .slider {
  width: 52px;
  height: 28px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border-radius: 34px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.1),
    0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid rgba(255,255,255,0.3);
}

.toggle-switch .slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.15),
    0 4px 16px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.8);
}

.toggle-switch input:checked + .slider {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.1),
    0 2px 12px rgba(220, 38, 38, 0.3),
    0 0 20px rgba(220, 38, 38, 0.1);
}

.toggle-switch input:checked + .slider::before {
  transform: translateY(-50%) translateX(24px);
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  box-shadow: 
    0 2px 12px rgba(0,0,0,0.2),
    0 4px 20px rgba(0,0,0,0.1);
}

.toggle-switch .slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 22px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  opacity: 0;
}

.toggle-switch:hover .slider::after {
  opacity: 1;
}

.toggle-switch:hover .slider {
  transform: scale(1.02);
}

.toggle-switch:hover .slider::before {
  box-shadow: 
    0 4px 12px rgba(0,0,0,0.2),
    0 6px 24px rgba(0,0,0,0.1);
}

.toggle-switch input:checked:hover + .slider {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.1),
    0 2px 16px rgba(220, 38, 38, 0.4),
    0 0 24px rgba(220, 38, 38, 0.2);
}

.toggle-switch .label {
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

.toggle-switch:hover .label {
  color: var(--secondary-color);
}

/* Dark mode adjustments */
body.dark-mode .toggle-switch .slider {
  background: linear-gradient(135deg, #374151, #4b5563);
  border: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .toggle-switch .slider::before {
  background: linear-gradient(135deg, #f9fafb, #e5e7eb);
}

body.dark-mode .toggle-switch input:checked + .slider {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

body.dark-mode .toggle-switch .slider::after {
  background: rgba(255,255,255,0.05);
}

/* Active state animation */
.toggle-switch:active .slider::before {
  transform: translateY(-50%) scale(0.95);
}

.toggle-switch input:checked:active + .slider::before {
  transform: translateY(-50%) translateX(24px) scale(0.95);
}

/* Ripple effect on click */
.toggle-switch .slider {
  overflow: hidden;
}

.toggle-switch .slider::after {
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

.toggle-switch .toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
  pointer-events: none;
}

.toggle-switch .sun-icon {
  left: 32px;
  opacity: 1;
  color: #666;
}

.toggle-switch .moon-icon {
  left: 8px;
  opacity: 0;
  color: #fff;
}

.toggle-switch input:checked ~ .slider .sun-icon {
  opacity: 0;
  left: 38px;
}

.toggle-switch input:checked ~ .slider .moon-icon {
  opacity: 1;
  left: 6px;
}

.menu-content {
  background-color: transparent !important;
  border: none !important;
}

.toggle-switch .pl-icon {
  left: 32px;
  opacity: 1;
  color: #666;
}

.toggle-switch .en-icon {
  left: 8px;
  opacity: 0;
  color: #fff;
}

.toggle-switch input:checked ~ .slider .pl-icon {
  opacity: 0;
  left: 38px;
}

.toggle-switch input:checked ~ .slider .en-icon {
  opacity: 1;
  left: 6px;
}

.toggle-switch .toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px; /* Increased from 14px */
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
  pointer-events: none;
}

/* For SVG icons, update the width/height */
.toggle-switch .toggle-icon svg {
  width: 16px; /* Increased from 14px */
  height: 16px;
}

@media (max-width: 991.98px) {
  .menu-content.open {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 1rem;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    background-color: var(--background-color);
    border-top: 1px solid #ccc;
  }

  .menu-item:nth-child(1) { /* Strona główna */
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .menu-item:nth-child(2) { /* Forum */
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .switch-group {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
    justify-self: end;
  }

  .menu-item {
    width: auto;
    text-align: left;
    padding-left: 0;
    margin: 0;
  }
}