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

html,
body {
    overflow-x: clip;
}

/* Окремий шар руху Феміди: він не впливає на розмір сторінки чи скрол. */
html::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-position: center top;
    background-size: 115% auto;
    background-repeat: no-repeat;
    opacity: 0;
    animation: themis-arrive 1.1s cubic-bezier(.18, .8, .2, 1) both;
}

html.themis-background-home::before {
    background-image: linear-gradient(rgba(11, 11, 11, .18), rgba(11, 11, 11, .18)), url("images/legal-background-home.jpg");
}

html.themis-background-documents::before {
    background-image: linear-gradient(rgba(11, 11, 11, .18), rgba(11, 11, 11, .18)), url("images/legal-background-documents.jpg");
}

html.themis-background-payments::before {
    background-image: linear-gradient(rgba(11, 11, 11, .18), rgba(11, 11, 11, .18)), url("images/legal-background-payments.jpg");
}

html.themis-background-legislation::before {
    background-image: linear-gradient(rgba(11, 11, 11, .18), rgba(11, 11, 11, .18)), url("images/legal-background.jpg");
}

html.themis-page-back::before {
    animation-name: themis-drift-back;
}

html.themis-page-forward::before {
    animation-name: themis-drift-forward;
}

body > header,
body > main,
body > section,
body > footer {
    position: relative;
    z-index: 2;
}

body > nav {
    z-index: 100;
}

@keyframes themis-drift-forward {
    0% {
        opacity: .72;
        background-position: 62% top;
    }
    55% {
        opacity: .38;
    }
    100% {
        opacity: 0;
        background-position: 38% top;
    }
}

@keyframes themis-arrive {
    0% {
        opacity: .72;
        background-position: center top;
        background-size: 128% auto;
    }
    100% {
        opacity: 0;
        background-position: center top;
        background-size: 115% auto;
    }
}

@keyframes themis-drift-back {
    0% {
        opacity: .72;
        background-position: 38% top;
    }
    55% {
        opacity: .38;
    }
    100% {
        opacity: 0;
        background-position: 62% top;
    }
}


body {
    background-color: #0b0b0b;
    background-image: linear-gradient(rgba(11, 11, 11, .2), rgba(11, 11, 11, .2)), url("images/legal-background.jpg");
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: white;
    font-family: Arial, sans-serif;
    opacity: 0;
    transform: translateX(46px);
    animation: page-enter-forward .56s cubic-bezier(.22, .75, .25, 1) forwards;
    isolation: isolate;
}

body.page-enter-back {
    transform: translateX(-46px);
    animation-name: page-enter-back;
}

/* Окремий фон головної: Феміда розташована між текстом і портретом. */
body.home-page {
    background-image: linear-gradient(rgba(11, 11, 11, .11), rgba(11, 11, 11, .11)), url("images/legal-background-home.jpg");
}

body.page-documents-background {
    background-image: linear-gradient(rgba(11, 11, 11, .2), rgba(11, 11, 11, .2)), url("images/legal-background-documents.jpg");
}

body.page-payments-background {
    background-image: linear-gradient(rgba(11, 11, 11, .2), rgba(11, 11, 11, .2)), url("images/legal-background-payments.jpg");
}

body.page-leaving.page-forward {
    opacity: 0;
    transform: translateX(-46px);
    transition: opacity .3s ease-in, transform .3s ease-in;
}

body.page-leaving.page-back {
    opacity: 0;
    transform: translateX(46px);
    transition: opacity .3s ease-in, transform .3s ease-in;
}

