/* ==========================================================================
   Волонтёрский центр БГУ — фирменные стили
   Палитра и типографика согласованы с bgu.ru
   ========================================================================== */

@font-face {
    font-family: 'Oswald';
    src: url('../fonts/Oswald-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #164676;
    --navy-dark: #0d2b4a;
    --navy-soft: #1d5a94;
    --blue: #3399ff;
    --blue-soft: #eaf3fb;
    --orange: #ff6600;
    --orange-dark: #c14a00;
    --ink: #22303f;
    --muted: #5b6b7d;
    --line: #dfe7f0;
    --bg: #f7f9fc;
    --white: #ffffff;
    --shadow: 0 12px 30px rgba(22, 70, 118, .08);
    --shadow-lg: 0 24px 60px rgba(13, 43, 74, .14);
    --radius: 20px;
    --radius-lg: 26px;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: 'Oswald', 'Arial Narrow', Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color .2s ease;
}

a:hover,
a:focus {
    color: var(--orange-dark);
    text-decoration: none;
}

h1,
h2,
h3,
h4,
.footer-title,
.brand-name,
.eyebrow,
.section-head h2,
.panel-head h2 {
    font-family: var(--font-head);
    font-weight: 400;
    letter-spacing: .005em;
}

h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.02;
    color: var(--navy-dark);
    margin: 0 0 1rem;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.12;
    color: var(--navy);
    margin: 0 0 .6rem;
}

h3 {
    color: var(--navy);
    line-height: 1.25;
}

p {
    margin: 0 0 1rem;
}

p:last-child {
    margin-bottom: 0;
}

::selection {
    background: rgba(51, 153, 255, .22);
    color: var(--navy-dark);
}

:focus-visible {
    outline: 3px solid rgba(51, 153, 255, .65);
    outline-offset: 3px;
}

section[id],
div[id] {
    scroll-margin-top: 92px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 3000;
    padding: .7rem 1rem;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
    color: #fff;
}

.eyebrow {
    margin: 0 0 .6rem;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--orange-dark);
}

.section {
    padding: 5rem 0;
}

.section-tint {
    background: #f1f6fc;
}

.section-head {
    max-width: 780px;
    margin: 0 0 2.75rem;
}

