/* ============================================================
   ArtechStudio — style zgodny z paletą Amazon
   Navy #131921 / #232f3e · Pomarańcz #ff9900 · Tło #f9f9f9
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid #ff9900;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- Pasek wyboru kraju ---------------- */
.country-bar {
  background-color: #131921;
  color: white;
  padding: 10px 20px;
  text-align: center;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.country-bar img.flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

.country-bar select {
  background: #232f3e;
  color: white;
  border: 1px solid #ff9900;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.95em;
}

/* ---------------- Nagłówek ---------------- */
header {
  background-color: #232f3e;
  color: white;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #ff9900;
  text-decoration: none;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
}

nav a:hover { color: #ff9900; }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, #232f3e, #131921);
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.hero h1 { font-size: 2.2em; margin-bottom: 10px; }
.hero p { opacity: 0.85; }

/* ---------------- Sekcje kategorii ---------------- */
.category-section {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
}

.category-title {
  font-size: 2em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #ff9900;
  color: #232f3e;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px;
}

.book-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.book-cover-link { display: block; }

.book-cover {
  width: 100%;
  height: 280px;
  object-fit: contain;
  margin-bottom: 15px;
  cursor: pointer;
}

.book-title {
  font-size: 1.05em;
  margin-bottom: 8px;
  color: #232f3e;
  display: flex;
  align-items: center;
  gap: 10px;
}

.book-lang-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
  flex-shrink: 0;
  margin-right: 3px;
}

.book-description {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-amazon {
  display: block;
  background-color: #ff9900;
  color: white;
  text-decoration: none;
  padding: 12px;
  border-radius: 5px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-size: 0.95em;
  transition: background-color 0.15s ease;
}

.btn-amazon:hover { background-color: #e68a00; }

/* ---------------- Stopka ---------------- */
footer {
  background-color: #131921;
  color: #888;
  text-align: center;
  padding: 30px;
  margin-top: 60px;
}

/* ============================================================
   Strona szczegółów książki (book.html)
   ============================================================ */

.book-page-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.btn-nav {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px 0;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.btn-back {
  background-color: #e0e0e0;
  color: #333;
}
.btn-back:hover { background-color: #d3d3d3; }

.book-page-wrap .btn-amazon {
  display: inline-block;
  float: right;
  width: auto;
}

.book-nav-row {
  overflow: auto;
}

.content {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  clear: both;
}

.content h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #232f3e;
}

.book-cover-full {
  text-align: center;
  margin: 20px auto;
  padding: 0 10px;
}

.book-cover-full img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 600px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: block;
}

.book-description-full {
  margin: 15px 0;
  color: #666;
  line-height: 1.6;
  text-align: justify;
}

.content h3 {
  color: #232f3e;
  border-bottom: 2px solid #ff9900;
  padding-bottom: 8px;
  margin-top: 30px;
}

.videos-cta {
  margin: 8px 0 28px;
  clear: both;
}

.btn-videos {
  display: inline-block !important;
  float: none !important;
  width: auto;
  background-color: #ff9900;
  color: white;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.95em;
  transition: background-color 0.15s ease;
}

.btn-videos:hover { background-color: #e68a00; }

/* ============================================================
   Strona z filmami poglądowymi (videos.html)
   ============================================================ */

.videos-hero {
  background: linear-gradient(135deg, #232f3e, #131921);
  color: white;
  text-align: center;
  padding: 44px 20px;
}

.videos-hero h1 { font-size: 1.9em; margin-bottom: 8px; }
.videos-hero p { opacity: 0.85; }

.videos-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.videos-back-row { margin-bottom: 24px; }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  cursor: pointer;
  border: none;
  padding: 0;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.video-card:hover, .video-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #131921;
  overflow: hidden;
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 153, 0, 0.92);
  color: #131921;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.video-card-body {
  padding: 16px 18px 20px;
}

.video-card-title {
  font-size: 1em;
  color: #232f3e;
  margin-bottom: 6px;
}

.video-card-desc {
  font-size: 0.85em;
  color: #666;
}

/* Lightbox z odtwarzaczem wideo (opiera się na .lightbox z galerii) */
.video-lightbox-player {
  width: min(92vw, 1000px);
}

.video-lightbox-player video {
  width: 100%;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: block;
}

.video-lightbox-title {
  color: white;
  text-align: center;
  margin-top: 10px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.gallery button {
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.15s ease;
}

.gallery button:hover { transform: translateY(-3px); }

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

.not-found {
  padding: 60px 20px;
  text-align: center;
}
.not-found h1 { color: #232f3e; margin-bottom: 12px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(19, 25, 33, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 32px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 153, 0, 0.15);
  border: 2px solid #ff9900;
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lightbox-arrow:hover {
  background: #ff9900;
  color: #131921;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
  background: rgba(0,0,0,0.4);
  padding: 6px 14px;
  border-radius: 999px;
}

@media (max-width: 600px) {
  .lightbox-arrow { width: 44px; height: 44px; font-size: 1.3rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------------- Responsywność ---------------- */
@media (max-width: 700px) {
  .nav-container { flex-direction: column; align-items: flex-start; }
  nav a { margin-left: 0; margin-right: 16px; }
  .book-page-wrap .btn-amazon { float: none; display: block; text-align: center; }
}
