/* Базовые настройки */
:root {
    --primary-color: #ff4757; /* Основной яркий цвет (красный) */
    --accent-color: #ffa502;  /* Акцентный цвет (оранжевый) */
    --text-color: #2f3542;
    --bg-light: #f1f2f6;
    --white: #ffffff;
    --overlay: rgba(0, 0, 0, 0.4); /* Затемнение для фонового изображения */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth; /* Плавная прокрутка к якорям */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav a {
    margin-left: 25px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary-color);
}

/* Главный экран (с фоновым изображением) */

.hero {

    background: linear-gradient(var(--overlay), var(--overlay)), 
                url('img/Laughing_child_202608101235.jpeg') no-repeat center center;
    background-size: cover; 
    background-attachment: fixed; 
    color: var(--white);
    padding: 150px 0;
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Тень для текста */
}

.hero p {
    font-size: 22px;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 18px 35px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #ff6b81;
    transform: translateY(-3px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin: 10px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Секции общие стили */
section {
    padding: 100px 0;
}

h2 {
    text-align: center;
    font-size: 42px;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Галерея Портфолио (CSS Grid) */
.gallery {
    display: grid;
    /* На больших экранах 4 колонки, на планшетах 2 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    background-color: #eee;
    border-radius: 15px;
    overflow: hidden; /* Скрывает все, что выходит за пределы (важно для border-radius на img) */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 300px; /* Фиксированная высота для всех элементов галереи */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* КРИТИЧНО: Картинка заполняет div, сохраняя пропорции и обрезая лишнее */
    display: block;
}

/* Цены */
.prices {
    background-color: var(--bg-light);
}

.price-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.card {
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    width: 350px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.03);
}

.card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card .price {
    font-size: 36px;
    font-weight: bold;
    margin-top: 25px;
    color: var(--text-color);
}

/* Контакты и Подвал */
.contacts {
    text-align: center;
}

.contacts p {
    font-size: 20px;
    margin-bottom: 15px;
}

.contacts a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.social-links {
    margin-top: 30px;
}

.footer {
    background-color: #1e2229;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 30px 0;
    font-size: 14px;
}

/* --- АДАПТИВНОСТЬ (Моб. версия) --- */

@media (max-width: 992px) {
    .hero h1 { font-size: 42px; }
    .hero { padding: 100px 0; background-attachment: scroll; /* Отключаем параллакс */ }
    h2 { font-size: 32px; }
}

@media (max-width: 768px) {
    .header .container { flex-direction: column; text-align: center; }
    .logo { margin-bottom: 10px; }
    .nav a { margin: 0 10px; font-size: 14px; }
    
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 18px; }
    
    /* Делаем галерею в 2 колонки на телефонах */
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .gallery-item { height: 200px; } /* Чуть меньше высота на мобильных */

    .card { width: 100%; padding: 30px; }
}

@media (max-width: 480px) {
    /* На совсем маленьких экранах галерея в одну колонку */
    .gallery { grid-template-columns: 1fr; }
    .hero h1 { font-size: 28px; }
}