.section-lead {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9rem 1.4rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn-bgu {
    background: var(--navy);
    color: #fff;
}

.btn-bgu:hover,
.btn-bgu:focus {
    background: var(--navy-dark);
    color: #fff;
    box-shadow: 0 10px 24px rgba(22, 70, 118, .22);
    transform: translateY(-1px);
}

.btn-bgu-outline {
    background: transparent;
    border-color: var(--navy);
    color: var(--navy);
}

.btn-bgu-outline:hover,
.btn-bgu-outline:focus {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    transform: translateY(-1px);
}

.btn-sm {
    padding: .6rem 1rem;
    font-size: .85rem;
}

.btn-block {
    width: 100%;
}

.btn-nav {
    margin-left: .25rem;
    padding: .6rem 1.15rem;
    font-size: .9rem;
}

/* ---------- Верхняя строка ---------- */

.topbar {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 38px;
}

.topbar a {
    color: rgba(255, 255, 255, .82);
}

.topbar a:hover,
.topbar a:focus {
    color: #fff;
}

.topbar-university {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    white-space: nowrap;
}

.topbar-links i {
    margin-right: .35rem;
    color: #9ec8f0;
}

/* ---------- Хедер ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow .2s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(22, 70, 118, .10);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
}

.brand img {
    display: block;
    width: auto;
    height: 48px;
}

.brand-sep {
    width: 1px;
    height: 32px;
    background: var(--line);
    flex: none;
}

.brand-name {
    font-family: var(--font-head);
    font-size: 1.05rem;
    color: var(--navy);
    white-space: nowrap;
}

.brand-name:hover,
.brand-name:focus {
    color: var(--orange-dark);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    margin-left: auto;
}

.site-nav a:not(.btn) {
    position: relative;
    padding: .45rem 0;
    font-family: var(--font-head);
    font-size: .92rem;
    color: var(--ink);
    white-space: nowrap;
}

.site-nav a:not(.btn)::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s ease;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn):focus,
.site-nav a.is-active {
    color: var(--navy);
}

.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn):focus::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle-bars {
    position: relative;
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    transition: background-color .2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    transition: transform .2s ease, top .2s ease;
}

.nav-toggle-bars::before {
    top: -7px;
}

.nav-toggle-bars::after {
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ---------- Герой ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 3.75rem 0 4.5rem;
    background: linear-gradient(180deg, #f8fbff 0%, #eaf2fb 100%);
}

.hero-heart {
    position: absolute;
    top: -110px;
    right: -140px;
    width: 560px;
    color: var(--navy);
    opacity: .055;
    pointer-events: none;
}

.hero-heart svg {
    display: block;
    width: 100%;
    height: auto;
}

.hero-inner {
    position: relative;
}

.hero-copy {
    max-width: 800px;
}

.hero-copy h1 {
    max-width: 12ch;
    margin: .15rem 0 1rem;
}

.hero-lead {
    max-width: 610px;
    margin: 0 0 1.5rem;
    color: #41566d;
    font-size: 1.15rem;
}

.hero-quote {
    max-width: 560px;
    margin: 0 0 1.75rem;
    padding: 0 0 0 1.25rem;
    border-left: 3px solid var(--orange);
}

.hero-quote p {
    margin: 0 0 .35rem;
    color: #3a4f66;
    font-size: 1.02rem;
    font-style: italic;
}

.hero-quote footer {
    color: var(--muted);
    font-size: .85rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.hero-banner {
    position: relative;
    margin-top: 2.75rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #dce9f7;
    box-shadow: var(--shadow-lg);
}

.hero-banner img {
    display: block;
    width: 100%;
    height: clamp(190px, 30vw, 360px);
    object-fit: cover;
    object-position: center 30%;
}

.hero-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--navy);
    font-family: var(--font-head);
    font-size: .82rem;
    box-shadow: 0 8px 20px rgba(13, 43, 74, .18);
}

.hero-badge i {
    color: var(--orange);
}

/* ---------- О нас ---------- */

.about-copy {
    padding: .5rem 0;
}

.about-copy .lead {
    margin-bottom: 1rem;
    color: #33475e;
    font-size: 1.18rem;
}

.about-copy p:not(.lead) {
    max-width: 620px;
    color: var(--muted);
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .9rem;
    border: 1px solid #dbe8f5;
    border-radius: 999px;
    background: #eef4fb;
    color: var(--navy);
    font-size: .85rem;
    font-weight: 600;
}

.chip:hover,
.chip:focus {
    border-color: #b9d4ec;
    background: #fff;
    color: var(--navy);
}

.mission-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 280px;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy) 62%, var(--navy-soft) 100%);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.mission-label {
    position: relative;
    z-index: 1;
    display: inline-block;
    color: #9ec8f0;
    font-family: var(--font-head);
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.mission-card p {
    position: relative;
    z-index: 1;
    margin: 1rem 0 0;
    font-size: 1.08rem;
    line-height: 1.6;
}

.mission-mark {
    position: absolute;
    right: 1.25rem;
    bottom: -1.75rem;
    color: rgba(255, 255, 255, .08);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 10rem;
    line-height: 1;
}

/* ---------- Панели ---------- */

.panel {
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

.panel-head {
    margin-bottom: 1.5rem;
}

.panel-head h2 {
    margin-bottom: .5rem;
}

.panel-lead {
    margin: 0;
    color: var(--muted);
    font-size: .98rem;
}

/* ---------- Календарь ---------- */

.calendar-block + .calendar-block {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.calendar-block-head {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: .8rem;
}

.calendar-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--navy);
    font-size: 1.15rem;
}

.calendar-block-head h3 {
    margin: 0;
    font-size: 1.15rem;
}

.calendar-block-head p {
    margin: 0;
    color: var(--muted);
    font-size: .8rem;
}

.calendar-desc {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: .95rem;
}

.empty-state {
    padding: 1.5rem;
    border: 1px dashed #c9dcee;
    border-radius: 16px;
    background: #f7fbff;
    text-align: center;
}

.empty-state > i {
    color: #8fb3d4;
    font-size: 1.6rem;
}

.empty-state h4 {
    margin: .6rem 0 .25rem;
    font-size: 1.05rem;
    color: var(--navy);
}

.empty-state p {
    max-width: 360px;
    margin: 0 auto .9rem;
    color: var(--muted);
    font-size: .88rem;
}

.archive-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.archive-card:hover,
.archive-card:focus {
    border-color: #bcd7ef;
    box-shadow: 0 14px 30px rgba(22, 70, 118, .12);
    transform: translateY(-2px);
}

.archive-card img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 130px;
    padding: 6px;
    background: #eef5fc;
    object-fit: contain;
}

