/* ============================================
   Рекорды российского девелопмента
   records.erzrf.ru — стили
   ============================================ */

@font-face {
    font-family: "Geologica";
    src: url("fonts/Geologica[CRSV,SHRP,slnt,wght].ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-bg: #f2f2f2d3;
    --color-bg-alt: #f5f5f5;
    --color-surface: #fff;
    --color-text: #1a1a1a;
    --color-text-muted: #666;
    --color-text-strong: #232323;
    --color-text-soft: #b1b1b1;
    --color-accent: #f15a1c;
    --color-accent-hover: #e04f14;
    --color-border: #e0e0e0;

    --font-sans: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;

    --text-sm: clamp(0.875rem, 1.2vw, 0.9375rem);
    --text-base: clamp(1rem, 1.35vw, 1.0625rem);
    --text-lg: clamp(1.125rem, 1.55vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.85vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 2.4vw, 2rem);
    --text-3xl: clamp(2rem, 3.2vw, 2.75rem);
    --text-hero: clamp(2.7rem, 4.85vw, 4.7rem);

    --line-height-tight: 1.2;
    --line-height-normal: 1.5;

    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    --container-max: 1900px;
    --container-padding: 8%;

    --radius: 0.5rem;
    --transition: 0.2s ease;

    --duration-slow: 0.5s;
    --duration-reveal: 0.6s;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

ul,
ol {
    list-style: none;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main {
    flex: 1;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

@media screen and (max-width: 768px) {
    .container {
        padding-inline: 0.5rem;
    }
}

/* --- Header --- */
.header {
    z-index: 100;
    position: fixed;
    top: 1rem;
    left: 0;
    right: 0;
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    padding: 0 5%;

}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    padding: 0.6rem 4%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-bg);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* --- Промежуточные размеры (планшеты/малые ноуты) --- */
@media screen and (max-width: 1200px) {
    .header__inner {
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
        gap: var(--space-lg);
    }

    .logo__img {
        height: 36px;
    }

    .nav {
        gap: var(--space-md) var(--space-xl);
    }

    .nav__link {
        font-size: var(--text-lg);
    }

    .nav__link_primary {
        padding: 0.65rem 1.75rem;
    }
}

@media screen and (max-width: 1024px) {
    .header {
        padding: 0 0.75rem;
    }

    .nav__link_primary {
        padding: 0.6rem 1.5rem;
    }
}

/* Стекло при скролле — более прозрачное */
.header--scrolled .header__inner {
    background-color: rgba(242, 242, 242, 0.52);
    border-color: rgba(224, 224, 224, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.logo {
    display: block;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
}

.logo__img {
    display: block;
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg) var(--space-2xl);
    flex-wrap: wrap;
}

.nav__link {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
}

.nav__link:hover {
    color: var(--color-accent);
}

.nav__link_primary {
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 2.6rem;
    font-weight: 600;
    color: #fff;
    text-transform: none;
    border-radius: 9999px;
    background: linear-gradient(110deg,
            #f7941e 0%,
            #f15a1c 25%,
            #f7941e 50%,
            #f15a1c 75%,
            #f7941e 100%);
    background-size: 200% 100%;
    background-position: 0% 50%;
    transition: background 0.3s ease, background-position 0.5s ease, color 0.2s ease;
    animation: btnGradientShift 6s ease-in-out infinite;
}

@keyframes btnGradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.nav__link_primary:hover {
    background: #232323;
    animation: none;
    color: #fff;
}

@media screen and (max-width: 768px) {
    .header {
        top: 0.8rem;
        padding: 0 0.4rem;
    }

    .header__inner {
        padding-block: 0.3rem 0.3rem;
        padding: 8px;
        flex-wrap: wrap;
        align-items: center;
        gap: 0;
        justify-content: space-between;
    }

    .logo__img {
        height: 24px;
    }

    .nav {
        gap: 8px;
        justify-content: space-between;
    }

    .nav__link {
        font-size: 10px;
    }

    .nav__link_primary {
        padding: 0.4rem 0.8rem;
        font-size: 11px;
    }

    .nav__link_primary span {
        line-height: 1;
    }
}

/* --- Hero --- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-block: var(--space-2xl) var(--space-3xl);
    text-align: center;
    overflow: hidden;
}

.hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 136%;
    object-fit: cover;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.15) 50%,
            rgba(0, 0, 0, 0.4) 100%);
    z-index: 0;
}

/* Декоративная SVG-анимация в hero */
.hero__svg {
    position: absolute;
    inset: 0;
    z-index: 0.5;
    pointer-events: none;
    overflow: hidden;
}

.hero__svg-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    transform: translate(-50%, -50%);
    min-width: 1200px;
    min-height: 800px;
}

@media screen and (max-width: 1580px) {
    .hero {
        min-height: 120vh;
    }
    .hero__svg-inner {
        min-width: 980px;
        min-height: 700px;
    }
}

@media screen and (max-width: 1024px) {
    .hero__svg-inner {
        min-width: 860px;
        min-height: 620px;
    }
}
@media screen and (max-width: 768px) {
    .hero {
        min-height: 100vh;
    }
}

.hero__ring {
    transform-origin: 600px 400px;
}

.hero__ring--1 {
    stroke-dashoffset: 1760;
    animation: heroRingDraw1 5s ease-in-out 0.3s infinite;
}

.hero__ring--2 {
    stroke-dashoffset: 1382;
    animation: heroRingDraw2 5s ease-in-out 0.6s infinite;
}

.hero__ring--3 {
    stroke-dashoffset: 1005;
    animation: heroRingDraw3 5s ease-in-out 0.9s infinite;
}

@keyframes heroRingDraw1 {

    0%,
    100% {
        stroke-dashoffset: 1760;
    }

    45% {
        stroke-dashoffset: 0;
    }

    55% {
        stroke-dashoffset: 0;
    }
}

@keyframes heroRingDraw2 {

    0%,
    100% {
        stroke-dashoffset: 1382;
    }

    45% {
        stroke-dashoffset: 0;
    }

    55% {
        stroke-dashoffset: 0;
    }
}

@keyframes heroRingDraw3 {

    0%,
    100% {
        stroke-dashoffset: 1005;
    }

    45% {
        stroke-dashoffset: 0;
    }

    55% {
        stroke-dashoffset: 0;
    }
}

.hero__dots .hero__dot {
    animation: heroDotFloat 5.5s ease-in-out infinite;
}

.hero__dots .hero__dot:nth-child(1) {
    animation-delay: 0s;
}

.hero__dots .hero__dot:nth-child(2) {
    animation-delay: 0.7s;
}

.hero__dots .hero__dot:nth-child(3) {
    animation-delay: 1.4s;
}

.hero__dots .hero__dot:nth-child(4) {
    animation-delay: 2.1s;
}

.hero__dots .hero__dot:nth-child(5) {
    animation-delay: 2.8s;
}

.hero__dots .hero__dot:nth-child(6) {
    animation-delay: 3.5s;
}

@keyframes heroDotFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(8px, -12px) scale(1.2);
        opacity: 1;
    }
}

.hero__glow {
    transform-origin: 600px 400px;
    animation: heroGlowPulse 8s ease-in-out infinite;
}

@keyframes heroGlowPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@media screen and (prefers-reduced-motion: reduce) {
    .hero__ring {
        animation: none;
        stroke-dashoffset: 0;
    }

    .hero__dots .hero__dot {
        animation: none;
    }

    .hero__glow {
        animation: none;
    }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero__title {
    font-size: var(--text-hero);
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: #fff;
    margin-bottom: var(--space-lg);
    width: 100%;
    margin-inline: auto;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal var(--duration-slow) var(--ease-out) 0.2s forwards;
    /* text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3); */
}

.hero__subtitle {
    line-height: 1.2;
    font-size: var(--text-2xl);
    color: #000000;
    max-width: 60%;
    margin-inline: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal var(--duration-slow) var(--ease-out) 0.4s forwards;
    /* text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4); */
}

@media screen and (max-width: 1580px) {
    .hero__title {
        max-width: fit-content;
    }
}

@media screen and (max-width: 768px) {
    .hero__title {
        font-size: clamp(2rem, 7.5vw, 2.6rem);
        line-height: 1.2;
        max-width: 16ch;
    }

    .hero__subtitle {
        font-size: clamp(1.05rem, 4.2vw, 1.25rem);
        max-width: 100%;
        line-height: 1.4;
    }
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Появление блоков при скролле --- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--duration-reveal) var(--ease-out),
        transform var(--duration-reveal) var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 {
    transition-delay: 0.1s;
}

.reveal--delay-2 {
    transition-delay: 0.2s;
}

.reveal--delay-3 {
    transition-delay: 0.3s;
}

/* карточки в реестре — каскадное появление */
.cards.reveal-cards .card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-reveal) var(--ease-out),
        transform var(--duration-reveal) var(--ease-out),
        border-color var(--transition), box-shadow var(--transition);
}

/* задержка только для появления (opacity, transform), не для hover (border, box-shadow) */
.cards.reveal-cards.is-visible .card:nth-child(1) {
    transition-delay: 0.05s;
}

.cards.reveal-cards.is-visible .card:nth-child(2) {
    transition-delay: 0.12s;
}

.cards.reveal-cards.is-visible .card:nth-child(3) {
    transition-delay: 0.19s;
}

.cards.reveal-cards.is-visible .card:nth-child(4) {
    transition-delay: 0.26s;
}

.cards.reveal-cards.is-visible .card:nth-child(5) {
    transition-delay: 0.33s;
}

.cards.reveal-cards.is-visible .card:nth-child(6) {
    transition-delay: 0.4s;
}

.cards.reveal-cards.is-visible .card:nth-child(n+7) {
    transition-delay: 0.47s;
}

.cards.reveal-cards.is-visible .card {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .nav__link_primary {
        animation: none;
    }

    .footer::before {
        animation: none;
    }

    .reveal,
    .reveal.is-visible,
    .cards.reveal-cards .card,
    .cards.reveal-cards.is-visible .card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero__title,
    .hero__subtitle {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .leaders__num-glow {
        transition: none;
    }

    .leaders__num:hover .leaders__num-glow {
        opacity: 0;
    }

    .leaders__scroll-wrap {
        scroll-snap-type: none;
    }
}

/* --- Leaders --- */
.leaders {
    padding-block: var(--space-2xl);
    padding-bottom: 0;
}

.leaders .container {
    text-align: left;
}

/* Лента лидеров: скролл вне .container — на всю ширину окна, отступы как у контента */
.leaders__scroll-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-top: 10px;
    padding-bottom: 14px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(241, 90, 34, 0.5) rgba(0, 0, 0, 0.06);
}

@media screen and (min-width: 1901px) {
    
}

.leaders__scroll-wrap::-webkit-scrollbar {
    height: 7px;
}

.leaders__scroll-wrap::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
}

