:root[data-bs-theme='light'] {
  --bs-body-bg: #ffffff;
  --bs-body-color: #212529;
  --card-bg: #f8f9fa;
}

:root[data-bs-theme='dark'] {
  --bs-body-bg: #0e0e0e;
  --bs-body-color: #000;
  --card-bg: #606060;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.card,
.ad-card {
  background-color: var(--card-bg);
  color: var(--bs-body-color);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.ad-card img {
  max-height: 180px;
  object-fit: cover;
  width: 100%;
}

.ad-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.filter-panel select,
.filter-panel input {
  margin-bottom: 10px;
  border-radius: 6px;
}


.toggle-buttons {
  margin-bottom: 15px;
}

.btn {
  border-radius: 10px;
  font-weight: bold;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background-color: #38bdf8;
  border-color: #38bdf8;
  color: #fff;
}

.btn-primary:hover {
  background-color: #0ea5e9;
  border-color: #0ea5e9;
}

.btn-outline-secondary {
  color: #fff;
  border-color: #ccc;
}

.btn-outline-secondary:hover {
  background-color: #f2f2f2;
  color: #000;
}

.btn-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #0ea5e9;
}
/* ====== RESPONSIVNÍ ÚPRAVY ====== */
@media (max-width: 768px) {
  .ad-card img {
    max-height: 140px;
  }

  .card-body h5 {
    font-size: 1rem;
  }

  .card-body p {
    font-size: 0.9rem;
  }

  .btn {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .filter-panel .form-control,
  .filter-panel .form-select {
    font-size: 0.9rem;
  }

  #filterForm .col-md-2,
  #filterForm .col-md-3,
  #filterForm .col-md-1,
  #filterForm .col-auto {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #map {
    height: 400px;
  }

  .login-card {
    margin: 40px 20px;
    padding: 24px;
  }
}

/* Animace fade */
.fade-section {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.6s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Karta hover */
.ad-card {
  transition: transform 0.3s, box-shadow 0.3s;
}
.ad-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* Oblíbená ikona v rohu obrázku */
.favorite-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.2rem;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  padding: 6px;
  cursor: pointer;
}
.favorite-icon:hover {
  background: #ffd700;
}

/* ====== TOPOVÁNÍ INZERÁTŮ ====== */
.top-container {
  max-width: 960px;
  margin: 40px auto;
  padding: 20px;
}

.top-container h1,
.top-container h2 {
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
}

.package-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
}

.package-card {
  flex: 1 1 280px;
  background-color: var(--card-bg);
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.package-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.package-card h3 {
  margin-bottom: 10px;
  color: #0077cc;
  font-size: 1.2rem;
}

.package-card p {
  margin-bottom: 12px;
  font-size: 1rem;
}

.package-card img {
  max-width: 160px;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* Tabulka topovacích kódů */
.code-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.95rem;
}

.code-table th,
.code-table td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
}

.code-table th {
  background-color: #f0f0f0;
  font-weight: 600;
}

.code-table .used {
  color: red;
  font-weight: bold;
}

.code-table .unused {
  color: green;
  font-weight: bold;
}

/* Dark mode overrides */
[data-bs-theme="dark"] .package-card {
  background-color: #1a1a1a;
  border-color: #333;
}

[data-bs-theme="dark"] .package-card h3 {
  color: #66bfff;
}

[data-bs-theme="dark"] .code-table th {
  background-color: #222;
  color: #f0f0f0;
}

[data-bs-theme="dark"] .code-table td {
  border-color: #444;
}


[data-bs-theme="light"] .btn-outline-secondary
{
	color: #000;
	border-color: #ccc;
}