/* Modern Reset & Variables */
:root {
    --primary-color: #2D3748;
    --accent-color: #4A5568;
    --bg-color: #F7FAFC;
    --white: #FFFFFF;
    --text-main: #1A202C;
    --text-secondary: #718096;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --header-height: 80px;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/chat-fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Montserrat';
    src: url('/chat-fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-img {
    height: 40px;
    width: auto;
}

.company-name {
    font-weight: 700;
    font-size: 1.2rem;
    display: none;
}

.contacts-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9rem;
}

.phone-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.address-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 30px;
}

.hero-section {
    text-align: center;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #2D3748 0%, #4A5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Chat Widget Container */
.chat-wrapper {
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    height: auto;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: visible;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
}

chat-widget {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    height: auto;
}

/* Footer */
footer {
    background-color: var(--white);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 30px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.popup-overlay.active {
    display: flex;
}

.popup-box {
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.popup-close:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-main);
}

.popup-box h2 {
    font-size: 1.5rem;
    margin: 0 0 20px;
    padding-right: 30px;
}

.popup-box p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    margin: 0 0 14px;
}

.popup-box ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.popup-box li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
}

/* Cookies banner */
.cookies-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 9998;
    padding: 16px 20px;
    display: none;
}

.cookies-banner.visible {
    display: block;
}

.cookies-banner__wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookies-banner__text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookies-banner__text a {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

.cookies-banner__accept {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.cookies-banner__accept:hover {
    background: var(--accent-color);
}

/* Responsive */
@media (min-width: 768px) {
    .company-name {
        display: block;
    }

    .contacts-area {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .phone-link {
        margin-bottom: 0;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .chat-wrapper {
        height: 70vh;
        border-radius: 8px;
    }

    main {
        padding: 20px 10px;
    }

    .cookies-banner__wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
