/* --- Сброс стилей и шрифты --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #fcfbfa;
    color: #2c2c2c;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease-in-out;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.d-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.text-center {
    text-align: center;
}

/* --- Шапка (Header) --- */
.header {
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0 0 0;
}
.logo {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    color: #8b5a2b;
    letter-spacing: 0.5px;
}
.contacts {
    display: flex;
    align-items: center;
    gap: 25px;
}
.contacts .phone {
    font-size: 15px;
    font-weight: 600;
    color: #444444;
    display: block;
}
.contacts .phone:hover {
    color: #e07a5f;
}
.btn-top {
    background-color: #e07a5f;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(224, 122, 95, 0.25);
}
.btn-top:hover {
    background-color: #cf6b50;
    transform: translateY(-1px);
}

/* --- Меню навигации --- */
.sections {
    display: flex;
    gap: 35px;
    margin-top: 15px;
    border-top: 1px solid #f2ede9;
    padding: 14px 20px;
}
.sections a {
    font-size: 15px;
    font-weight: 600;
    color: #666666;
    position: relative;
    padding: 4px 0;
}
.sections a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #8b5a2b;
    transition: all 0.25s ease-in-out;
}
.sections a:hover {
    color: #8b5a2b;
}
.sections a:hover::after {
    width: 100%;
}

/* --- Главный Слайдер (JS) --- */
.main-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #000000;
}
.slider-wrapper {
    position: relative;
    height: 100%;
}
.my-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}
.my-slide.active {
    opacity: 1;
    z-index: 2;
}
.my-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(55%);
}
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    color: #ffffff;
}
.slide-overlay h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.slide-overlay p {
    font-size: 18px;
    max-width: 600px;
    font-weight: 300;
}

/* --- Секция "О нас" на главной --- */
.about-paper-card {
    background: #ffffff;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.02);
}
.main-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c2c2c;
}
.title-underline {
    width: 60px;
    height: 3px;
    background: #8b5a2b;
    margin: 15px auto;
}
.lead-text {
    font-size: 18px;
    color: #555555;
    max-width: 800px;
    margin: 0 auto 40px;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 50px;
}
.img-frame {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}
.exp-box {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #8b5a2b;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.exp-box strong {
    font-size: 28px;
    display: block;
    line-height: 1;
}
.exp-box span {
    font-size: 12px;
    text-transform: uppercase;
}
.features-list {
    list-style: none;
    margin-top: 20px;
}
.features-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}
.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #e07a5f;
    font-weight: 700;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px solid #f2ede9;
    padding-top: 40px;
}
.stat-card .stat-num {
    font-size: 40px;
    font-weight: 800;
    color: #e07a5f;
}

/* --- Форма обратной связи (Callback) --- */
.callback-section {
    background: #2c2520;
    padding: 50px 0;
    color: #ffffff;
}
.form-card {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}
.form-card h2 {
    font-size: 26px;
    margin-bottom: 6px;
}
.form-card p {
    color: #bbbbbb;
    margin-bottom: 20px;
}
.form-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.form-card input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #444444;
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    font-size: 15px;
    outline: none;
}
.form-card input::placeholder {
    color: #888888;
}
.form-card input:focus {
    border-color: #e07a5f;
    background: rgba(255,255,255,0.1);
}
.btn-submit {
    background: #e07a5f;
    color: #ffffff;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}
.btn-submit:hover {
    background: #cf6b50;
}

/* --- Подвал (Footer) --- */
.footer {
    background: #1e1916;
    padding: 30px 0;
    color: #777777;
    font-size: 14px;
}
.footer-divider {
    border: 0;
    border-top: 1px solid #2c2520;
    margin-bottom: 20px;
}

/* --- Адаптивность для базовых элементов --- */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .slide-overlay h2 { font-size: 32px; }
}
@media (max-width: 768px) {
    .d-flex { flex-direction: column; gap: 15px; text-align: center; }
    .contacts { flex-direction: column; gap: 10px; width: 100%; }
    .btn-top { width: 100%; text-align: center; }
    .sections { justify-content: center; gap: 15px; flex-wrap: wrap; }
    .main-slider { height: 350px; }
    .slide-overlay h2 { font-size: 26px; }
    .stats-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .about-paper-card { padding: 25px; }
}

/* Специальные стили для горизонтального режима (landscape) на мобильных телефонах */
@media screen and (max-height: 500px) and (orientation: landscape) {
    
    /* 1. Уменьшаем общую высоту шапки за счет отступов */
    .header {
        padding: 5px 0 !important;
        position: static !important; /* Убираем фиксацию сверху, чтобы шапка уплывала при скролле */
    }

    /* 2. Выстраиваем Логотип и Контакты в одну горизонтальную линию */
    .header .container.d-flex {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 5px !important;
    }

    /* 3. Делаем название компании компактнее */
    .header .logo {
        font-size: 16px !important;
        margin: 0 !important;
    }

    /* 4. Телефоны и кнопку выстраиваем в одну строчку рядом */
    .header .contacts {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        margin: 0 !important;
    }

    /* 5. Уменьшаем размер шрифта у номеров */
    .header .contacts .phone {
        font-size: 13px !important;
        margin: 0 !important;
        white-space: nowrap; /* Запрещаем номерам рваться на две строки */
    }

    /* 6. Делаем кнопку консультации маленькой */
    .header .btn-top {
        padding: 4px 10px !important;
        font-size: 11px !important;
        margin: 0 !important;
        white-space: nowrap;
    }

    /* 7. Ссылки меню (Главная, Услуги...) выстраиваем в плотную горизонтальную линию */
    .header .sections {
        display: flex !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-top: 2px !important;
        padding-top: 4px !important;
        border-top: 1px solid rgba(0,0,0,0.08); /* Тонкая разделительная черта */
    }

    .header .sections a {
        font-size: 12px !important;
        padding: 0 5px !important;
    }
}