.leaders__scroll-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(
        90deg,
        rgba(241, 90, 34, 0.85),
        rgba(247, 148, 30, 0.85)
    );
    border-radius: 999px;
}

.leaders__label {
    font-size: var(--text-3xl);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    background: linear-gradient(0.281turn,
            rgba(241, 90, 34, 1) 0%,
            rgba(247, 148, 30, 1) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media screen and (max-width: 768px) {
    .leaders__label {
        font-size: 1.6rem;
        text-align: center;
    }
}

.leaders__numbers {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    margin-top: var(--space-lg);
    margin-bottom: 0.5rem;
    width: max-content;
    min-width: 100%;
}

/* Планшет и десктоп: сетка до 5 колонок с переносом; мобильный горизонтальный скролл — ниже в max-width: 768px */
@media screen and (min-width: 769px) {
    .leaders__scroll-wrap {
        overflow-x: visible;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    .leaders__numbers {
        place-items: center;
        display: grid;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-template-columns: repeat(auto-fit,minmax(280px, 1fr));
    }

    .leaders__num {
        width: auto;
        min-width: 0;
        max-width: none;
        transform-origin: center;
    }
}

.leaders__num {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0.4rem 1.5rem;
    width: clamp(200px, 28vw, 280px);
    min-width: 0;
    max-width: none;
    height: 110px;
    scroll-snap-align: start;
    border-radius: 4px;
    background-color: #ffffff;
    border: 1px solid #000000;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transform: scale(0.995);
    transform-origin: center left;
    overflow: visible;
    transition:
        transform 0.35s var(--ease-out),
        box-shadow 0.35s var(--ease-out),
        border-color 0.3s ease;
}

.leaders__num:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(241, 90, 28, 0.15);
    border-color: rgba(241, 90, 28, 0.4);
}

/* Мягкое свечение за карточкой при hover */
.leaders__num-glow {
    position: absolute;
    inset: -8px;
    border-radius: 8px;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(241, 90, 28, 0.12) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    pointer-events: none;
    z-index: -1;
}

.leaders__num:hover .leaders__num-glow {
    opacity: 1;
    transform: scale(1);
}

/* SVG-бордер — прорисовка по контуру по hover */
.leaders__num-svg {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 4px;
}

.leaders__border {
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    transition: stroke-dashoffset 0.6s var(--ease-out);
}

.leaders__num:hover .leaders__border {
    stroke-dashoffset: 0;
}

.leaders__num .leaders__logo,
.leaders__num .leaders__num-value {
    position: relative;
    z-index: 1;
}

.leaders__logo {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.leaders__num-value {
    font-size: clamp(2.4rem, 4vw, 4rem);
    font-weight: 700;
    color: var(--color-text-strong);
    line-height: 1;
}

@media screen and (max-width: 768px) {
    .leaders__scroll-wrap {
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .leaders__numbers {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
        gap: 0.75rem;
    }

    .leaders__num {
        width: clamp(168px, 74vw, 260px);
        min-width: clamp(168px, 74vw, 260px);
        height: 85px;
    }

    .leaders__num-svg {
        display: none;
    }

    .leaders__num-value {
        font-size: 3.4rem;
    }
    .leaders__logo {
        height: 80%;
    }
}

/* --- Registry / Cards --- */

.regions {
    position: relative;
    padding-block: var(--space-xl);
}

.regions .container {
    position: relative;
    z-index: 1;
    text-align: left;
}

.regions__label {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    background: linear-gradient(0.281turn,
            rgba(241, 90, 34, 1) 0%,
            rgba(247, 148, 30, 1) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.registry {
        padding-bottom: 1rem;
    }
@media screen and (max-width: 768px) {
    .regions__label {
        text-align: center;
        font-size: 1.6rem;
    }
    
}

.regions__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.regions__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.regions__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.5rem;
}

@media screen and (max-width: 1024px) {
    .regions__inner {
        gap: var(--space-lg);
        flex-wrap: wrap;
    }

    .regions__actions {
        padding-right: 0;
    }
}

.regions__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 2rem;
    font-size: var(--text-lg);
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 40px;
    border: 1px solid var(--color-text-soft);
    color: var(--color-text-soft);
    background: transparent;
    cursor: pointer;
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

@media screen and (max-width: 768px) {
    .regions__tabs {
        gap: 0.4rem;
    }

    .regions__tab {
        font-size: 14px;
        padding: 0.3rem 1rem;
    }
}

.regions__tab--active,
.regions__tab:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.regions__actions {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    padding-right: 7px;
}

.regions__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    transition:
        background var(--transition),
        border-color var(--transition),
        opacity var(--transition);
    opacity: 0.6;
}

@media screen and (max-width: 768px) {
    .regions__actions {
        display: none;
    }
}

.regions__icon {
    width: 40px;
    height: 40px;
    transform: scaleX(1.5);
}

.regions__icon path {
    fill: var(--color-text-soft);
}

.regions__action--active .regions__icon path,
.regions__action:hover .regions__icon path {
    fill: var(--color-accent);
}

.regions__action--active,
.regions__action:hover {
    opacity: 1;
    border-color: var(--color-accent);
}

.cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    grid-auto-rows: auto auto auto auto;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

@media screen and (max-width: 1200px) {
    .cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

@media screen and (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        margin-bottom: 0;
    }
}



.card__image {
    position: relative;
    height: 12rem;
    object-fit: cover;
    overflow: hidden;
    margin-left: -1rem;
    margin-right: -1rem;
    margin-top: -1rem;
}

.card__image img {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cards--list {
    grid-template-columns: 1fr;
}

/* layout карточки в режиме line: картинка слева, контент справа */
.cards--list .card {
    display: grid;
    grid-template-columns: 20% 1fr 1fr;
    place-items: center;
    gap: var(--space-lg);
}

.cards--list .card__image {
    width: 100%;
    height: 170px;
    margin-right: 0;
    margin-left: -2rem;
    margin-bottom: -1rem;
}

.cards--list .card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
}

.cards--list .card__text {
    margin-right: auto;
}

.cards--list .card__footer {
    justify-content: flex-start;
    gap: var(--space-lg);
    margin-top: 0;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid #000000;
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(241, 90, 28, 0.1);
}

.card__logo {
    z-index: 1;
    margin-bottom: var(--space-md);
    max-width: 140px;
    position: absolute;
    left: -3%;
    top: 2%;
}

.card__logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.card__image,
.card__text {
    margin-bottom: var(--space-md);
}

.card__image img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius) - 2px);
}

.card_hidden {
    display: none;
}

.card_hidden.is-visible {
    display: grid;
}

.card__code {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-soft);
}

