:root {
  --navy: #17324d;
  --blue: #238fc2;
  --green: #76b978;
  --pink: #e77983;
  --gold: #d3ae73;
  --light: #f7f4ee;
  --gray: #65717d;
  --dark-gray: #394653;
  --white: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--navy);
  line-height: 1.6;
  background: var(--white);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1120px, 90%);
  margin: 0 auto;
}

/* Nagłówek */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.8rem 0;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(23, 50, 77, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  width: 180px;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
}

nav a {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: bold;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--blue);
}

/* Przyciski */

.button {
  display: inline-block;
  border: none;
  border-radius: 5px;
  padding: 0.9rem 1.5rem;
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.button:hover,
.button:focus-visible {
  background: #1979a5;
  transform: translateY(-2px);
}

.button-light {
  background: var(--white);
  color: var(--navy);
}

.button-light:hover,
.button-light:focus-visible {
  background: #f1f1f1;
}

/* Widoczny fokus klawiatury */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(35, 143, 194, 0.45);
  outline-offset: 3px;
}

/* Strona główna */

.hero {
  display: flex;
  align-items: center;
  min-height: 650px;
  color: var(--white);
  background:
    linear-gradient(
      rgba(23, 50, 77, 0.66),
      rgba(23, 50, 77, 0.66)
    ),
    url("images/hero-books.jpg") center/cover;
}

.hero-content {
  max-width: 700px;
  padding: 5rem 0;
}

.hero h1 {
  max-width: 680px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.1;
}

.hero p {
  max-width: 600px;
  margin-bottom: 2rem;
  color: #f0f4f7;
  font-size: 1.2rem;
}

/* Ogólne sekcje */

section {
  padding: 5rem 0;
}

.section-title {
  margin-bottom: 3rem;
  text-align: center;
}

.section-title h2 {
  margin-bottom: 0.7rem;
  font-size: 2.3rem;
}

.section-title p {
  color: var(--gray);
  font-size: 1.05rem;
}

/* O nas */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.about img {
  width: 100%;
  height: 420px;
  padding: 0.5rem;
  border-radius: 12px;
  background: var(--light);
  object-fit: contain;
  object-position: center;
  box-shadow: 0 12px 30px rgba(23, 50, 77, 0.13);
}

.about-text h2 {
  margin-bottom: 1.2rem;
  font-size: 2.3rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--gray);
}

.about-text .button {
  margin-top: 1rem;
}

/* Oferta */

.offer-section {
  background: var(--light);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  display: block;
  overflow: hidden;
  border-top: 5px solid var(--gold);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 5px 18px rgba(23, 50, 77, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(23, 50, 77, 0.14);
}

.card:nth-child(2) {
  border-top-color: var(--blue);
}

.card:nth-child(3) {
  border-top-color: var(--pink);
}

.card:nth-child(4) {
  border-top-color: var(--green);
}

.card:nth-child(5) {
  border-top-color: var(--gold);
}

.card:nth-child(6) {
  border-top-color: var(--blue);
}

/*
  contain pokazuje całe zdjęcie.
  Wolne miejsce wokół zdjęcia jest zamierzone,
  ponieważ obraz zachowuje swoje proporcje.
*/

.card img {
  width: 100%;
  height: 240px;
  padding: 0.75rem;
  background: var(--white);
  object-fit: contain;
  object-position: center;
}

.card-content {
  padding: 1.8rem;
}

.card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
}

.card p {
  color: var(--gray);
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--blue);
  font-weight: bold;
}

/* Kategorie */

.category-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category {
  padding: 1.4rem 1rem;
  border-radius: 8px;
  background: var(--light);
  color: var(--dark-gray);
  font-weight: bold;
  text-align: center;
}

/* Wartości */

.values-section {
  background: var(--navy);
  color: var(--white);
}

.values-section .section-title p {
  color: #d9e4ed;
}

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.value {
  padding: 1.8rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  text-align: center;
}

.value-icon {
  margin-bottom: 0.7rem;
  font-size: 2.2rem;
}

.value h3 {
  margin-bottom: 0.5rem;
  color: var(--white);
  font-size: 1.15rem;
}

.value p {
  color: #d9e4ed;
  font-size: 0.95rem;
}

/* Kontakt */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: start;
  gap: 4rem;
}

