/* ПОДКЛЮЧЕНИЕ ЛОКАЛЬНЫХ ШРИФТОВ NOTO SERIF */
@font-face {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/noto-serif-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Noto Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/noto-serif-400-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/noto-serif-700.woff2') format('woff2');
}

:root {
    --gold: #c9a063;
    --dark: #1a1a1a;
    --paper-bg: rgba(245, 242, 237, 0.94);
}

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

html { 
    background: url("/static/bg_final.png") no-repeat center center fixed; 
    background-size: cover; 
    min-height: 100%; 
}

/* МНОГОУРОВНЕВЫЙ ШРИФТОВОЙ СТЕК */
body {
    background: transparent;
    color: var(--dark);
    font-family: "Noto Serif", "PT Serif", Cambria, Georgia, "Droid Serif", "Times New Roman", serif;
    font-size: clamp(17px, 1.1vw, 22px);
    line-height: 1.4;
    letter-spacing: -0.025em; 
    word-spacing: -0.05em;    
    min-height: 100vh;
}

.main-paper-sheet {
    width: 100%; max-width: 750px; margin: 0 auto;
    background-color: var(--paper-bg);
    padding: 0 45px 140px; box-shadow: 0 0 120px rgba(0,0,0,0.6);
    min-height: 100vh; display: flex; flex-direction: column;
}

/* ЗАГОЛОВКИ (подогнаны размеры, чтобы Поворот исполнения не вылезал) */
.main-title { padding: 3.5vh 0 1.5vh; text-align: center; }
.t-l { 
    display: block; 
    white-space: nowrap; 
    font-weight: bold; 
    line-height: 1.08; 
    font-size: clamp(19px, 6.7vw, 52px); 
    letter-spacing: -0.035em;
}

.hero-subtitle-box { text-align: center; margin-bottom: 3vh; font-size: clamp(18px, 2.3vw, 30px); line-height: 1.3;}
.accent { color: var(--gold); }

.h2-black { font-size: clamp(19px, 1.2vw, 24px); font-weight: bold; margin: 30px 0 10px; }

/* "Звоните..." строго по левому краю в одну строку */
.h3-black-left { 
    font-size: clamp(18px, 1.25vw, 24px); 
    margin-top: 15px; 
    text-align: left; 
    white-space: nowrap; 
}

.justified { text-align: justify; text-justify: inter-word; }
.black-bold { color: var(--dark); font-weight: bold; }

.special-underline-wrap { margin-top: 15px; }
.special-underline-wrap u { text-decoration: underline; text-underline-offset: 3px; }

.inline-list { margin: 15px 0; }
.inline-list p { margin-bottom: 8px; }

.adaptive-spacer { height: 3vh; } 

/* ВЕРХНИЙ БЛОК ЗВОНКА (Кнопка ровно 45% + Номер на той же строке) */
.urgent-call-box {
    margin: 20px 0 15px;
    text-align: left;
}
.urgent-title {
    font-size: clamp(17px, 1.15vw, 22px);
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 8px;
    text-align: left;
}
.urgent-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
}
.urgent-btn-45 {
    flex: 0 0 45% !important;
    max-width: 45% !important;
    height: 50px !important;
    font-size: 1.15rem !important;
}
.urgent-contact-info {
    flex: 1 1 55%;
    font-size: clamp(17px, 1.2vw, 22px);
    color: var(--dark);
    white-space: nowrap;
    text-align: left;
}

