
/* =========================================
   Podstawowe ustawienia
   ========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0 10px;
    background: #ffffff url("../images/bground.gif");
    color: #4C4C4C;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
}

/* =========================================
   Główny kontener
   ========================================= */

.site-container {
    width: 700px;
    max-width: 100%;
    margin: 0 auto;
}

/* =========================================
   Nagłówek i baner
   ========================================= */

.site-header {
    width: 100%;
}

.site-banner {
    width: 100%;
    height: 144px;
    background: url("../images/header.png") top left no-repeat;
}

/* =========================================
   Menu poziome
   ========================================= */

.main-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 7px;
    width: 100%;
    min-height: 25px;
    padding: 5px;
    background-color: #ac9153;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 8pt;
}

.main-navigation a,
.main-navigation a:visited {
    color: #4C4C4C;
    text-decoration: none;
}

.main-navigation a:hover {
    color: #945342;
}

.main-navigation span {
    color: #7F7F7F;
}

/* =========================================
   Układ trzech kolumn
   ========================================= */

.site-layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 450px) 100px;
    align-items: stretch;
}

/* =========================================
   Boczne kolumny
   ========================================= */

.sidebar {
    min-width: 0;
    background-color: #ac9153;
}

/* =========================================
   Menu boczne
   ========================================= */

.side-navigation {
    padding: 10px 0 10px 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11pt;
    font-weight: bold;
}

.side-navigation a {
    display: block;
    margin-bottom: 20px;
    padding-left: 20px;
    background-image: url("../images/ozdobnik.gif");
    background-repeat: no-repeat;
    background-position: left center;
    color: #4C4C4C;
    text-decoration: none;
}

.side-navigation a:visited {
    color: #4C4C4C;
}

.side-navigation a:hover {
    color: #F9F6CB;
}

/* =========================================
   Główna treść
   ========================================= */

.main-content {
    min-width: 0;
    padding: 10px 12px;
    background-color: #b7a06a;
    font-size: 12pt;
    text-align: justify;
    color: #000000;
}

/* Nagłówki */

.main-content h1,
.main-content h2 {
    color: #4C4C4C;
}

.main-content h1 {
    margin-top: 0;
    font-size: 22px;
}

.main-content h2 {
    margin-top: 20px;
    font-size: 17px;
}

/* =========================================
   Karta osoby
   ========================================= */

.person-header {
    padding: 8px 10px;
    background-color: #E9E7E9;
}

.person-header h1 {
    margin: 0;
}

.person-herb {
    text-align: center;
}

.person-herb img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px auto;
}

.person-blazon p {
    font-style: italic;
}

/* Karta osoby — typografia */
.person-card {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
}

/* Historia heraldyczna */

.person-history ol {
    list-style: none;
    padding-left: 0;
}

.person-history li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
}

.person-history li::before {
    content: "◆";
    position: absolute;
    left: 0;
    top: 0;
    color: #945342;
    font-size: 10px;
}

/* =========================================
   Strona główna
   ========================================= */

.home-page {
    font-family: Georgia, sans-serif;
    font-size: 10pt;
    font-weight: normal;
    color: #4C4C4C;
}

.home-page h1 {
    margin-top: 0;
    font-family: Georgia, sans-serif;
    font-size: 10pt;
    font-weight: bold;
    color: #945342;
}

.home-page a:link,
.home-page a:visited {
    color: #4C4C4C;
    text-decoration: none;
}

.home-page a:hover {
    color: #F9F6CB;
    text-decoration: none;
}

.home-logo {
    text-align: center;
}

.home-logo img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

/* =========================================
   Stopka
   ========================================= */

.site-footer {
    min-height: 30px;
    background-color: #ac9153;
}

/* =========================================
   Menu mobilne
   ========================================= */

.mobile-navigation {
    display: none;
}

/* =========================================
   Responsywność
   ========================================= */