.archive-body {
    padding: .9rem 1rem;
}

.archive-date {
    display: inline-block;
    margin-bottom: .25rem;
    color: var(--orange-dark);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.archive-body h4 {
    margin: 0 0 .35rem;
    color: var(--navy);
    font-size: 1.02rem;
    line-height: 1.25;
}

.archive-body p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.archive-link {
    display: inline-block;
    margin-top: .55rem;
    color: var(--navy);
    font-size: .82rem;
    font-weight: 700;
}

.archive-card:hover .archive-link,
.archive-card:focus .archive-link {
    color: var(--orange-dark);
}

.calendar-note {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: .85rem;
}

.event-list {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.event-item {
    display: flex;
    gap: .9rem;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.event-date {
    flex: none;
    width: 54px;
    padding: .4rem;
    border-radius: 10px;
    background: var(--blue-soft);
    text-align: center;
}

.event-date span {
    display: block;
    color: var(--navy);
    font-family: var(--font-head);
    font-size: 1.2rem;
    line-height: 1;
}

.event-date small {
    color: var(--muted);
    font-size: .72rem;
}

.event-item h4 {
    margin: 0 0 .2rem;
    color: var(--navy);
    font-size: 1rem;
}

.event-item p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.event-meta {
    margin-top: .3rem !important;
    font-size: .8rem !important;
}

/* ---------- Как стать волонтёром ---------- */

.steps {
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.steps li {
    position: relative;
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
}

.steps li:last-child {
    padding-bottom: 0;
}

.steps li:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 38px;
    bottom: 6px;
    left: 17px;
    width: 2px;
    background: #dfeaf5;
}

.step-num {
    position: relative;
    z-index: 1;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-head);
    font-size: 1rem;
}

.step-body h3 {
    margin: .15rem 0 .35rem;
    font-size: 1.05rem;
}

.step-body p {
    margin: 0 0 .5rem;
    color: var(--muted);
    font-size: .9rem;
}

.step-body a {
    font-size: .88rem;
    font-weight: 700;
}

.benefits {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #e3eef8;
    border-radius: 16px;
    background: #f7fbff;
}

.benefits h3 {
    margin: 0 0 .75rem;
    font-size: 1.05rem;
}

.benefits ul {
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.benefits li {
    display: flex;
    gap: .6rem;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

.benefits li i {
    flex: none;
    margin-top: .2rem;
    color: var(--orange);
}

.join-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.join-actions .btn {
    flex: 1 1 auto;
}

/* ---------- Партнёрам ---------- */

.partner-panel {
    position: relative;
    overflow: hidden;
    height: 100%;
    padding: 2.5rem;
    border: 1px solid #d3e5f5;
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, #eef6ff 0%, #dfeefb 100%);
}

.partner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    border-radius: 16px;
    background: #fff;
    color: var(--navy);
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}

.partner-panel h2 {
    max-width: 15ch;
}

.partner-lead {
    max-width: 620px;
    color: #3c536b;
    font-size: 1.02rem;
}

.partner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}

.partner-mail {
    font-weight: 600;
    border-bottom: 1px solid rgba(22, 70, 118, .3);
}

.partner-note {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

.partner-note i {
    margin-right: .35rem;
    color: var(--orange);
}

/* ---------- Документы ---------- */

.doc-list {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.doc-list li {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: .85rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.doc-list li:last-child {
    border-bottom: 0;
}

.doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef5fc;
    color: var(--navy);
    font-size: 1.05rem;
}

.doc-body h3 {
    margin: 0 0 .2rem;
    color: var(--ink);
    font-size: .98rem;
    line-height: 1.3;
}

.doc-body p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
}

.doc-action {
    color: var(--navy);
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.doc-action:hover,
.doc-action:focus {
    color: var(--orange-dark);
}

.docs-note {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

/* ---------- Контакты ---------- */

.contact-card,
.person-card {
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--navy);
    font-size: 1.15rem;
}

.contact-card h3,
.person-card h3 {
    margin: .2rem 0 .5rem;
    font-size: 1.1rem;
}

.contact-card p {
    color: var(--muted);
    font-size: .95rem;
}

.contact-card hr {
    margin: 1.25rem 0;
    border-color: var(--line);
}

.contact-card a {
    font-weight: 500;
}

.contact-card a i {
    margin-right: .35rem;
    color: var(--navy);
}

.contact-card small {
    color: var(--muted);
    font-size: .78rem;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.35rem;
}

.avatar-alt {
    background: var(--blue);
}

.person-role {
    margin: 0 0 .5rem;
    color: var(--orange-dark);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.person-desc {
    color: var(--muted);
    font-size: .9rem;
}

.person-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .5rem;
    font-size: .9rem;
    font-weight: 600;
}

.social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.social-card:hover,
.social-card:focus {
    border-color: #bcd7ef;
    box-shadow: 0 16px 34px rgba(22, 70, 118, .12);
    transform: translateY(-2px);
}

.social-card > i:first-child {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.35rem;
}

.social-vk > i:first-child {
    background: #e8f0fb;
    color: #4a76a8;
}

.social-dobro > i:first-child {
    background: #fff1e6;
    color: var(--orange-dark);
}

.social-card span {
    display: flex;
    flex-direction: column;
}

.social-card strong {
    color: var(--navy);
    font-family: var(--font-head);
    font-size: .98rem;
    font-weight: 400;
}

.social-card small {
    color: var(--muted);
    font-size: .8rem;
}

.social-card > i:last-child {
    margin-left: auto;
    color: var(--navy);
}

/* ---------- Направления ---------- */

.direction-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 6px 18px rgba(22, 70, 118, .04);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.direction-card:hover {
    border-color: #bcd7ef;
    box-shadow: 0 16px 34px rgba(22, 70, 118, .10);
    transform: translateY(-2px);
}

.direction-num {
    position: absolute;
    top: 1.15rem;
    right: 1.35rem;
    color: #dbe8f5;
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1;
}

.direction-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--navy);
    font-size: 1.2rem;
    transition: background-color .2s ease, color .2s ease;
}

.direction-card:hover .direction-icon {
    background: var(--navy);
    color: #fff;
}

.direction-card h3 {
    max-width: 85%;
    margin: 0 0 .5rem;
    font-size: 1.12rem;
}

.direction-card p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}

.directions-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: #f1f7fd;
}