/* КНОПКА ЗВОНКА */
.call-unit { flex: 0 0 200px; max-width: 250px; }
.call-btn-pro {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 55px; background: var(--gold); color: #000;
    text-decoration: none; border-radius: 6px; font-weight: bold;
    font-size: 1.2rem; transition: all 0.3s ease; position: relative;
    cursor: pointer; border: none;
}
.call-btn-pro:hover { filter: brightness(1.08); }
.btn-number { display: none; color: #000; }
.call-btn-pro.show-number .btn-label { display: none; }
.call-btn-pro.show-number .btn-number { display: block; }

.hero-divider { border-bottom: 1px solid rgba(0,0,0,0.1); margin: 25px 0; }

/* НИЖНИЙ БЛОК ЗВОНКА И СОЦСЕТЕЙ */
.bottom-call-wrapper { margin: 25px 0 10px; }
.bottom-call-row { display: flex; align-items: center; gap: 20px; }
.bottom-phone-label { font-size: clamp(22px, 1.8vw, 30px); font-weight: bold; color: var(--dark); }

.cta-sub-lead { margin: 20px 0 10px; font-size: 1.1rem; font-weight: bold; }

.social-row-mini-grid { display: flex; gap: 8px; width: 100%; max-width: 400px; }
.mini-card {
    flex: 1; height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    background: #000 !important; border: 1px solid rgba(255,255,255,0.15); padding: 8px; cursor: pointer;
    text-decoration: none;
}
.mini-card img, .mini-card svg { width: 100%; height: 100%; object-fit: contain; }

/* P.S. */
.ps-divider { border: 0; border-top: 1px solid rgba(201, 160, 99, 0.2); margin: 30px 0 5px; }
.ps-text { font-size: clamp(16px, 1.1vw, 20px); color: var(--dark); opacity: 0.75; font-style: italic; line-height: 1.4; }

/* ФУТЕР */
.footer { padding: 30px 0 20px; text-align: center; color: rgba(0,0,0,0.5); font-size: 0.8rem; margin-top: auto; line-height: 1.6; }
.footer-legal-links { margin-top: 15px; display: flex; flex-direction: column; gap: 4px; }
.footer-link { color: inherit; text-decoration: underline; }
.footer-link:visited, .footer-link:hover { color: inherit; }

/* 5 STICKY-ПЛАШЕК: ПРИЖАТЫ К НИЗУ ЭКРАНА (FIXED), УЖАТЫ ПО ВЫСОТЕ, НА ВСЮ ШИРИНУ */
.sticky-banner-container {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    display: flex;
    width: 100vw;
    padding: 6px 10px;
    gap: 6px;
    background: #0f0f0f;
    border-top: 2px solid var(--gold);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
    /* Скрыты изначально, появляются через 5 сек */
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.sticky-banner-container.banner-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sticky-card {
    flex: 1 1 0;
    min-width: 0;
    background: #181818;
    border: 1px solid rgba(201, 160, 99, 0.35);
    border-radius: 6px;
    padding: 6px 8px 16px; /* Максимально сжали по высоте */
    color: #fff;
    font-size: 0.68rem;
    line-height: 1.25;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sticky-card .card-body { margin-bottom: 4px; }
.sticky-card .card-text { color: #f0f0f0; margin-bottom: 2px; }
.sticky-card .card-sub-edition { font-size: 0.62rem; color: #aaa; word-break: break-all; }
.sticky-card .card-actions { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: auto; }

/* Кнопка "Да" и "Понятно" */
.btn-gold-ok {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 4px 12px;
    border-radius: 3px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.72rem;
}

/* Кнопка "Нет" (серый цвет в тон карточки, паддинг как у "Да") */
.btn-decline-adv {
    background: #242424;
    color: #888;
    border: 1px solid #333;
    padding: 4px 12px;
    border-radius: 3px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.72rem;
    transition: all 0.2s ease;
}
.btn-decline-adv:hover {
    color: #ccc;
    background: #2e2e2e;
}

.btn-details {
    color: var(--gold);
    text-decoration: underline;
    font-size: 0.68rem;
}
.btn-details:visited, .btn-details:hover { color: var(--gold); }

/* Крестики в цвет фона карточки */
.banner-close-subtle {
    position: absolute;
    bottom: 2px;
    left: 4px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.05);
    font-size: 11px;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
}
.banner-close-subtle:hover {
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 900px) {
    .sticky-banner-container {
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: thin;
    }
    .sticky-card {
        flex: 0 0 260px;
    }
}

/* МОДАЛЬНОЕ ОКНО ПОЧТЫ */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.modal-overlay[hidden] { display: none; }
.modal-content {
    background: var(--paper-bg); padding: 30px; border-radius: 12px;
    width: 90%; max-width: 350px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 2px solid var(--gold);
}
.modal-title { margin-bottom: 20px; color: var(--dark); font-family: inherit; }
.mail-link {
    display: block; width: 100%; padding: 12px; margin-bottom: 10px;
    background: #fff; color: #000; text-decoration: none; border-radius: 6px;
    font-weight: bold; font-family: sans-serif; font-size: 16px;
    border: 1px solid #ccc;
}
.mail-link:visited { color: #000; }
.mail-link.ya-mail { border-color: #ff0000; border-left: 5px solid #ff0000; }
.mail-link.mailru-mail { border-color: #005ff9; border-left: 5px solid #005ff9; }
.mail-link.gm-mail { border-color: #ea4335; border-left: 5px solid #ea4335; }
.modal-close-btn {
    margin-top: 15px; background: transparent; border: none;
    color: rgba(0,0,0,0.5); cursor: pointer; text-decoration: underline; font-size: 16px;
}

@media (max-width: 650px) {
    .main-paper-sheet { padding: 0 18px 140px; }
    .t-l { font-size: 9.2vw; }
    .urgent-action-row { flex-direction: row; gap: 8px; }
    .urgent-btn-45 { flex: 0 0 45% !important; font-size: 1rem !important; }
    .urgent-contact-info { font-size: 1rem; }
    .h3-black-left { white-space: normal; }
    .bottom-call-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}