@media (max-width: 700px) {

    body {
        padding: 10px;
    }

    /* Układ jednokolumnowy */

    .site-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: 0;
    }

    .main-content {
        grid-column: 1;
    }

    /* Ukrycie menu desktopowych */

    .main-navigation,
    .sidebar-left {
        display: none;
    }

    /* Przycisk hamburgerowy */

    .mobile-navigation {
        display: block;
        position: relative;
        background-color: #ac9153;
        padding: 8px 12px;
    }

    .mobile-navigation summary {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 32px;
        height: 28px;
        cursor: pointer;
        list-style: none;
    }

    .mobile-navigation summary::-webkit-details-marker {
        display: none;
    }

    .mobile-navigation summary span {
        display: block;
        width: 26px;
        height: 3px;
        background-color: #4C4C4C;
    }

    /* Rozwijanie menu — 300 ms */

    .mobile-navigation-links {
        display: flex;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        margin-top: 0;
        transition:
            max-height 300ms ease,
            opacity 300ms ease,
            margin-top 300ms ease;
    }

    .mobile-navigation[open] .mobile-navigation-links {
        max-height: 500px;
        opacity: 1;
        margin-top: 8px;
    }

    /* Pozycje menu mobilnego */

    .mobile-navigation-links a {
        display: block;
        padding: 10px 8px;
        border-top: 1px solid rgba(76, 76, 76, 0.2);
        color: #4C4C4C;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 11pt;
        font-weight: bold;
        text-decoration: none;
    }

    .mobile-navigation-links a:hover {
        color: #F9F6CB;
    }
}

/* =========================================
   Rejestr Heroldii
   ========================================= */

.registry-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    font-weight: normal;
    color: #4C4C4C;
    text-align: left;
}

.registry-page > h1 {
    margin: 0 0 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 16pt;
}

.registry-section {
    margin-bottom: 22px;
}

.registry-section h2 {
    margin: 0 0 8px;
    color: #945342;
    font-size: 11pt;
    font-weight: bold;
    text-decoration: underline;
}

.registry-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.registry-list li {
    margin-left: 15px;
    line-height: 1.4;
}

.registry-list a,
.registry-list a:visited {
    color: #4C4C4C;
    text-decoration: none;
}

.registry-list a:hover {
    color: #945342;
    text-decoration:underline;
}

.registry-list .registry-relinquished {
    text-decoration: line-through;
}

/* =========================================
   Podstrona Tytuły
   ========================================= */

.titles-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.titles-page section {
    margin-bottom: 28px;
}

.titles-page h1 {
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.titles-page p {
    line-height: 1.5;
    margin: 0 0 12px;
}

.titles-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.titles-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    text-align: left;
}

.titles-table th,
.titles-table td {
    padding: 7px 9px;
    border: 1px solid #945342;
}

.titles-table th {
    background-color: #ac9153;
    color: #4C4C4C;
    font-weight: bold;
}

.titles-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.18);
}

.titles-notes {
    margin-top: 12px;
    font-size: 9pt;
    font-style: italic;
}

.titles-notes p {
    margin-bottom: 7px;
}

.titles-oath {
    margin: 15px 10px;
    padding: 12px 15px;
    border-left: 3px solid #945342;
    background-color: rgba(255, 255, 255, 0.18);
    font-style: italic;
    line-height: 1.6;
}

/* =========================================
   Podstrona Cennik
   ========================================= */

