/* === ZÁKLAD === */

html, body {
  margin: 0;
  padding: 0;
}

body {
  padding-top: 6rem;
  font-family: Georgia, serif;
  background-color: #fdf6e3;
  color: #2b2b2b;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
  background-color: #141622;
  color: #d8d8e0;
}

body.komfort {
  line-height: 1.75;
  font-size: 1.05rem;
}

body.kompakt {
  line-height: 1.4;
  font-size: 0.95rem;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* === HORNÍ OVLÁDÁNÍ === */

.top-bar {
  position: relative;
  width: 100%;
  background: transparent;
}

.top-bar-inner {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2rem;
  z-index: 1000;
}

.top-group {
  display: flex;
  gap: 0.5rem;
}

.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

body.dark .top-btn {
  background: rgba(255, 255, 255, 0.08);
}

.top-btn:hover {
  background: rgba(0, 0, 0, 0.12);
}

body.dark .top-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.top-btn:active {
  transform: scale(0.95);
}

.back-home {
  font-size: 1.3rem;
  font-weight: bold;
  opacity: 0.85;
}

.back-home:hover {
  opacity: 1;
}

/* ======================================================
   HOMEPAGE – ULTRA TENKÝ BANNER
   ====================================================== */

.banner-wrapper {
  max-width: 28rem;          /* ⬅️ ještě tenčí */
  margin: 1.2rem auto 1.8rem;
  padding: 0 1rem;
}

.banner-img {
  width: 100%;
  height: auto;              /* celý obrázek, žádný ořez */
  display: block;
  border-radius: 4px;
}

/* DLAŽDICE – BEZE ZMĚN */

.tiles-grid {
  max-width: 28rem;
  margin: 0 auto 4rem;
  padding: 0 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.tile {
  display: block;
}

.tile-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
  transition: transform 0.25s ease;
}

.tile:hover .tile-img {
  transform: scale(1.02);
}

/* HOMEPAGE – MOBIL */

@media (max-width: 768px) {

  .banner-wrapper {
    max-width: 14rem;        /* ⬅️ ultra štíhlý i na mobilu */
    margin: 1rem auto 1.4rem;
  }

  .tiles-grid {
    max-width: 17rem;
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

/* ======================================================
   POVÍDKY – SEZNAM (DESKTOP)
   ====================================================== */

.povidky-page {
  padding: 4rem 1.5rem 6rem;
}

.povidky-banner {
  max-width: 70rem;
  margin: 0 auto 4rem;
}

.povidky-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.povidky-list {
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.povidka-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

.povidka-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.povidka-meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.povidka-title {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
}

.povidka-title a {
  color: inherit;
}

.povidka-excerpt {
  margin: 0;
  opacity: 0.8;
  line-height: 1.6;
  max-width: 40rem;
}

/* ======================================================
   POVÍDKY – MOBIL
   ====================================================== */

@media (max-width: 768px) {

  .povidky-list {
    gap: 5rem;
  }

  .povidka-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .povidka-thumb {
    max-width: 260px;
    margin: 0 auto;
  }

  .povidka-meta {
    gap: 0.4rem;
    text-align: center;
  }

  .povidka-title {
    font-size: 1.3rem;
  }

  .povidka-excerpt {
    max-width: none;
    opacity: 0.75;
  }
}
