/* --- Переменные и сброс --- */
:root {
    --bg-beige: #F9F8F4;        
    --billiard-green: #1E5638;
    --billiard-dark: #143d28;
    --gold: #D4AF37;            
    --text-dark: #111111;
    --text-gray: #555555;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-beige); 
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 30px; }

/* --- Хедер --- */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%; z-index: 1000;
    background-color: rgba(30, 86, 56, 0.98);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container { display: flex; justify-content: space-between; align-items: center; }

.logo-area { display: flex; align-items: center; gap: 15px; }
.logo-circle {
    background: white; border-radius: 50%; 
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center; padding: 4px;
}
.logo-img { height: 50px; width: auto; }
.brand { font-weight: 700; font-size: 24px; color: var(--white); }

/* Навигация */
.nav-list { display: flex; gap: 25px; }
/* Увеличиваем размер шрифта меню (было 11px, стало 14px) */
.nav-link { 
    font-size: 14px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: rgba(255, 255, 255, 0.9); 
}
.nav-link:hover, .nav-link.active { color: var(--gold); }

.nav-item { position: relative; }
.dropdown {
    position: absolute; top: 100%; left: 0;
    background: var(--white); min-width: 240px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-radius: 8px; padding: 10px 0;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: var(--transition);
}
.dropdown li a { display: block; padding: 10px 25px; color: var(--text-dark); font-weight: 600; font-size: 14px; }
.dropdown li a:hover { background: var(--bg-beige); color: var(--billiard-green); }
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

/* Правая часть хедера */
.header-right { display: flex; align-items: center; gap: 20px; }
.phone { color: var(--white); font-weight: 700; font-size: 15px; }
.header-buttons { display: flex; gap: 10px; }

.mobile-only { display: none; }

.btn-outline {
    padding: 8px 18px; border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white); border-radius: 50px; font-weight: 700; font-size: 10px;
    text-transform: uppercase;
}
.btn-outline:hover { background: var(--white); color: var(--billiard-green); }

/* Бургер-меню */
.burger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.burger span { display: block; width: 25px; height: 2px; background: var(--white); transition: var(--transition); }

/* --- Универсальные Hero-секции --- */
.hero {
    position: relative; 
    height: 100vh; 
    min-height: 600px;
    display: flex; 
    align-items: center; 
    padding-top: 120px; /* Этот отступ не дает баннеру залезть под хедер */
}

.hero .container {
    width: 100%;
    /* Мы убрали display: flex и жесткие отступы, 
       теперь он подчиняется общим правилам класса .container (как и шапка) */
}

