@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;500;600;700&display=swap');

@font-face {
    font-family: "TT Norms";
    src: url("/assets/fonts/TTNorms-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Involve";
    src: url("/assets/fonts/Involve-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Involve";
    src: url("/assets/fonts/Involve-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Involve";
    src: url("/assets/fonts/Involve-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Involve";
    src: url("/assets/fonts/Involve-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

:root {
    --left-bg: linear-gradient(94.53deg, #006164 0%, #2D999C 99.8%);
    --text-white: #ffffff;
    --text-dark: #292d32;
}

* {
    box-sizing: border-box;
}

img {
    object-fit: contain;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Involve", sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* --- ОБЩИЕ СТИЛИ СТРАНИЦ ПРИ ПЕЧАТИ --- */
.print-page {
    width: 297mm;
    height: 210mm;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    page-break-after: always;
}

/* --- СТИЛИ TITLE PAGE --- */
.page {
    width: 100%;
    height: 100%;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    display: grid;
    grid-template-columns: calc(38.82% - 3.75px) calc(61.18% - 3.75px);
    gap: 7.5px;
    width: 100%;
    height: 100%;
    font-family: "Involve", sans-serif;
}

.panel-left {
    height: 100%;
    border-radius: 30px;
    background: var(--left-bg);
    padding: 40px;
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pill {
    display: inline-flex;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.title {
    font-size: clamp(30px, 5.4vw, 60px);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 30px;
    line-height: 1;
    letter-spacing: -0.01em;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 25px;
}

.profile-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-color: #eee;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    flex-shrink: 0;
    margin-bottom: 15px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-name {
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.1;
}

.profile-role {
    font-size: 16px;
    font-weight: 400;
    color: white;
    opacity: 0.5;
    text-transform: uppercase;
}

.profile-phone {
    font-size: 24px;
    margin-top: 30px;
    font-weight: 500;
}

.panel-right {
    position: relative;
    height: 100%;
}

.photo {
    height: 100%;
    background: url("/assets/bg.jpg") bottom/contain no-repeat;
    border-radius: 30px;
}

.logo {
    position: absolute;
    top: 47px;
    right: 40px;
    width: 175px;
    height: 44px;
    background: url("/assets/logo.jpg") center/contain no-repeat;
}

.contact-top {
    position: absolute;
    top: 119px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.contact-top .item {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
}

/* --- СТИЛИ LAST PAGE --- */
.card.last-page {
    grid-template-columns: 61.18% 1fr; /* 1fr автоматически учитывает gap 8.5px */
    padding: 35px;
    gap: 8.5px;
    background: #ffffff;
    height: 100%;
    box-sizing: border-box;
    font-family: "Involve", sans-serif;
}

.col-left {
    display: grid;
    grid-template-columns: 49% 1fr; /* 1fr автоматически учитывает gap 8.5px */
    grid-template-rows: 1fr 200px; /* Фиксированная высота для блока технологий */
    height: 100%;
    gap: 8.5px;
}

.top-row {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Распределяет лого/контакты вверх, надежность вниз */
    height: 100%;
    position: relative;
    z-index: 1000;
}

.logo-img-last {
    width: 372px;
    height: 87px;
    background: url("/assets/logo.jpg") left center/contain no-repeat;
    max-width: 100%;
}

.contacts-block-last {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 50px;
}

.phone-last {
    font-family: "Involve", sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #292D32;
    text-transform: uppercase;
    line-height: 1;
}

.email-last {
    font-family: "Involve", sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #292D32;
    white-space: nowrap;
    text-transform: uppercase;
    line-height: 1.3;
}

.mid-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: auto;
    position: relative;
}

.reliability-box {
    width: 100%;
    background: rgba(217, 217, 217, 0.4);
    border-radius: 25px;
    padding: 30px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.reliability-title {
    font-family: "Involve", sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: #292D32;
    text-transform: uppercase;
    margin-bottom: 12px;
    line-height: 1.2;
}

.reliability-text {
    font-family: "TT Norms", sans-serif;
    font-weight: 400;
    font-size: 16px;
    margin: 0;
    line-height: 1.2;
    color: #292D32;
    opacity: 0.7;
}

.building-photo {
    width: 100%;
    height: 100%;
    background: url("/assets/last_page/1_group.jpg") center bottom no-repeat;
    background-size: contain; /* Или contain, если нужно видеть все здание */
    border-radius: 25px;
}

.tech-bg-last {
    grid-column: span 2;
    height: 100%; /* Занимает всю высоту строки грида (240px) */
    background: linear-gradient(94.53deg, #006164 0%, #2D999C 99.8%);
    border-radius: 25px;
    display: flex;
    padding: 42px 30px;
    position: relative;
    z-index: 2;
    justify-content: space-between;
}

.tech-title-last {
    font-family: "Involve", sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: #ffffff;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1.1; /* Сделал плотнее как в макете */
    white-space: pre-line;
}

.tech-text-last {
    max-width: 290px;
    font-family: "TT Norms", sans-serif;
    font-size: 20px;
    color: #ffffff;
    opacity: 0.8;
    margin: 0;
    line-height: 1.1; /* Сделал плотнее как в макете */
}

.col-right {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 40px;
    justify-content: end;
    min-width: 0;
}

.family-group {
    width: 100%;
    height: 56.5%; /* Высота в процентах для правой колонки */
    border-radius: 25px;
    overflow: hidden;
    background: url("/assets/last_page/people.jpg") center top/contain no-repeat;
    position: relative;
}

.family-content {
    position: absolute;
    left: 30px;
    bottom: 30px;
}

.family-num {
    font-family: "Involve", sans-serif; /* Исправлено: Involve для соответствия макету */
    font-weight: 500;
    font-size: 68px;
    color: #ffffff;
    line-height: 1;
    display: block;
}

.family-desc {
    font-family: "Involve", sans-serif;
    font-size: 20px;
    color: #ffffff;
    line-height: 1.2;
    margin-top: 15px;
    display: block;
}

.stats-container {
    position: relative;
    padding-left: 5%;
}

.svg-line {
    position: absolute;
    left: 95px;
    top: 0;
    width: 140px;
    height: 239px;
    z-index: 1;
}

.stat-item {
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 43px;
}

.stat-num-last {
    font-family: "Unbounded", sans-serif;
    font-size: 110px;
    color: #1C1D21;
    line-height: 1;
    font-weight: 500;
}

.stat-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 15px;
}

.stat-unit-last {
    font-family: "Involve", sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #1C1D21;
    text-transform: uppercase;
    line-height: 1.3;
}

.stat-desc-last {
    font-family: "Involve", sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: rgba(41, 45, 50, 0.5);
    line-height: 1.3;
    width: 220px;
    display: block;
    margin-top: 5px;
}

.stat-item.last {
    margin-bottom: 0;
}

.stat-item.last .stat-num-last {
    font-size: 100px;
}

.stat-item.last .stat-details {
    padding-top: 10px;
}