/* ============================================================
   MAIN.CSS – общие стили для всех страниц
   ============================================================ */

:root {
    --bg-light: #eef2f6;
    --bg-dark: #0e2942;
    --bg-lighter: #f8fafc;
    --accent-gold: #dcb36b;
    --accent-blue: #72a8d2;
    --text-main: #1e293b;
    --text-light: #ffffff;
    --shadow-premium: 0 12px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 16px 40px rgba(14,41,66,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    background-color: var(--bg-light);
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ============================================================
   ПЛАВАЮЩАЯ КНОПКА ПОДДЕРЖКИ И НАВЕРХ
   ============================================================ */
#back-to-top {
    position: fixed;
    bottom: 105px;
    right: 30px;
    z-index: 9998;
    width: 50px;
    height: 50px;
    background-color: var(--bg-dark);
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    color: var(--accent-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    transform: translateY(-3px) scale(1.05);
}

#back-to-top svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.support-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background-color: var(--bg-dark);
    border-radius: 50%;
    box-shadow: 0 6px 25px rgba(14, 41, 66, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: widget-pulse 2.5s infinite ease-in-out;
    border: 2px solid var(--accent-gold);
}

.support-widget:hover {
    transform: scale(1.15) translateY(-5px);
    background-color: var(--accent-gold);
    border-color: var(--bg-dark);
    box-shadow: 0 12px 40px rgba(220, 179, 107, 0.5);
}

.support-widget:hover svg {
    stroke: var(--bg-dark);
}

.support-widget svg {
    width: 32px;
    height: 32px;
    stroke: var(--accent-gold);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s;
}

@keyframes widget-pulse {
    0% { transform: scale(0.95); box-shadow: 0 6px 25px rgba(14, 41, 66, 0.3); }
    50% { transform: scale(1); box-shadow: 0 6px 35px rgba(14, 41, 66, 0.5); }
    100% { transform: scale(0.95); box-shadow: 0 6px 25px rgba(14, 41, 66, 0.3); }
}

/* ============================================================
   МОДАЛЬНЫЕ ОКНА (ЗАДАЙТЕ ВОПРОС / ОСТАВИТЬ ЗАЯВКУ)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(14, 41, 66, 0.85);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: none !important; /* Принудительно скрываем по умолчанию */
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.modal-overlay.active {
    display: flex !important; /* Показываем только активное окно */
    pointer-events: auto;
    animation: modalOverlayFade 0.3s ease forwards;
}

@keyframes modalOverlayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: #ffffff;
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 92vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.modal-close:hover {
    background: var(--accent-gold);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 18px; 
    height: 18px;
    stroke: var(--bg-dark);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-box h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--bg-dark);
    margin-bottom: 25px;
    letter-spacing: 0.02em;
}

.modal-form .form-group {
    margin-bottom: 15px;
}

.modal-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-main);
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    outline: none;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s;
}

.modal-form input:focus,
.modal-form textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(220, 179, 107, 0.2);
}

.modal-form textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
    padding-right: 4px;
}