.card__date {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
}

.card__text {
    font-size: var(--text-lg);
    color: var(--color-text);
    line-height: var(--line-height-tight);
}

.card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.card__footer-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
    min-height: 32px;
    max-height: 32px;
    max-width: 140px;
    /* gap: var(--space-md); */
}
.card__footer-item img {
    height: 100%;
    object-fit: contain;
}

.registry__region {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

@media screen and (max-width: 768px) {
    .registry__region {
        font-size: 16px;
        text-align: center;
        margin-bottom: 1rem;
    }

    .card {
        overflow: hidden;
        padding: 0;
    }

    .card__image {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        border-radius: calc(var(--radius) - 2px);
        height: 7.4rem;
        margin-bottom: 0.6rem;
    }

    .card__text {
        font-size: 11px;
        padding: 0 0.6rem;
        margin-bottom: 0.6rem;
    }

    .card__footer {
        padding: 0 0.4rem 0.4rem 0.4rem;
        gap: 0;
    }

    .card__footer-item {
        gap: 0;
        max-width: 80px;
        min-height: 20px;
        max-height: 20px;
    }

    .card__code,
    .card__date {
        font-size: 11px;
    }

    .cards--list .card__image {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 0;
    }
    .card__logo {
        max-width: 70px;
        left: -5%;
        top: 0;
    }
}

.btn.registry__show-more {
    margin: auto;
    display: flex;
    border: none;
    background: none;
    color: #000000;
    font-weight: 700;
    padding: 0;
}
.btn.registry__show-more:hover {
    background: none;
    color: #000000;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.btn_primary {
    background: var(--color-accent);
    color: #fff;
}

.btn_primary:hover {
    background: var(--color-accent-hover);
}

.btn_secondary {
    background: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn_secondary:hover {
    background: var(--color-accent);
    color: #fff;
}

.btn_full {
    width: 100%;
}
@media screen and (max-width: 768px) {
    .btn {
        padding: 0.4rem 1rem;
        font-size: 12px;
    }
    .btn.registry__show-more {
        margin-top: 1rem;
        font-size: 15px;
    }
}

/* --- Footer --- */
.footer {
    position: relative;
    margin-top: auto;
    padding-block: var(--space-xl);
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(135deg,
            #f15a1c 0%,
            #e04f14 35%,
            #d9450f 100%);
    color: #fff;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 20%,
            rgba(255, 255, 255, 0.7) 50%,
            rgba(255, 255, 255, 0.4) 80%,
            transparent 100%);
    background-size: 200% 100%;
    animation: footerShine 4s ease-in-out infinite;
}

@keyframes footerShine {

    0%,
    100% {
        background-position: 100% 0;
    }

    50% {
        background-position: 0% 0;
    }
}

.footer__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.footer__link {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.25s ease;
    position: relative;
}

.footer__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out);
}