.price-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.price-page h1 {
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.price-page p {
    line-height: 1.5;
    margin: 0 0 12px;
}

.price-list {
    margin: 15px 0 20px;
    padding-left: 25px;
    line-height: 1.7;
}

.price-list li {
    margin-bottom: 5px;
}

.price-note {
    margin-top: 25px !important;
}

/* =========================================
   Podstrona Herbarz
   ========================================= */

.heraldry-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.heraldry-page h1 {
    margin: 0 0 18px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.heraldry-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: center;
    justify-items: center;
}

.heraldry-item {
    width: 100%;
    text-align: center;
}

.heraldry-item img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.heraldry-item a:hover img {
    opacity: 0.85;
}

@media (max-width: 480px) {
    .heraldry-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   ORDERY
   ========================================= */

.orders-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.orders-page h1 {
    margin: 0 0 18px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.order-section {
    margin-bottom: 30px;
}

.order-section h2 {
    margin: 0 0 12px;
    color: #945342;
    font-size: 11pt;
}

.order-section ol {
    padding-left: 28px;
    margin: 0 0 16px;
    line-height: 1.6;
}

.order-section li {
    padding-left: 3px;
}

.order-section p {
    margin: 12px 0 0;
    line-height: 1.5;
}

/* =========================================
   ODZNACZENIA
   ========================================= */

.decorations-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.decorations-page h1 {
    margin: 0 0 18px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.decoration-section {
    margin-bottom: 28px;
}

.decoration-section h2 {
    margin: 0 0 12px;
    color: #945342;
    font-size: 11pt;
}

.decoration-section h3 {
    margin: 16px 0 8px;
    color: #4C4C4C;
    font-size: 10pt;
}

.decoration-section p,
.decoration-archive-note {
    margin: 0 0 12px;
    line-height: 1.5;
}

.decoration-section ol {
    margin: 0;
    padding-left: 28px;
    line-height: 1.6;
}

.decoration-section li {
    padding-left: 3px;
}

.decoration-divider {
    border: 0;
    height: 1px;
    background: #4C4C4C;
    margin: 30px 0 20px;
}

.decoration-archive-note {
    margin-bottom: 24px;
    font-style: italic;
}


/* =========================================
   KODEKS HONOROWY
   ========================================= */

.code-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.code-header {
    margin-bottom: 24px;
    text-align: center;
}

.code-header h1 {
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.code-header p {
    margin: 4px 0;
    line-height: 1.4;
}

.code-preamble {
    margin: 0 0 28px;
    text-align: center;
    font-style: italic;
    line-height: 1.5;
}

.code-preamble p {
    margin: 4px 0;
}

.code-section {
    margin-bottom: 28px;
}

.code-section h2 {
    margin: 0 0 12px;
    color: #945342;
    font-size: 11pt;
    line-height: 1.4;
}

.code-section > p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.code-section ol {
    margin: 0;
    padding-left: 28px;
    line-height: 1.6;
}

.code-section li {
    padding-left: 3px;
    margin-bottom: 4px;
}

.code-signatures {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid #945342;
    line-height: 1.5;
}

.code-signatures p {
    margin: 3px 0;
}

/* =========================================
   HERBY WIELKIE KRÓLÓW DREAMLANDU
   ========================================= */

.great-arms-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.great-arms-page h1 {
    margin: 0 0 18px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.great-arms-page h2 {
    margin: 24px 0 12px;
    color: #945342;
    font-size: 11pt;
}

.great-arms-introduction p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.great-arms-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    align-items: start;
}

.great-arms-item {
    margin: 0;
    text-align: center;
}

.great-arms-item img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.great-arms-item figcaption {
    margin-top: 8px;
    font-weight: bold;
    color: #4C4C4C;
}

.great-arms-source {
    margin-top: 28px;
    font-size: 9pt;
    font-style: italic;
}

@media (max-width: 480px) {
    .great-arms-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   SĄD PARÓW
   ========================================= */

.court-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.court-page h1 {
    margin: 0 0 18px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.court-page h2 {
    margin: 24px 0 12px;
    color: #945342;
    font-size: 11pt;
}

.court-page p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.court-emblem {
    margin: 10px 0 24px;
    text-align: center;
}

.court-emblem img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.court-documents ul {
    margin: 0 0 16px;
    padding-left: 28px;
    line-height: 1.7;
}

.court-page a:link,
.court-page a:visited {
    color: #4C4C4C;
    text-decoration: none;
}

.court-page a:hover {
    color: #945342;
    text-decoration: underline;
}

/* =========================================
   DOKUMENTY SĄDU PARÓW
   ========================================= */

.court-document-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.court-document-page h1 {
    margin: 0 0 18px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.court-document-content {
    line-height: 1.6;
}

.court-document-content #link,
.court-document-content #link1 {
    text-align: left;
}

.court-document-signature {
    margin-top: 20px;
    text-align: left;
}

.court-document-signature img {
    max-width: 100%;
    height: auto;
}

.court-document-back {
    margin-top: 30px;
    padding-top: 12px;
    border-top: 1px solid #945342;
}

.court-document-page a:link,
.court-document-page a:visited {
    color: #4C4C4C;
    text-decoration: none;
}

.court-document-page a:hover {
    color: #945342;
    text-decoration: underline;
}


/* =========================================
   HISTORIA HEROLDII
   ========================================= */

.history-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
    text-align: left;
}

.history-page h1 {
    margin: 0 0 22px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 12pt;
}

.history-section {
    margin-bottom: 30px;
}

.history-section h2 {
    margin: 0 0 12px;
    color: #945342;
    font-size: 11pt;
}

.history-section p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.history-section .history-subheading {
    margin-top: 22px;
}

.secretary-list,
.history-links {
    margin: 0 0 12px;
    padding-left: 28px;
    line-height: 1.6;
}

.secretary-list li,
.history-links li {
    padding-left: 3px;
    margin-bottom: 4px;
}

.history-page .history-note {
    margin: 8px 0 16px 28px;
    font-size: 9pt;
    font-style: italic;
    line-height: 1.5;
}

.history-page a:link,
.history-page a:visited {
    color: #4C4C4C;
    text-decoration: none;
}

.history-page a:hover {
    color: #945342;
    text-decoration: underline;
}


/* =========================================
   Miasta i prowincje — symbolika terytorialna
   ========================================= */

.territories-page,
.territory-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10pt;
    color: #4C4C4C;
}

.territories-page h1,
.territory-page h1 {
    margin: 0 0 14px;
    color: #945342;
    font-size: 12pt;
}

.territories-page h2 {
    margin: 22px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #945342;
    color: #945342;
    font-size: 11pt;
}

.territory-list {
    margin: 0;
    padding-left: 24px;
}

.territory-list li {
    margin-bottom: 8px;
}

.territory-list a,
.territory-back a {
    color: #4C4C4C;
    text-decoration: none;
}

.territory-list a:hover,
.territory-back a:hover {
    color: #945342;
    text-decoration: underline;
}

.territory-list span {
    margin-left: 5px;
    color: #777;
    font-size: 9pt;
}

.territory-list p {
    margin: 5px 0 12px;
}

.territory-symbols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.territory-symbol {
    min-width: 0;
    padding: 14px;
    background-color: #F9F6CB;
    border: 1px solid #A89A70;
    text-align: center;
}

.territory-symbol h2 {
    margin: 0 0 12px;
    color: #945342;
    font-size: 11pt;
}

.territory-symbol-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 10px;
    background-color: #FFFFFF;
}

.territory-symbol-image img {
    display: block;
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.territory-symbol-description {
    margin: 14px 0 8px;
    text-align: left;
}

.territory-symbol-status,
.territory-symbol-filename {
    margin: 6px 0;
    color: #777;
    font-size: 9pt;
    text-align: left;
}

.territory-back {
    margin-top: 28px;
}

@media (max-width: 700px) {
    .territory-symbols {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Stopka
   ========================================= */

.site-footer {
    text-align: center;
    font-size: 8pt;
    line-height: 1.6;
    color: #4C4C4C;
    padding: 10px 8px;
}

.site-footer a {
    color: #4C4C4C;
    text-decoration: none;
}

.site-footer a:hover {
    color: #945342;
    text-decoration: underline;
}