.contact-info {
  max-width: 600px;
}

.contact-info h2 {
  margin-bottom: 1.2rem;
  font-size: 2.3rem;
}

.contact-info > p {
  margin-bottom: 1rem;
  color: var(--gray);
}

.contact-details {
  margin-top: 2rem;
}

.contact-details p {
  margin: 0.7rem 0;
  color: var(--dark-gray);
}

.contact-details a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-details a:hover,
.contact-details a:focus-visible {
  color: #1979a5;
}

.opening-hours {
  margin-top: 1rem;
}

.opening-hours dt {
  margin-bottom: 0.4rem;
}

.opening-hours dd {
  margin-left: 0;
  color: var(--dark-gray);
}

/* Formularz kontaktowy */

.contact-form {
  width: 100%;
  padding: 2rem;
  border: 1px solid #e1e5e8;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(23, 50, 77, 0.1);
}

.contact-form .form-field {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--navy);
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #c7d0d6;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  line-height: 1.4;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(35, 143, 194, 0.2);
  border-color: var(--blue);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  width: 100%;
}

/* Ukryte pole-pułapka dla botów */

.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Podstrony */

.page-hero {
  display: flex;
  align-items: center;
  min-height: 360px;
  color: var(--white);
  background:
    linear-gradient(
      rgba(23, 50, 77, 0.68),
      rgba(23, 50, 77, 0.68)
    ),
    url("images/hero-books.jpg") center/cover;
}

.page-hero-content {
  padding: 5rem 0;
}

.page-hero h1 {
  max-width: 850px;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.1;
}

.page-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 5rem 0;
}

.page-content h2 {
  margin-bottom: 1.5rem;
  font-size: 2.3rem;
}

.page-content p {
  margin-bottom: 1.2rem;
  color: var(--gray);
  font-size: 1.08rem;
}

.page-image,
.page-content img.intro-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  margin: 0 auto 2.5rem;
  border-radius: 12px;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 12px 30px rgba(23, 50, 77, 0.13);
}

/* Galeria pacynek */

.puppet-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.puppet-gallery a {
  display: block;
}

.puppet-gallery img {
  display: block;
  width: 100%;
  height: 280px;
  padding: 12px;
  border-radius: 12px;
  background: var(--light);
  object-fit: contain;
  object-position: center;
  box-shadow: 0 8px 20px rgba(23, 50, 77, 0.1);
}

.page-image,
.puppet-gallery img {
  cursor: zoom-in;
}

/* Stopka */

footer {
  padding: 1.5rem;
  background: #102438;
  color: #d5e0e8;
  font-size: 0.9rem;
  text-align: center;
}

/* Responsywność */

@media (max-width: 950px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    justify-content: flex-start;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 2.5rem;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .values {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .contact {
    grid-template-columns: 1fr;
  }

  .contact-info {
    max-width: none;
  }

  .puppet-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .puppet-gallery img {
    height: 220px;
  }
}

@media (max-width: 600px) {
  header {
    position: static;
  }

  .nav {
    align-items: center;
  }

  nav {
    justify-content: center;
    gap: 0.7rem 1rem;
  }

  nav a {
    font-size: 0.85rem;
  }

  .brand img {
    width: 155px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content,
  .page-hero-content {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  section,
  .page-content {
    padding: 4rem 0;
  }

  .section-title h2,
  .about-text h2,
  .contact-info h2,
  .page-content h2 {
    font-size: 2rem;
  }

  .cards,
  .category-list,
  .values {
    grid-template-columns: 1fr;
  }

  .about img {
    height: 280px;
  }

  .card img {
    height: 220px;
  }

  .contact-form {
    padding: 1.25rem;
  }
}

@media (max-width: 450px) {
  .puppet-gallery {
    grid-template-columns: 1fr;
  }

  .puppet-gallery img {
    height: auto;
  }
}

.mapa-ksiegarni {
  max-width: 1100px;
  margin: 50px auto 40px;
  padding: 0 20px;
}

.mapa-ksiegarni h2 {
  text-align: center;
  margin-bottom: 20px;
}

.mapa-ksiegarni iframe {
  display: block;
  width: 100%;
  max-width: 900px;
  height: 400px;
  margin: 0 auto;
  border: 0;
  border-radius: 12px;
}