.hero-bg-index { background: linear-gradient(to right, #F9F8F4 0%, rgba(249, 248, 244, 0.9) 40%, transparent 100%), url('hero-bg.webp') right center/cover no-repeat; background-attachment: fixed; }
.hero-bg-business { background: linear-gradient(to right, #F9F8F4 0%, rgba(249, 248, 244, 0.9) 40%, transparent 100%), url('business-bg.webp') right bottom/contain no-repeat; background-attachment: fixed; }

.hero-content { 
    max-width: 550px; /* Было 700px. Сужаем блок, чтобы текст собрался в компактный столбик */
    z-index: 2; 
    text-align: left; 
    margin-top: -80px; /* Сдвигаем весь блок с текстом и кнопкой повыше */
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; color: var(--billiard-green); margin-bottom: 25px; }
.hero .subtitle { 
    font-size: clamp(16px, 1.5vw, 20px); 
    color: #333; 
    margin-bottom: 40px;
    border-left: 4px solid var(--billiard-green); 
    padding-left: 20px;
    line-height: 1.5; /* Добавит "воздуха" между двумя строками текста */
}

/* Кнопки */
.btn-main {
    display: inline-block; 
    padding: 18px 45px; 
    background: var(--billiard-green);
    color: var(--white); 
    border-radius: 4px; 
    font-weight: 700; 
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(30, 86, 56, 0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-main:hover { 
    background: var(--gold); /* Золотой фон при наведении */
    color: var(--text-dark);  /* Темный текст для контраста */
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* --- Секции и Карточки --- */
.section { padding: 100px 0; }
.section-title { text-align: center; font-size: 36px; color: var(--billiard-green); margin-bottom: 50px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card {
    background: var(--white); padding: 40px; border-radius: 12px;
    border-top: 4px solid var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.card h3 { margin-bottom: 15px; font-size: 22px; }
.card p { font-size: 15px; color: var(--text-gray); }

/* --- Документы (About Page) --- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.doc-card {
    background: #fff; padding: 25px; border-radius: 8px; border: 1px solid #e0e0e0;
    display: flex; align-items: center; gap: 20px;
}
.doc-card:hover { border-color: var(--gold); }
.doc-icon { font-size: 32px; }

/* --- CTA Секция --- */
.cta { background: var(--billiard-green); color: var(--white); padding: 60px 0; }
.cta-flex { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.btn-white {
    padding: 18px 35px; background: var(--white); color: var(--billiard-green);
    border-radius: 50px; font-weight: 800; text-transform: uppercase;
}

/* --- Футер --- */
.footer { background: #111; color: #888; padding: 80px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer h4 { color: var(--white); margin-bottom: 20px; font-family: 'Manrope', sans-serif; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; }
.footer p, .footer li { font-size: 13px; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid #222; padding-top: 30px; text-align: center; font-size: 12px; }

/* --- Модальное окно --- */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
}

.modal-content {
    background: var(--white); padding: 40px; border-radius: 12px;
    width: 90%; max-width: 500px; position: relative;
    border-top: 5px solid var(--gold);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.close-btn {
    position: absolute; top: 15px; right: 20px;
    font-size: 28px; font-weight: bold; color: #999; cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover { color: var(--billiard-green); }

.modal-input {
    width: 100%; padding: 15px; margin-bottom: 15px;
    border: 1px solid #ddd; border-radius: 8px;
    font-family: 'Manrope', sans-serif; font-size: 15px;
}

.modal-input:focus { outline: none; border-color: var(--billiard-green); }

/* Стили для файлов и кнопки очистки */
.file-list-container { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.file-item { display: flex; justify-content: space-between; align-items: center; background: #f1f1f1; padding: 8px 12px; border-radius: 6px; font-size: 12px; color: #555; }
.file-remove { color: #d9534f; cursor: pointer; font-weight: bold; font-size: 16px; transition: 0.3s; }
.file-remove:hover { color: #c9302c; transform: scale(1.1); }
.btn-reset { padding: 18px 25px; background: #eee; color: var(--text-gray); border: none; border-radius: 4px; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: var(--transition); }
.btn-reset:hover { background: #ddd; color: var(--text-dark); }

/* --- Стили для слайдера на главном баннере --- */
.hero-slider {
    display: grid; /* Создаем сетку, чтобы слайды могли накладываться друг на друга */
    width: 100%;
}

.slide {
    grid-area: 1 / 1; /* Заставляем все слайды занимать одно и то же место */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px); /* Слегка опускаем неактивный слайд */
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Очень плавная кривая анимации */
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 2;
    transition-delay: 0.1s; /* Легкая задержка, чтобы старый текст успел начать растворяться */
}

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.slider-dots {
    display: flex;
    gap: 10px;
    margin-top: 40px;
    position: relative;
    z-index: 5; /* Чтобы точки всегда были кликабельны поверх слайдов */
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(30, 86, 56, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active, .dot:hover {
    background-color: var(--billiard-green);
    transform: scale(1.2);
}

/* Секция философии под баннером */
.philosophy-banner-section {
    background: var(--white);
    padding: 80px 0 40px;
    border-bottom: 1px solid #eaeaea;
}

.philosophy-banner-box {
    max-width: 100%; /* Убрали жесткое ограничение, теперь блок займет всю ширину внутри контейнера */
    margin: 0 auto;
    text-align: center;
    padding: 60px 80px; /* Добавили чуть больше пространства сверху и снизу */
    background: var(--bg-beige);
    border-radius: 12px;
    border-top: 4px solid var(--gold);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .philosophy-banner-box {
        padding: 30px 20px;
    }
}

/* --- Адаптивность --- */
@media (max-width: 1100px) {
    .header-right .phone { display: none; }
}

@media (max-width: 992px) {
    .nav {
        position: fixed; top: 0; right: -100%; width: 300px; height: 100vh;
        background: var(--white); padding: 100px 40px; z-index: 999;
        transition: 0.5s ease; box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    .nav.active { right: 0; }
    .nav-list { flex-direction: column; gap: 20px; }
    .nav-link { color: var(--text-dark); font-size: 16px; }
    .header-buttons { display: none !important; }
    .mobile-only { display: block; }
    .burger { display: flex; z-index: 1001; }
    .burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--text-dark); }
    .burger.active span:nth-child(2) { opacity: 0; }
    .burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--text-dark); }
    
    .hero { background-attachment: scroll; text-align: center; }
    .hero .subtitle { border-left: none; border-top: 3px solid var(--billiard-green); padding: 20px 0 0 0; }
    .cta-flex { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    /* Исправление выпадающего меню для мобильных телефонов */
    .nav-item { width: 100%; }
    
    .dropdown {
        position: static; /* Отключаем абсолютное позиционирование */
        box-shadow: none;
        background: transparent;
        padding: 5px 0 5px 20px; /* Делаем отступ слева, чтобы было видно вложенность */
        margin-top: 10px;
        transform: translateY(0);
        display: none; /* Скрываем меню полностью */
        opacity: 1;
        visibility: visible;
        border-left: 2px solid var(--gold); /* Добавляем красивую линию слева для подменю */
    }
    
    /* При наведении (или клике на телефоне) меню раскрывается и сдвигает соседей */
    .nav-item:hover .dropdown, 
    .nav-item:active .dropdown { 
        display: block; 
    }

    /* Немного уменьшаем шрифт подменю на мобильном, чтобы отличалось от главных пунктов */
    .dropdown li a {
        padding: 8px 15px;
        font-size: 14px;
        color: var(--text-gray);
    }
}