/* --- 1. БАЗОВЫЕ СТИЛИ --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    background: url('../images/intro.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    padding-top: 100px; 
}

/* --- 2. ШАПКА --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 50px; height: 70px; background: white;
    position: fixed; top: 0; width: 100%; z-index: 1000;
}
.logo img { height: 45px; display: block; }
.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a {
    color: #D35400; text-decoration: none; font-size: 13px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; transition: 0.3s;
}
.nav-links a:hover { color: #8ec641; }

/* --- 3. МОБИЛЬНОЕ МЕНЮ --- */
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 6px; }
.hamburger span { width: 28px; height: 3px; background: #D35400; transition: 0.3s; }

@media screen and (max-width: 768px) {
    .navbar { padding: 0 20px !important; }
    .hamburger { display: flex !important; z-index: 1100; }
    .nav-links {
        position: fixed; right: -100%; top: 70px; flex-direction: column;
        background: rgba(45, 55, 40, 0.98); width: 100%; height: calc(100vh - 70px);
        justify-content: flex-start; padding-top: 40px !important;
        transition: 0.4s ease-in-out; list-style: none !important;
    }
    .nav-links.active { right: 0; }
    .nav-links a { color: #fff !important; font-size: 22px; padding: 15px 0; }
    .hamburger.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.is-active span:nth-child(2) { opacity: 0; }
    .hamburger.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

/* --- 4. УСЛУГИ --- */
.services { padding: 100px 20px 60px; background: #fdfdfd; max-width: 1200px; margin: 0 auto; }
.services .section-title { text-align: center; margin-bottom: 50px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card {
    background: #fff; padding: 45px 30px; border-radius: 20px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04); transition: 0.3s; border: 1px solid #f0f0f0;
    display: flex; flex-direction: column; height: 100%;
}
.service-card:hover { transform: translateY(-8px); border-color: #8ec641; }
.service-icon { font-size: 45px; margin-bottom: 25px; height: 60px; }
.service-card h3 { color: #1a3c1a; font-size: 17px; margin-bottom: 15px; font-weight: 700; text-transform: uppercase; }
.service-card p { color: #666; font-size: 14px; line-height: 1.6; }

/* --- 5. ГЛАВНАЯ КАРТОЧКА (HERO) --- */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 120px 20px 60px;
    width: 100%;
}

.card {
    background: #ffffff;
    padding: 45px 35px;
    border-radius: 30px; /* СКРУГЛЯЕМ УГЛЫ КАРТОЧКИ */
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    max-width: 650px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* Чтобы содержимое не ломало углы */
}

card .offer-text {
    text-align: justify;    /* Текст будет ровным по краям */
    line-height: 1.7;       /* Добавим воздуха между строками */
    font-size: 15px;        /* Чуть увеличим для читаемости */
    margin: 20px 0;         /* Отступы сверху и снизу */
    color: #444;            /* Сделаем цвет чуть мягче черного */
}

/* КОНТЕЙНЕР ДЛЯ ФОТО И ЛОГО В РЯД */
.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px; /* Расстояние между фото и логотипом */
    margin-bottom: 25px;
    width: 100%;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* ФОТО СНОВА КРУГЛОЕ */
    overflow: hidden;
    border: 4px solid #fff;
    outline: 2px solid #1a3c1a;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: high-quality; /* Исправляем качество */
}

.card-logo img {
    width: 120px; /* Размер логотипа n. */
    height: auto;
    display: block;
}

.card h1 { 
    font-size: 28px; 
    color: #1a3c1a; 
    margin: 10px 0; 
}

/* Кнопка телефона в карточке */
.card .btn-primary {
    background: #D35400 !important;
    color: white !important;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition: 0.3s;
    margin-top: 15px;
}


/* --- 6. ПОРТФОЛИО --- */
.portfolio { padding: 60px 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; padding: 40px 20px; }
.portfolio-item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: 0.3s; }
.portfolio-item:hover { transform: translateY(-10px); }
.portfolio-image { height: 250px; overflow: hidden; cursor: zoom-in; }
.portfolio-image img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-info { padding: 20px; }
.section-title { text-align: center; font-size: 32px; color: #1a3c1a; text-transform: uppercase; letter-spacing: 2px; }

/* --- 7. ГАЛЕРЕЯ (МОДАЛКА) --- */
.modal {
    display: none; position: fixed; z-index: 2000; padding-top: 60px;
    left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9);
}
.modal-content { margin: auto; display: block; max-width: 90%; max-height: 80vh; border-radius: 10px; animation: zoom 0.3s; }
@keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} }
.close-modal { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; cursor: pointer; }
.prev, .next {
    cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px;
    margin-top: -50px; color: white; font-weight: bold; font-size: 40px;
    transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; text-decoration: none;
}
.next { right: 20px; border-radius: 3px 0 0 3px; }
.prev { left: 20px; }
#caption { margin: auto; display: block; width: 80%; text-align: center; color: #ccc; padding: 10px 0; }

/* --- 8. КОНТАКТЫ (CTA) --- */
.cta-section { 
    background: #f9fbf9; 
    padding: 80px 20px; 
    text-align: center; 
}

.cta-container h2 { 
    color: #1a3c1a; 
    font-size: 32px; 
    margin-bottom: 15px; 
    text-transform: uppercase; 
}

.cta-container p { 
    color: #555; 
    font-size: 18px; 
    margin-bottom: 40px; 
    max-width: 600px; 
    margin: 0 auto; 
}

/* Контейнер для кнопок */
.cta-buttons { 
    display: flex; 
    justify-content: center; 
    align-items: center; /* Выравнивание по одной линии */
    gap: 20px; 
    margin-top: 30px; 
}

/* ОБЩИЙ СТИЛЬ ДЛЯ ОБЕИХ КНОПОК */
.btn-primary, .btn-telegram {
    display: inline-block;
    padding: 18px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 1px;
    transition: 0.3s ease;
    min-width: 220px; /* Чтобы кнопки были одинаковой ширины */
    text-align: center;
}

/* Кнопка Позвонить - ОРАНЖЕВАЯ */
.btn-primary { 
    background: #D35400 !important; 
    color: white !important; 
    border: none;
}

/* Кнопка Telegram - ГОЛУБАЯ */
.btn-telegram { 
    background: #0088cc !important; 
    color: white !important; 
    border: none;
}

.btn-primary:hover, .btn-telegram:hover { 
    transform: scale(1.05); 
    filter: brightness(1.1); 
}

/* Адаптация для iPhone 13 mini */
@media screen and (max-width: 480px) {
    .cta-buttons { 
        flex-direction: column; 
        gap: 15px; 
    }
    .btn-primary, .btn-telegram { 
        width: 100%; 
        min-width: auto; 
    }
}

/* ПРИНУДИТЕЛЬНОЕ РАСШИРЕНИЕ И ВЫРАВНИВАНИЕ КАРТОЧКИ */
.hero .card {
    max-width: 700px !important; /* Увеличиваем ширину (было 480) */
    width: 100% !important;
    padding: 50px 40px !important; /* Добавим немного воздуха внутри */
}

.hero .card .offer-text {
    text-align: justify !important; /* Ровные края текста (по ширине) */
    line-height: 1.8 !important;    /* Увеличиваем межстрочный интервал */
    font-size: 16px !important;     /* Чуть крупнее шрифт */
    margin: 25px 0 !important;      /* Отступы сверху и снизу */
    display: block !important;
}

/* Опускаем карточку чуть ниже от меню, чтобы не прилипала */
.hero {
    padding-top: 140px !important;
    align-items: flex-start !important;
}

/*9. САМОЕ НАЧАЛО */
.welcome-banner {
    height: 70vh; /* Занимает 70% высоты экрана */
    width: 100%;
    /* Используем твое фото intro.jpg с мягким затемнением */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.2)), 
                url('../images/pirn.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding-top: 80px; /* Чтобы текст не уходил под меню */
}

.banner-content h1 {
    font-size: clamp(32px, 5vw, 56px); /* Адаптивный размер заголовка */
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 2px 4px 15px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* --- СТИЛЬНАЯ КНОПКА С ПЛАВНЫМ ХОВЕРОМ --- */
.scroll-down {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #8ec641; /* Твой фирменный зеленый */
    padding: 16px 45px;
    border-radius: 50px;
    background: rgba(142, 198, 65, 0.1); /* Легкий оттенок в покое */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Очень плавный переход */
}

.scroll-down:hover {
    background: #8ec641; /* Полностью закрашивается зеленым */
    color: #fff;
    transform: translateY(-5px) scale(1.05); /* Легкий подъем и увеличение */
    box-shadow: 0 10px 25px rgba(142, 198, 65, 0.4); /* Тень в цвет кнопки */
}

/* Фикс для секции ниже, чтобы она стояла впритык */
.hero {
    padding: 80px 20px !important;
    min-height: auto !important;
}


/* На мобильных уменьшаем текст */
@media (max-width: 768px) {
    .banner-content h1 { font-size: 2rem; }
}