.modal-btn {
    width: 100%;
    background-color: var(--accent-gold);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.modal-btn:hover {
    background-color: #cfa150;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 179, 107, 0.4);
}

/* ============================================================
   ПЛАШКА СОГЛАСИЯ 152-ФЗ
   ============================================================ */
.privacy-notice {
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
    margin: 10px 0 12px 0;
    text-align: left;
}

.privacy-notice a {
    color: var(--bg-dark);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.privacy-notice a:hover {
    color: var(--accent-gold);
}

.modal-box .privacy-notice {
    color: #64748b;
    margin-top: 8px;
    margin-bottom: 12px;
}

/* ============================================================
   ВЫДВИЖНАЯ ПЛАШКА COOKIE
   ============================================================ */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 25px;
    left: 20px;
    right: 20px;
    max-width: 520px;
    margin: 0 auto;
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 16px 22px;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(220, 179, 107, 0.4);
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 99999;
}

.cookie-banner.show {
    display: flex;
    animation: cookieFadeIn 0.4s ease forwards;
}

@keyframes cookieFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-text {
    font-size: 13px;
    line-height: 1.45;
    color: #e2e8f0;
}

.cookie-text a {
    color: var(--accent-gold);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-btn {
    background-color: var(--accent-gold);
    color: #1e293b;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cookie-btn:hover {
    background-color: #cfa150;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 179, 107, 0.4);
}

/* ============================================================
   ШАПКА
   ============================================================ */
header {
    background-color: var(--bg-dark);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100000;
}

.header-logo img {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.header-logo img:hover { transform: scale(1.05); }

nav {
    display: flex;
    gap: 40px;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.03em;
    position: relative;
    transition: color 0.3s;
    padding-bottom: 4px;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

nav a:hover {
    color: var(--accent-gold);
}

nav a:hover::after {
    width: 100%;
}

/* ============================================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.breadcrumbs {
    padding: 25px 0 15px;
    font-size: 14px;
    color: #64748b;
}

.breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover { color: var(--bg-dark); }

.breadcrumbs span {
    color: var(--bg-dark);
    font-weight: 500;
}

.breadcrumbs .separator {
    margin: 0 10px;
    color: #cbd5e1;
}

/* ============================================================
   ФУТЕР
   ============================================================ */
footer {
    background-color: #071929;
    color: var(--text-light);
    padding: 60px 0 25px;
    border-top: 3px solid var(--accent-gold);
    position: relative;
}

.footer-main-content {
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: 1.2fr 1.3fr 1.3fr;
    gap: 40px;
    align-items: flex-start;
}

.footer-col-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 15px;
}

.footer-logo {
    display: block;
    margin-bottom: 15px;
}

.footer-logo img {
    height: 75px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.footer-logo img:hover {
    transform: scale(1.03);
}

.footer-col-brand p {
    font-size: 13.5px;
    line-height: 1.6;
    color: #94a3b8;
    max-width: 290px;
    margin: 0;
}

.footer-col:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.footer-col address {
    font-style: normal;
    line-height: 1.5;
    font-size: 13.5px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.footer-col address span {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-col address svg {
    width: 19px;
    height: 19px;
    stroke: var(--accent-gold);
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 2;
    flex-shrink: 0;
}

.footer-contact-item span {
    color: #f1f5f9;
}

.footer-contact-item a {
    color: var(--accent-gold);
    text-decoration: underline;
    font-weight: 500;
    margin-bottom: 0;
}

.footer-col:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
    row-gap: 8px;
    align-content: start;
    padding-right: 30px;
}

.footer-col:last-child h4 {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    margin-top: 0;
    margin-bottom: 12px;
}

.footer-col:last-child a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.4;
    padding: 3px 0;
    transition: all 0.2s ease;
    width: fit-content;
}

.footer-col:last-child a:hover {
    color: var(--accent-gold);
    transform: translateX(4px);
}

.footer-copyright {
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12.5px;
    color: #64748b;
}

.footer-copyright a {
    color: #94a3b8;
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-copyright a:hover {
    color: var(--accent-gold);
}

/* ============================================================
   ОБЩИЕ КНОПКИ
   ============================================================ */
.btn-gold {
    background-color: var(--accent-gold);
    color: #1e293b;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(220, 179, 107, 0.5);
}

.btn-request {
    background-color: var(--accent-gold);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(220, 179, 107, 0.3);
    display: inline-block;
}

.btn-request:hover {
    background-color: #cfa150;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px rgba(220, 179, 107, 0.5);
}

/* Капсульная кнопка "Оставить заявку" */
button.btn-gold,
a.btn-gold,
.open-request-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 34px;
    background-color: #dcb36b;
    color: #1e293b !important;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: none !important;
    outline: none !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 18px rgba(220, 179, 107, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

button.btn-gold:hover,
a.btn-gold:hover,
.open-request-modal:hover {
    background-color: #e5be75;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(220, 179, 107, 0.55);
}

button.btn-gold:active,
a.btn-gold:active,
.open-request-modal:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 179, 107, 0.3);
}

/* ============================================================
   УВЕДОМЛЕНИЕ ОБ УСПЕШНОЙ ОТПРАВКЕ (TOAST) И СПИННЕР
   ============================================================ */
.toast-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #ffffff;
    color: #0e2942;
    padding: 18px 24px;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(14, 41, 66, 0.25);
    border-left: 5px solid #10b981;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 380px;
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.toast-icon {
    width: 38px;
    height: 38px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.toast-content h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0e2942;
    margin: 0 0 3px 0;
}

.toast-content p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(30, 41, 59, 0.3);
    border-top-color: #1e293b;
    border-radius: 50%;
    animation: btnSpin 0.7s infinite linear;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   АДАПТИВНОЕ БУРГЕР-МЕНЮ (ДЛЯ ЭКРАНОВ ДО 768px)
   ============================================================ */
.burger-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 100005;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.burger-line {
    width: 28px;
    height: 3px;
    background-color: var(--accent-gold);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.burger-btn.active .burger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.burger-btn.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-btn.active .burger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1024px) {
    header { padding: 15px 25px; }
    .header-logo img { height: 50px; }
    nav { gap: 20px; }
    nav a { font-size: 14px; white-space: nowrap; }
    .footer-main-content {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }
    .footer-col:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    header {
        position: sticky;
        top: 0;
        z-index: 100000;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 14px 20px;
    }

    .header-logo img { height: 45px; }

    .burger-btn {
        display: flex;
        position: relative;
        z-index: 100005;
        transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .burger-btn.active {
        position: fixed;
        top: 20px;
        right: 20px;
    }

    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #071929;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 85px 25px 35px;
        gap: 16px;
        transition: right 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 100002;
        overflow-y: auto;
    }

    header nav.active {
        right: 0;
    }

    header nav a {
        font-size: 16px;
        font-weight: 500;
        color: #f1f5f9;
        width: 100%;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        text-decoration: none;
        display: block;
        cursor: pointer;
    }

    header nav a:hover {
        color: var(--accent-gold);
        padding-left: 5px;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 99990;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .support-widget { width: 50px; height: 50px; bottom: 15px; right: 15px; }
    .support-widget svg { width: 24px; height: 24px; }
    .modal-box { padding: 25px; }

    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
    .cookie-btn {
        width: 100%;
    }

    .toast-notification {
        top: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .footer-main-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .footer-col:last-child {
        grid-column: span 1;
    }
    .footer-copyright {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .modal-box { padding: 20px 15px; border-radius: 18px; }
    .modal-box h2 { font-size: 22px; }
}