.footer__link:hover {
    color: #fff;
}

.footer__link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.footer__contacts {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.footer__contact {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer__contact:hover {
    color: #fff;
}

.footer__contact--telegram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background 0.25s ease, transform 0.25s ease;
}

.footer__tg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #fff;
    transition: transform 0.25s ease;
}

.footer__contact--telegram:hover .footer__tg-icon {
    transform: scale(1.05);
}

@media screen and (max-width: 768px) {
    .footer {
        padding: 1.4rem 0.8rem;
    }
    .footer__inner {
        gap: 1rem;
    }
    .footer__link {
        font-size: 12px;
        text-align: center;
        max-width: 80%;
        line-height: 1.4;
    }
    .footer__contacts {
        gap: 0.4rem;
    }
    .footer__contact {
        font-size: 13px;
    }
    .footer__tg-icon {
        width: 28px;
        height: 28px;
    }
    .footer.reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Modal --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal.is-open,
/* Совместимость с slam modal / bootstrap-like классами */
.modal.show,
.modal.in {
    /* modalSlam выставляет inline display:block, нам нужен flex для центровки */
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal__box {
    position: relative;
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: var(--radius);
    padding: var(--space-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Success modal tweaks (reuse same look as main modal) */
.modal-add-holiday .modal__box {
    max-width: 32rem;
}

.modal__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}

.modal__close:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.modal__title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.modal__text {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

/* --- Form --- */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form__field_checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-md);
}

.form__label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
}

.form__input {
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form__checkbox {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.form__link {
    color: var(--color-accent);
}

.form__link:hover {
    text-decoration: underline;
}

/* --- Utils --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.scroll-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: none;
    background: var(--color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity var(--transition),
        visibility var(--transition),
        transform var(--transition),
        background var(--transition);
    z-index: 300;
}

.scroll-top:hover {
    background: var(--color-accent-hover);
}

.scroll-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Учёт вырезов на мобильных */
@supports (padding: env(safe-area-inset-bottom)) {
    .scroll-top {
        right: calc(1.5rem + env(safe-area-inset-right));
        bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    @media screen and (max-width: 768px) {
        .scroll-top {
            right: calc(var(--space-md) + env(safe-area-inset-right));
            bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
        }
    }
}