* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }

/* --- ШАПКА (HERO) --- */
.header-hero {
    width: 100%;
    height: 400px;
    background: url('img/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}
.header-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}
.header-hero h1 {
    font-size: 42px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}
.header-hero p {
    font-size: 20px;
    z-index: 2;
    margin-bottom: 25px;
}
.phone-btn-hero {
    display: inline-block;
    background: #f39c12;
    color: #1a1a1a;
    padding: 12px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    font-size: 18px;
    transition: 0.3s;
    z-index: 2;
}
.phone-btn-hero:hover {
    background: #e67e22;
    transform: scale(1.05);
}

/* --- БЛОК ПОРТФОЛИО (ЦЕНТРИРОВАНИЕ ЧЕРЕЗ PADDING %) --- */
.section-padding { padding: 60px 0; }
.bg-light { background: #f9f9f9; }
h2 { text-align: center; font-size: 32px; margin-bottom: 40px; }

.services-grid {
    display: grid;
    grid-template-columns: 280px 280px 280px; /* Фиксированные 3 колонки */
    gap: 30px;
    max-width: 910px; /* 3 карточки (280+280+280 + 2 зазора по 30) = 900px. Добавляем 10px запаса */
    margin: 0 auto; /* Блок по центру экрана */
    padding: 0 5%; /* Отступы в процентах, чтобы последний ряд был идеально по центру */
}
.service-card { 
    background: white; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    transition: 0.3s; 
    width: 100%;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }

.service-img { height: 200px; background-size: cover; background-position: center; transition: transform 0.4s ease; cursor: pointer; }
.service-card:hover .service-img { transform: scale(1.05); }

.service-card h3 { margin: 15px 15px 10px; text-align: center; }

/* --- ФОРМА ЗАЯВКИ --- */
.request-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.request-form input, .request-form textarea { padding: 15px; border: 1px solid #ddd; border-radius: 5px; width: 100%; font-size: 16px; }
.request-form textarea { height: 100px; resize: vertical; }
.success-box { background: #d4edda; color: #155724; padding: 15px; border-radius: 5px; text-align: center; margin-bottom: 20px; }

.btn-primary { display: inline-block; background: #f39c12; color: #1a1a1a; padding: 15px 30px; text-decoration: none; border: none; font-weight: bold; border-radius: 5px; cursor: pointer; transition: 0.3s; font-size: 16px; }
.btn-primary:hover { background: #e67e22; }

/* --- ПОДВАЛ --- */
.footer { background: #1a1a1a; color: #ccc; text-align: center; padding: 30px 0; }

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 768px) {
    .header-hero h1 { font-size: 28px; }
    .header-hero p { font-size: 16px; }
}

/* ============================================================
   СТИЛИ ДЛЯ СЛАЙДЕРА (НОРМАЛЬНЫЕ РАЗМЕРЫ)
   ============================================================ */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.gallery-overlay.active {
    display: flex;
}
.gallery-overlay img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain; /* Сохраняет пропорции */
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}
.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10001;
    transition: 0.3s;
}
.gallery-close:hover { transform: scale(1.2); }

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    z-index: 10001;
    transition: 0.3s;
}
.gallery-nav:hover { transform: scale(1.2) translateY(-50%); }
.gallery-nav-left { left: 20px; }
.gallery-nav-right { right: 20px; }

.gallery-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background: rgba(0,0,0,0.5);
    padding: 6px 18px;
    border-radius: 30px;
    z-index: 10001;
}