@keyframes page-enter-forward {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes page-enter-back {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html::before {
        animation: none;
    }

    body {
        animation: none;
        opacity: 1;
    }

    .hero-image {
        animation: none;
    }

    .legislation-item.reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


header {
    background: #000;
}

.header-main {
    min-height: 164px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 12px 80px;
    max-height: none;
    overflow: visible;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .45s ease, min-height .45s ease, padding .45s ease, opacity .25s ease, transform .45s ease;
}

.header-contacts {
    display: flex;
    align-items: flex-start;
    gap: 42px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #e7e7e7;
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
}

.contact-label {
    color: #c9a227;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.contact-item a {
    color: #f1f1f1;
    text-decoration: none;
    transition: color .2s ease;
}

.contact-item a:hover {
    color: #c9a227;
}

.contact-fax {
    color: #ababab;
    font-size: 13px;
}

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 0 80px;
    background: #000;
    border-top: 1px solid #292929;
    border-bottom: 2px solid #c9a227;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 16px;
    padding: 20px 18px;
    border: 1px solid transparent;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: color .25s ease, border-color .25s ease, background-color .25s ease, transform .25s ease;
}

nav a:hover {
    color: #c9a227;
    border-color: rgba(201, 162, 39, .7);
    background: rgba(201, 162, 39, .08);
    transform: translateY(-2px);
}


.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: clamp(520px, 62vh, 680px);
    padding: 0 80px;
}


.hero-text {
    max-width: 660px;
}


h1 {
    font-size: 55px;
    margin-bottom: 25px;
}

.hero-text h1 {
    font-size: clamp(56px, 4vw, 68px);
    line-height: 1.16;
    margin-bottom: 28px;
}

.hero-text p {
    color: #cccccc;
    font-size: 22px;
    line-height: 1.4;
    margin-bottom: 40px;
}


button {
    background: #c9a227;
    color: black;
    border: none;
    padding: 15px 35px;
    font-size: 18px;
    cursor: pointer;
}


button:hover {
    background: #e6c34a;
}


.hero-image {
    position: relative;
    width: 400px;
    height: 500px;
    margin-right: 0;
    border: 2px solid #c9a227;
    background: #161616;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 18px 18px 0 rgba(201, 162, 39, .10), 0 24px 50px rgba(0, 0, 0, .35);
    animation: portrait-enter .8s cubic-bezier(.22, .75, .25, 1) .15s both, portrait-float 6s ease-in-out 1.1s infinite;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: brightness(.83) contrast(1.06) saturate(.82);
    transition: transform .55s ease, filter .55s ease;
}

.hero-image:hover img {
    transform: scale(1.035);
    filter: brightness(.91) contrast(1.08) saturate(.92);
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(9, 8, 5, .08) 35%, rgba(9, 8, 5, .72) 100%);
}

.hero-image::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 14px;
    border: 1px solid rgba(201, 162, 39, .52);
    border-left-color: transparent;
    border-bottom-color: transparent;
    pointer-events: none;
}

.portrait-caption {
    position: absolute;
    z-index: 3;
    right: 26px;
    bottom: 26px;
    left: 26px;
    padding-left: 16px;
    border-left: 2px solid #c9a227;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .75);
}

.portrait-caption span {
    display: block;
    color: #d4ad38;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.portrait-caption strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 26px;
    font-weight: 400;
}

