/* Rozmiar elementu uwzględnia jego obramowanie i odstępy. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #faf7f2;
  color: #29332d;
  line-height: 1.6;
}

/* Górna część strony */
header {
  padding: 40px 20px;
  background-color: #244c3c;
  color: white;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 40px;
}

header p {
  color: #e0ece4;
}

nav {
  max-width: 320px;
  margin: 24px auto 0;
}

nav a {
  color: white;
}

details {
  margin-top: 16px;
  padding: 12px;
  background-color: #34634e;
  border-radius: 12px;
}

summary {
  cursor: pointer;
  font-weight: bold;
}

nav ul {
  padding: 0;
  list-style: none;
}

nav li {
  margin: 10px 0;
}

/* Główna treść */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* Każda rasa otrzymuje własny kafelek. */
article {
  margin: 20px 0;
  padding: 24px;
  background-color: white;
  border: 1px solid #e4e7df;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

article h3 {
  margin-top: 0;
  color: #244c3c;
  font-size: 24px;
}

article p {
  margin-bottom: 0;
}

footer {
  padding: 24px;
  text-align: center;
  color: #606b63;
}

/* Widoczna ramka przy poruszaniu się klawiszem Tab. */
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #edbc68;
  outline-offset: 4px;
}
.breed-photo {
  display: block;
  width: 100%;
  max-width: 450px;
  max-height: 350px;
  object-fit: contain;
  margin: 24px auto;
  border-radius: 16px;
}
.card-photo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto 20px;
  border-radius: 10px;
}

.breed-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  background-color: #244c3c;
  color: white;
  text-decoration: none;
  border-radius: 8px;
}

.breed-link:hover {
  background-color: #34634e;
}
.breed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.breed-grid article {
  margin: 0;
}

/* Na węższym ekranie kafelki będą w jednej kolumnie. */
@media (max-width: 750px) {
  .breed-grid {
    grid-template-columns: 1fr;
  }
}
#breed-search {
  display: block;
  width: 100%;
  margin: 8px 0 24px;
  padding: 14px;
  border: 1px solid #a5b5a9;
  border-radius: 10px;
  font: inherit;
}

#breed-search:focus-visible {
  outline: 3px solid #244c3c;
  outline-offset: 2px;
}
.table-of-contents {
  max-width: none;
  margin: 24px 0;
  padding: 24px;
  background-color: #e8efe9;
  border-radius: 16px;
}

.table-of-contents h2 {
  margin-top: 0;
}

.table-of-contents ul {
  padding-left: 20px;
  list-style: disc;
}

.table-of-contents a {
  color: #244c3c;
}

article[id] {
  scroll-margin-top: 20px;
}
.faq {
  margin-top: 32px;
}

.faq details {
  margin: 12px 0;
  padding: 18px;
  background-color: white;
  color: #29332d;
  border: 1px solid #e4e7df;
  border-radius: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: bold;
}

.faq a {
  color: #244c3c;
}
.related-breeds {
  margin-top: 32px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-links .breed-link {
  margin-top: 0;
}
.back-to-top {
  margin-top: 32px;
  text-align: right;
}

.back-to-top a {
  color: #244c3c;
  font-weight: bold;
}
.sources {
  margin-top: 32px;
  padding: 16px;
  background-color: #e8efe9;
  color: #29332d;
  border-radius: 12px;
}

.sources a {
  color: #244c3c;
}

.sources li {
  margin-top: 10px;
}
.breed-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.breed-facts > div {
  padding: 18px;
  background-color: #e8efe9;
  border-radius: 12px;
}

.breed-facts dt {
  font-weight: bold;
  color: #244c3c;
}

.breed-facts dd {
  margin: 6px 0 0;
}

@media (max-width: 500px) {
  .breed-facts {
    grid-template-columns: 1fr;
  }
}
.intro {
  margin-bottom: 32px;
  padding: 32px;
  background-color: #e8efe9;
  border-radius: 16px;
}

.intro h2 {
  margin-top: 0;
  color: #244c3c;
  font-size: 30px;
}

.intro p {
  max-width: 650px;
}

#rasy {
  scroll-margin-top: 20px;
}

@media (max-width: 500px) {
  .intro {
    padding: 20px;
  }
}
.breed-grid article {
  display: flex;
  flex-direction: column;
}

.breed-grid .breed-link {
  align-self: flex-start;
  margin-top: auto;
}