.directions-cta p {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-head);
    font-size: 1.1rem;
}

/* ---------- Футер ---------- */

.site-footer {
    padding: 4rem 0 1.5rem;
    background: var(--navy-dark);
    color: rgba(255, 255, 255, .76);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer-title {
    margin: 0 0 .5rem;
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.35rem;
}

.footer-brand p {
    margin: 0 0 .4rem;
    font-size: .9rem;
}

.footer-address {
    margin-top: .75rem !important;
    color: rgba(255, 255, 255, .58);
    font-size: .84rem !important;
}

.footer-col h3 {
    margin: 0 0 .9rem;
    color: #fff;
    font-family: var(--font-head);
    font-size: .92rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col li {
    margin: 0 0 .5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, .78);
    font-size: .9rem;
}

.footer-col a:hover,
.footer-col a:focus {
    color: var(--orange);
}

.footer-col a i {
    margin-right: .35rem;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    color: rgba(255, 255, 255, .55);
    font-size: .8rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: #fff;
    font-weight: 600;
}

/* ---------- Диалог ---------- */

.dialog {
    display: none;
    width: min(680px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}

.dialog::backdrop {
    background: rgba(8, 25, 45, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dialog[open] {
    display: block;
    animation: dialog-in .2s ease-out;
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.dialog-inner {
    position: relative;
    padding: 2rem;
}

.dialog-close {
    position: absolute;
    top: .9rem;
    right: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f6fb;
    color: var(--navy);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.dialog-close:hover,
.dialog-close:focus {
    background: var(--orange);
    color: #fff;
}

.dialog h2 {
    max-width: 90%;
    font-size: 1.7rem;
}

.dialog-lead {
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: .95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label {
    color: #33475e;
    font-size: .85rem;
    font-weight: 600;
}

.form-field label span {
    color: var(--orange-dark);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid #d6e2ee;
    border-radius: 10px;
    background: #fbfdff;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: .95rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(51, 153, 255, .18);
    outline: none;
}

.form-hint {
    margin: .75rem 0 .9rem;
    color: var(--muted);
    font-size: .8rem;
}

.form-note {
    margin: .75rem 0 0;
    color: var(--muted);
    font-size: .8rem;
}

.form-status {
    min-height: 1.2em;
    margin: .5rem 0 0;
    color: var(--navy);
    font-size: .85rem;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1199.98px) {
    .site-nav {
        gap: .9rem;
    }

    .site-nav a:not(.btn) {
        font-size: .86rem;
    }

    .brand-name {
        font-size: .98rem;
    }
}

/* На узких ноутбуках кнопка в шапке не помещается — оставляем пункт «Как стать» */
@media (min-width: 992px) and (max-width: 1039.98px) {
    .btn-nav {
        display: none;
    }

    .site-nav {
        gap: .75rem;
    }
}

@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 84px;
    }

    section[id],
    div[id] {
        scroll-margin-top: 84px;
    }

    .header-inner {
        min-height: 66px;
        flex-wrap: wrap;
    }

    .brand img {
        height: 40px;
    }

    .brand-sep {
        display: none;
    }

    .brand-name {
        font-size: .96rem;
    }

    .js .nav-toggle {
        display: flex;
    }

    .js .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 66px);
        padding: .5rem 1.5rem 1.25rem;
        overflow: auto;
        border-top: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 20px 40px rgba(13, 43, 74, .12);
    }

    .js .site-nav.is-open {
        display: flex;
    }

    .js .site-nav a:not(.btn) {
        padding: .8rem 0;
        border-bottom: 1px solid var(--line);
        font-size: 1rem;
    }

    .js .site-nav a:not(.btn)::after {
        display: none;
    }

    .js .site-nav .btn-nav {
        margin: 1rem 0 0;
        text-align: center;
    }

    .site-nav {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding-top: .25rem;
    }

    .site-nav a:not(.btn) {
        padding: .55rem 0;
        border-bottom: 1px solid var(--line);
        font-size: .95rem;
    }

    .site-nav a:not(.btn)::after {
        display: none;
    }

    .btn-nav {
        margin: .75rem 0 0;
    }

    .hero {
        padding: 2.75rem 0 3.5rem;
    }

    .hero-heart {
        top: -70px;
        right: -190px;
        width: 480px;
    }

    .hero-copy h1 {
        font-size: 3.2rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-head {
        margin-bottom: 2rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .partner-panel {
        padding: 2rem;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767.98px) {
    .topbar-links a:last-child {
        display: none;
    }

    .topbar-university span {
        display: none;
    }

    .topbar-university {
        font-size: .9rem;
    }

    .topbar-inner {
        min-height: 34px;
    }

    .hero-copy h1 {
        font-size: 2.6rem;
    }

    .hero-lead {
        font-size: 1.02rem;
    }

    .hero-banner {
        margin-top: 2rem;
    }

    .hero-banner img {
        height: auto;
    }

    .hero-badge {
        bottom: .7rem;
        left: .7rem;
        font-size: .75rem;
    }

    .section {
        padding: 3.25rem 0;
    }

    .section-head {
        margin-bottom: 1.75rem;
    }

    .section-lead {
        font-size: .98rem;
    }

    .archive-card {
        grid-template-columns: 110px 1fr;
    }

    .archive-body {
        padding: .75rem .8rem;
    }

    .social-row {
        grid-template-columns: 1fr;
    }

    .direction-card {
        padding: 1.5rem;
    }

    .site-footer {
        padding-top: 3rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .hero-copy h1 {
        font-size: 2.25rem;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }

    .hero-quote {
        padding-left: 1rem;
    }

    .hero-quote p {
        font-size: .95rem;
    }

    .hero-heart {
        display: none;
    }

    .mission-card {
        padding: 1.5rem;
    }

    .panel {
        padding: 1.25rem;
        border-radius: var(--radius);
    }

    .partner-panel {
        padding: 1.5rem;
        border-radius: var(--radius);
    }

    .partner-panel h2 {
        max-width: none;
    }

    .empty-state {
        padding: 1.2rem;
    }

    .archive-card {
        grid-template-columns: 1fr;
    }

    .archive-card img {
        height: auto;
        min-height: 0;
        padding: 0;
    }

    .join-actions .btn {
        flex: 1 1 100%;
    }

    .doc-list li {
        grid-template-columns: 40px 1fr;
        align-items: start;
    }

    .doc-action {
        grid-column: 2;
        margin-top: .2rem;
    }

    .social-card {
        padding: 1rem;
    }

    .directions-cta {
        align-items: stretch;
        text-align: center;
    }

    .directions-cta .btn {
        width: 100%;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .dialog-inner {
        padding: 1.25rem;
    }

    .dialog h2 {
        font-size: 1.4rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