@keyframes portrait-enter {
    from { opacity: 0; transform: translateY(34px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes portrait-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
.subtitle {
    color: #c9a227;
    font-size: 15px;
    letter-spacing: 3px;
    margin-bottom: 25px;
}


.buttons {
    display: flex;
    gap: 20px;
}


.second-btn {
    background: transparent;
    color: white;
    border: 1px solid #c9a227;
}


.stats {
    display: flex;
    gap: 50px;
    margin-top: 60px;
}


.stats div {
    display: flex;
    flex-direction: column;
}


.stats strong {
    color: #c9a227;
    font-size: 32px;
}


.stats span {
    color: #aaa;
    margin-top: 5px;
}

.services {
    padding: 48px 80px 110px;
    border-top: 1px solid #252525;
    scroll-margin-top: 82px;
}

.services-heading {
    max-width: 660px;
    margin-bottom: 42px;
}

.services-heading span {
    color: #c9a227;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.services-heading h2 {
    margin: 12px 0 14px;
    font-size: 48px;
}

.services-heading p {
    color: #b9b9b9;
    font-size: 17px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.service-card {
    min-height: 156px;
    padding: 30px;
    border: 1px solid #303030;
    border-radius: 16px;
    background: linear-gradient(145deg, #161616, #101010);
    cursor: pointer;
    outline: none;
    transition: border-color .35s ease, background-color .35s ease, box-shadow .35s ease, transform .35s ease;
}

.service-card:hover,
.service-card:focus-visible,
.service-card.is-open {
    border-color: #c9a227;
    background: linear-gradient(145deg, #1c1a13, #11100d);
    box-shadow: 0 14px 35px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(201, 162, 39, .08);
    transform: translateY(-4px);
}

.service-card__summary {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 16px;
}

.service-card h3 {
    color: #fff;
    font-size: 20px;
    line-height: 1.35;
}

.service-toggle {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 1px solid #7a6520;
    color: #c9a227;
    font-size: 21px;
    font-weight: 300;
    line-height: 1;
    transition: transform .35s ease, background-color .35s ease, color .35s ease;
}

.service-card:hover .service-toggle,
.service-card:focus-visible .service-toggle,
.service-card.is-open .service-toggle {
    background: #c9a227;
    color: #111;
    transform: rotate(45deg);
}

.service-card__details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .5s ease, opacity .28s ease, padding-top .35s ease;
}

.service-card:hover .service-card__details,
.service-card:focus-visible .service-card__details,
.service-card.is-open .service-card__details {
    max-height: 620px;
    padding-top: 20px;
    opacity: 1;
}

.service-card__details ul {
    display: grid;
    gap: 9px;
    padding-left: 18px;
    color: #d7d7d7;
    font-size: 16px;
    line-height: 1.4;
}

.service-card__details li::marker {
    color: #c9a227;
}

.service-card__details .service-main-item {
    margin-top: 6px;
    color: #f0dfad;
    font-weight: 600;
}

.service-card__details .service-main-item ul {
    display: grid;
    gap: 7px;
    margin-top: 10px;
    padding-left: 18px;
    color: #d7d7d7;
    font-weight: 400;
}

.service-card__details .service-main-item ul li::marker {
    color: #8f782b;
}

.service-card--simple:hover,
.service-card--simple:focus-visible {
    min-height: 156px;
    transform: translateY(-4px);
}

.service-card--simple {
    cursor: default;
}

.service-card--simple .service-toggle {
    opacity: .7;
}

.service-card--simple:hover .service-toggle {
    transform: none;
}
.documents-page{

    max-width:1200px;
    margin:auto;
    padding:100px 40px;

}

.documents-page h1{

    font-size:48px;
    color:#c9a227;
    margin-bottom:20px;

}

.documents-page p{

    color:#bdbdbd;
    margin-bottom:50px;

}

.documents-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));

    gap:30px;

}

.document-card{

    background:#181818;

    border:1px solid #2c2c2c;

    border-radius:16px;

    padding:35px;

    transition:.3s;

}

.document-card:hover{

    transform:translateY(-6px);

    border-color:#c9a227;

}

.document-icon{
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border: 1px solid #c9a227;
    color: #c9a227;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.document-card h3{

    color:white;

    margin-bottom:15px;

}

.document-card p{
    margin-bottom: 28px;
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.document-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #c9a227;
    color: #f5f5f5;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.document-actions a:hover {
    background: #c9a227;
    color: #0b0b0b;
    transform: translateY(-2px);
}

.doc-download {
    background: rgba(201, 162, 39, .1);
}

.payments-page {
    max-width: 1200px;
    margin: auto;
    padding: 90px 40px 110px;
}

.payments-page h1 {
    color: #c9a227;
    font-size: 48px;
    margin-bottom: 16px;
}

.payments-intro {
    color: #bdbdbd;
    font-size: 18px;
    margin-bottom: 38px;
}

.payment-card {
    margin-top: 24px;
    padding: 36px;
    border: 1px solid #3a3420;
    border-radius: 16px;
    background: linear-gradient(145deg, #1b1a16, #11110f);
}

.payment-card__label {
    margin-bottom: 14px;
    color: #c9a227;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.payment-card h2 {
    margin-bottom: 10px;
    font-size: 28px;
}

.payment-card__purpose {
    color: #e9d596;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
}

.payment-card__description {
    max-width: 920px;
    margin-top: 22px;
    color: #c7c7c7;
    line-height: 1.6;
}

.payment-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 32px;
    margin-top: 30px;
}

.payment-details div {
    padding-top: 14px;
    border-top: 1px solid #36332a;
}

.payment-details__account {
    grid-column: 1 / -1;
}

.payment-details dt {
    margin-bottom: 7px;
    color: #c9a227;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.payment-details dd {
    color: #fff;
    font-size: 17px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.payment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.copy-button {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #c9a227;
    background: #c9a227;
    color: #111;
    font-size: 15px;
    font-weight: 700;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

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

.copy-button--secondary {
    background: transparent;
    color: #f5f5f5;
}

.copy-status {
    min-height: 20px;
    margin-top: 12px;
    color: #e9d596;
    font-size: 14px;
}

.legislation-page {
    max-width: 1400px;
    margin: auto;
    padding: 70px 40px 110px;
}

.legislation-content {
    display: grid;
    gap: 18px;
}

.legislation-content h1 {
    margin-bottom: 16px;
    color: #c9a227;
    font-size: 42px;
}

.legislation-intro {
    margin-bottom: 16px;
    color: #d4d4d4;
    font-size: 18px;
    line-height: 1.6;
}

.legislation-item {
    display: block;
    padding: 30px 32px;
    border: 1px solid #303030;
    border-radius: 16px;
    background: linear-gradient(145deg, #161616, #101010);
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .25s ease, background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.legislation-item.reveal-on-scroll {
    opacity: 0;
    transform: translateX(-105px);
    transition: opacity .95s ease, transform .95s cubic-bezier(.22, .75, .25, 1), border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
}

.legislation-item.reveal-on-scroll:nth-of-type(even) {
    transform: translateX(105px);
}

.legislation-item.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.legislation-item:hover,
.legislation-item:focus-visible {
    border-color: #c9a227;
    transform: translateY(-3px);
    background: linear-gradient(145deg, #1c1a13, #11100d);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
    outline: none;
}

.legislation-item.reveal-on-scroll.is-visible:hover,
.legislation-item.reveal-on-scroll.is-visible:focus-visible {
    transform: translateY(-3px);
}

/* Поява основних карток під час прокрутки */
.scroll-reveal {
    opacity: 0;
    transform: translateY(46px);
    transition: opacity .72s ease, transform .72s cubic-bezier(.22, .75, .25, 1);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

.service-card.scroll-reveal:nth-child(even),
.payment-card.scroll-reveal:nth-child(even) {
    transform: translateX(52px);
}

.service-card.scroll-reveal:nth-child(odd),
.payment-card.scroll-reveal:nth-child(odd) {
    transform: translateX(-52px);
}

.document-card.scroll-reveal:nth-child(1) { transform: translate(-90px, -90px); }
.document-card.scroll-reveal:nth-child(2) { transform: translateY(-110px); }
.document-card.scroll-reveal:nth-child(3) { transform: translate(90px, -90px); }
.document-card.scroll-reveal:nth-child(4) { transform: translate(-90px, 90px); }
.document-card.scroll-reveal:nth-child(5) { transform: translateY(110px); }
.document-card.scroll-reveal:nth-child(6) { transform: translate(90px, 90px); }

.service-card.scroll-reveal.is-visible,
.payment-card.scroll-reveal.is-visible,
.document-card.scroll-reveal.is-visible {
    transform: translate(0, 0);
}

.service-card.scroll-reveal.is-visible:hover,
.service-card.scroll-reveal.is-visible:focus-visible,
.service-card.scroll-reveal.is-visible.is-open,
.service-card--simple.scroll-reveal.is-visible:hover,
.service-card--simple.scroll-reveal.is-visible:focus-visible,
.document-card.scroll-reveal.is-visible:hover,
.payment-card.scroll-reveal.is-visible:hover {
    transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none !important;
        transition: none;
    }
}

.legislation-item h2 {
    color: #f0dfad;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.55;
}

.legislation-item p {
    margin-top: 14px;
    color: #c8c8c8;
    font-size: 16px;
    line-height: 1.65;
}

.site-footer {
    border-top: 1px solid #37301a;
    background: rgba(0, 0, 0, .9);
}

.site-footer__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    column-gap: 56px;
    max-width: 1400px;
    margin: auto;
    padding: 42px 80px 38px;
}

.site-footer__contacts {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin-top: 20px;
    color: #c8c8c8;
    font-size: 16px;
    line-height: 1.5;
}

.site-footer__contacts a {
    color: #e5e5e5;
    text-decoration: none;
}

.site-footer__contacts a:hover,
.site-footer__contacts a:focus-visible {
    color: #c9a227;
}

.site-footer__nav {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.site-footer__nav p {
    margin-bottom: 5px;
    color: #f0dfad;
    font-size: 16px;
    font-weight: 700;
}

.site-footer__nav a {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d4d4d4;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    text-decoration: none;
    transform: none;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
    border: 0;
    background: transparent;
    color: #c9a227;
    text-decoration: underline;
    transform: none;
}

.site-footer__bottom {
    padding: 22px 80px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #a9a9a9;
    font-size: 14px;
}


.active{

    color:#c9a227 !important;

}
.site-logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-logo img {
    width: 430px;
    height: auto;
    display: block;
}

@media (min-width: 901px) and (max-width: 1400px) {
    .hero {
        padding-right: 48px;
        padding-left: 48px;
    }

    .hero-text {
        max-width: 560px;
    }

    .hero-image {
        width: 380px;
        margin-right: 0;
    }
}

@media (max-width: 900px) {
    .header-main {
        min-height: 128px;
        max-height: none;
        overflow: visible;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 10px 28px;
    }

    .header-contacts {
        display: flex;
        flex-wrap: wrap;
        gap: 16px 28px;
    }

    .site-logo img {
        width: 290px;
    }

    nav {
        min-height: 58px;
        flex-wrap: wrap;
        padding: 0 20px;
    }

    nav a {
        margin-right: 2px;
        padding: 16px 10px;
        font-size: 16px;
    }

    .contact-item {
        font-size: 13px;
    }

    .services {
        padding: 44px 28px 84px;
        scroll-margin-top: 72px;
    }

    .services-heading h2 {
        font-size: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .service-card {
        min-height: 134px;
        padding: 24px;
    }

    .service-card h3 {
        font-size: 19px;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 42px;
        min-height: auto;
        padding: 64px 28px 76px;
    }

    .hero-text {
        max-width: 680px;
    }

    .hero-text h1 {
        font-size: clamp(40px, 9vw, 56px);
    }

    .hero-image {
        align-self: center;
        width: min(400px, 100%);
        height: min(125vw, 500px);
        margin-right: 0;
    }

    .payments-page {
        padding: 62px 28px 84px;
    }

    .payments-page h1 {
        font-size: 38px;
    }

    .payment-card {
        padding: 26px;
    }

    .payment-details {
        grid-template-columns: 1fr;
    }

    .copy-button {
        width: 100%;
    }

    .legislation-page {
        padding: 48px 28px 84px;
    }

    .legislation-content h1 {
        font-size: 34px;
    }

    .legislation-item {
        padding: 24px;
    }

    .site-footer__content {
        grid-template-columns: 1fr;
        padding: 36px 28px 32px;
    }

    .site-footer__nav {
        grid-column: 1;
        grid-row: auto;
        margin-top: 28px;
    }

    .site-footer__bottom {
        padding: 20px 28px;
    }
}

@media (max-width: 540px) {
    nav {
        flex-wrap: wrap;
        padding: 6px 14px;
    }

    nav a {
        padding: 12px 10px;
        font-size: 14px;
    }
}

/* Адаптація для ноутбуків, планшетів і телефонів. */
.hero-text,
.hero-image,
.header-contacts,
.payment-details,
.site-footer__contacts {
    min-width: 0;
}

.hero-text {
    flex: 1 1 0;
}

.hero-image {
    flex: 0 1 400px;
}

.site-footer__nav {
    position: static;
    top: auto;
    z-index: auto;
}

@media (max-width: 1200px) {
    .header-main {
        gap: 28px;
        padding-right: 48px;
        padding-left: 48px;
    }

    .header-contacts {
        gap: 20px 28px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    nav {
        padding-right: 48px;
        padding-left: 48px;
    }

    nav a {
        margin-right: 4px;
        padding-right: 13px;
        padding-left: 13px;
    }

    .hero {
        gap: 36px;
        padding-right: 48px;
        padding-left: 48px;
    }

    .hero-text h1 {
        font-size: clamp(48px, 5vw, 62px);
    }

    .hero-image {
        width: 340px;
        height: 440px;
    }
}

@media (max-width: 760px) {
    body {
        background-attachment: scroll;
        animation: none;
        opacity: 1;
        transform: none;
    }

    html::before {
        display: none;
    }

    .hero-image {
        animation: none;
    }

    .hero-image:hover img {
        transform: none;
    }

    .scroll-reveal,
    .legislation-item.reveal-on-scroll {
        opacity: 1;
        transform: none !important;
        transition: none;
    }

    .header-main {
        min-height: 0;
        gap: 20px;
        padding: 18px 24px;
    }

    .header-contacts {
        width: 100%;
        justify-content: flex-start;
    }

    .contact-phones {
        min-width: 178px;
    }

    .contact-item {
        font-size: 14px;
    }

    .site-logo img {
        width: min(290px, 100%);
    }

    nav {
        min-height: 0;
        padding: 7px 16px;
    }

    nav a {
        padding: 10px 9px;
        font-size: 14px;
    }

    .hero {
        gap: 34px;
        padding: 52px 24px 64px;
    }

    .subtitle {
        font-size: 12px;
        letter-spacing: 1.8px;
    }

    .hero-text h1 {
        font-size: clamp(38px, 10vw, 52px);
        margin-bottom: 20px;
    }

    .hero-text p {
        font-size: 18px;
        margin-bottom: 0;
    }

    .hero-image {
        width: min(380px, 100%);
        height: min(125vw, 470px);
    }

    .services,
    .documents-page,
    .payments-page,
    .legislation-page {
        padding-right: 24px;
        padding-left: 24px;
    }

    .services-heading h2,
    .documents-page h1,
    .payments-page h1,
    .legislation-content h1 {
        font-size: clamp(32px, 8vw, 40px);
    }

    .document-card,
    .payment-card,
    .legislation-item {
        padding: 22px;
    }

    .payment-card h2 {
        font-size: 24px;
    }

    .payment-card__purpose {
        font-size: 16px;
    }

    .payment-details dd {
        font-size: 16px;
    }

    .copy-button {
        width: 100%;
        font-size: 14px;
    }

    .site-footer__content {
        column-gap: 28px;
        grid-template-columns: minmax(0, 1fr) 150px;
        padding: 34px 24px 30px;
    }

    .site-footer__contacts {
        gap: 9px 18px;
        margin-top: 0;
        font-size: 14px;
    }

    .site-footer__nav a {
        font-size: 14px;
    }

    .site-footer__bottom {
        padding: 18px 24px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: 16px 18px;
    }

    .site-logo img {
        width: min(250px, 100%);
    }

    .header-contacts {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .contact-item,
    .contact-address a {
        white-space: normal;
    }

    .contact-item {
        gap: 4px;
        font-size: 14px;
        line-height: 1.35;
    }

    .contact-label {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .contact-fax {
        font-size: 12px;
    }

    nav {
        padding: 6px 10px;
    }

    nav a {
        padding: 9px 8px;
        font-size: 13px;
    }

    .hero {
        padding: 42px 18px 54px;
    }

    .hero-text h1 {
        font-size: clamp(34px, 10.5vw, 44px);
    }

    .hero-image {
        height: min(130vw, 440px);
        border-width: 1px;
    }

    .portrait-caption {
        right: 18px;
        bottom: 18px;
        left: 18px;
    }

    .portrait-caption strong {
        font-size: 22px;
    }

    .services,
    .documents-page,
    .payments-page,
    .legislation-page {
        padding: 42px 18px 64px;
    }

    .services-grid,
    .documents-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-card,
    .document-card,
    .payment-card,
    .legislation-item {
        padding: 20px;
        border-radius: 12px;
    }

    .service-card h3 {
        font-size: 17px;
    }

    .service-card__details ul,
    .legislation-item p {
        font-size: 15px;
    }

    .document-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .document-actions a {
        width: 100%;
    }

    .payment-details {
        gap: 14px;
        margin-top: 22px;
    }

    .payment-details dd {
        font-size: 14px;
    }

    .payment-actions {
        margin-top: 22px;
    }

    .legislation-item h2 {
        font-size: 17px;
    }

    .site-footer__content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 30px 18px;
    }

    .site-footer__contacts,
    .site-footer__nav {
        grid-column: 1;
        grid-row: auto;
    }

    .site-footer__nav {
        gap: 8px;
    }

    .site-footer__bottom {
        padding: 16px 18px;
    }
}

/* Без анімації переходів: вона може зсувати сторінку в мобільних браузерах після повернення назад. */
html::before {
    display: none;
}

body,
body.page-enter-back,
body.page-leaving.page-forward,
body.page-leaving.page-back {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
}

/* Вимикаємо всі анімації появи: стабільний вигляд важливіший за декоративний рух. */
.hero-image,
.scroll-reveal,
.legislation-item.reveal-on-scroll {
    animation: none;
    opacity: 1;
    transform: none !important;
    transition: none;
}

.hero-text .subtitle {
    text-align: left;
}

@media (min-width: 761px) {
    html::before {
        display: block;
    }

    body {
        animation: none;
        opacity: 1;
        transform: none;
    }

    body.page-enter-back {
        animation: none;
        opacity: 1;
        transform: none;
    }

    body.page-leaving.page-forward {
        opacity: 1;
        transform: none;
        transition: none;
    }

    body.page-leaving.page-back {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html.themis-page-initial::before {
        animation: themis-arrive 1.1s cubic-bezier(.18, .8, .2, 1) both;
    }

    html.themis-page-forward::before {
        animation: themis-drift-forward 1.1s cubic-bezier(.18, .8, .2, 1) both;
    }

    html.themis-page-back::before {
        animation: themis-drift-back 1.1s cubic-bezier(.18, .8, .2, 1) both;
    }

    .hero-text {
        transform: translateY(42px);
    }

    .hero-image {
        animation: portrait-enter .8s cubic-bezier(.22, .75, .25, 1) .15s both, portrait-float 6s ease-in-out 1.1s infinite;
        transition: transform .3s ease, box-shadow .3s ease;
    }

    .hero-image:hover {
        transform: translateY(-5px) !important;
        box-shadow: 22px 25px 0 rgba(201, 162, 39, .13), 0 28px 54px rgba(0, 0, 0, .42);
    }

    .service-card.scroll-reveal,
    .document-card.scroll-reveal,
    .payment-card.scroll-reveal,
    .legislation-item.reveal-on-scroll {
        opacity: 0;
        transform: translateY(42px) !important;
        transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease, transform .25s ease;
    }

    .service-card.scroll-reveal.is-visible,
    .document-card.scroll-reveal.is-visible,
    .payment-card.scroll-reveal.is-visible,
    .legislation-item.reveal-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0) !important;
        transition: opacity .55s ease, transform .55s cubic-bezier(.22, .75, .25, 1), border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
    }

    .service-card.scroll-reveal:hover,
    .service-card.scroll-reveal:focus-visible,
    .service-card.scroll-reveal.is-open,
    .document-card.scroll-reveal:hover,
    .payment-card.scroll-reveal:hover,
    .legislation-item.reveal-on-scroll:hover,
    .legislation-item.reveal-on-scroll:focus-visible {
        transform: translateY(-4px) !important;
    }
}

/* На телефонах використовуємо окрему вертикальну композицію фону. */
@media (max-width: 760px) {
    body {
        background-image: url("images/legal-background-mobile.jpg");
        background-position: center top;
        background-size: 100% auto;
        background-repeat: no-repeat;
    }
}