.breed-grid article p {
  margin-bottom: 20px;
}

/* Ukryte wyniki wyszukiwania pozostają niewidoczne. */
.breed-grid article[hidden] {
  display: none;
}
#clear-search {
  margin-bottom: 16px;
  padding: 10px 18px;
  border: 1px solid #244c3c;
  border-radius: 8px;
  background-color: white;
  color: #244c3c;
  font: inherit;
  cursor: pointer;
}

#clear-search:hover {
  background-color: #e8efe9;
}

#clear-search:focus-visible {
  outline: 3px solid #244c3c;
  outline-offset: 3px;
}
.search-controls {
  display: flex;
  gap: 12px;
  margin: 8px 0 24px;
}

.search-controls #breed-search {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
}

.search-controls #clear-search {
  margin: 0;
}

@media (max-width: 500px) {
  .search-controls {
    flex-direction: column;
  }
}
header nav a[aria-current="page"] {
  color: #ffe0a3;
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.breed-intro {
  font-size: 18px;
  line-height: 1.8;
  color: #46554b;
  max-width: 750px;
}
/* Rozszerzony katalog ras i odmian. */
header nav details ul { max-height: min(55vh, 420px); overflow-y: auto; padding: 0 10px; overscroll-behavior: contain; }
.breed-placeholder { display: flex; min-height: 220px; flex-direction: column; justify-content: center; align-items: center; border-radius: 14px; background: linear-gradient(135deg, #edf4e9, #e1ece5); color: #426451; text-align: center; padding: 20px; }
.breed-placeholder > span { font-size: 48px; }
.breed-placeholder p { margin: 8px 0 0; font-size: 14px; }
.breed-placeholder-large { max-width: 450px; min-height: 280px; margin: 24px auto; }
.breed-kind { font-size: 13px; color: #526b5b; font-weight: bold; }

/* Informacje zdrowotne jako rozwijany dodatek do opisu. */
.health-note { background: #fff; color: #29332d; border: 1px solid #e4e7df; padding: 24px; margin: 20px 0; }
.health-note summary { color: #244c3c; }

/* Wspólne menu i zdjęcia na podstronach. */
.coats-nav-link {display:block;margin-top:16px;}
.breed-image {margin:20px 0;text-align:center;}
.breed-image .breed-photo {display:block;margin:0 auto;max-width:100%;object-fit:contain;}
.breed-image .image-caption {font-size:13px;color:#526356;}

/* STOPKA STRONY */

.site-footer {
    background: #eee7df;
    color: #51483f;
    padding: 40px 20px 25px;
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #ded3c7;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
}

.site-footer h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: #51483f;
}

.footer-description {
    font-size: 15px;
    margin-bottom: 25px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 25px;
    margin: 25px 0;
}

.footer-links a {
    color: #75563f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #bd8051;
    text-decoration: underline;
}

.footer-copy {
    font-size: 13px;
    color: #81766c;
    margin-top: 25px;
}

@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

/* PODSTRONY INFORMACYJNE */

.info-page {
    max-width: 900px;
    margin: 50px auto;
    padding: 35px;
    background: #fffdf9;
    border-radius: 14px;
    color: #51483f;
    line-height: 1.8;
    box-sizing: border-box;
}

.info-page h1 {
    color: #75563f;
    margin-bottom: 25px;
}

.info-page h2 {
    color: #89694f;
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 20px;
}

.info-page p {
    margin-bottom: 18px;
}

.info-page a {
    color: #94643f;
    font-weight: 600;
}

@media (max-width: 600px) {
    .info-page {
        margin: 20px 12px;
        padding: 22px;
    }
}

/* PODSTRONY INFORMACYJNE */

.info-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    line-height: 1.8;
}

.info-page h1 {
    color: #333333;
    margin-bottom: 25px;
}

.info-page h2 {
    color: #795548;
    margin-top: 30px;
    margin-bottom: 10px;
}

.info-page p {
    margin-bottom: 18px;
    color: #444444;
}

.info-page a {
    color: #9b684d;
    font-weight: bold;
}

.info-page ul {
    padding-left: 25px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .info-page {
        margin: 15px;
        padding: 20px;
    }
}

/* WYŚRODKOWANIE CAŁEJ STOPKI */

.site-footer {
    width: 100%;
    text-align: center;
}

.footer-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-content h3,
.footer-description,
.footer-links,
.footer-copy {
    width: 100%;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 22px;
}



