/* ========================================
   БАЗОВЫЕ СТИЛИ + ПРИЖАТЫЙ ПОДВАЛ
   ======================================== */

   html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #2c3e50;
}

/* ========================================
   ШАПКА (HEADER)
   ======================================== */
header {
    background: #1A2A3A;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 3px solid #5D6D7E;
    flex-shrink: 0;
}

header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

header a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

header a:hover {
    color: #a0b0c0;
    text-decoration: underline;
}

/* ========================================
   НАВИГАЦИЯ
   ======================================== */
nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

nav a:hover {
    color: #a0b0c0;
    text-decoration: underline;
}

nav form {
    display: inline;
    margin: 0;
}

nav form button {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    padding: 0;
    text-decoration: none;
    transition: color 0.3s;
}

nav form button:hover {
    color: #a0b0c0;
    text-decoration: underline;
}

/* ========================================
   КОНТЕЙНЕР (растягивается, прижимая футер)
   ======================================== */
.container {
    flex: 1;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ========================================
   ГЕРОЙ-БЛОК (Hero)
   ======================================== */
.hero {
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(26, 42, 58, 0.08);
    text-align: center;
    border-left: 5px solid #5D6D7E;
}

.hero h1 {
    color: #1A2A3A;
    font-weight: 600;
    margin-top: 0;
}

/* ========================================
   КНОПКИ
   ======================================== */
.btn {
    display: inline-block;
    background: #5D6D7E;
    color: #ffffff;
    padding: 12px 35px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #85929E;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* ========================================
   СЕТКА УСЛУГ
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* ========================================
   ПРОЕКТЫ
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card-link:hover {
    text-decoration: none;
}

.project-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-bottom: 3px solid #5D6D7E;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.project-card .project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 15px 15px 0 15px;
    margin: 0;
    font-size: 18px;
    color: #1A2A3A;
}

.project-card p {
    padding: 10px 15px;
    margin: 0;
    flex-grow: 1;
    color: #555;
}

/* ========================================
   КАРТОЧКА УСЛУГИ
   ======================================== */
.service-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(26, 42, 58, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-bottom: 3px solid #5D6D7E;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(26, 42, 58, 0.15);
}

.service-card .service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e9ecef;
}

.service-card h3 {
    padding: 15px 15px 0 15px;
    margin: 0;
    font-size: 18px;
    color: #1A2A3A;
}

.service-card p {
    padding: 10px 15px;
    margin: 0;
    flex-grow: 1;
    color: #4a5b6e;
    line-height: 1.5;
}

.service-card .price {
    font-weight: 700;
    color: #5D6D7E;
    padding: 0 15px 15px 15px;
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ========================================
   ПОДВАЛ (FOOTER) — ПРИЖАТ К НИЗУ
   ======================================== */
footer {
    flex-shrink: 0;
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    border-top: 1px solid #d5dbe0;
    background: #ffffff;
    margin-top: 0;
}

/* ========================================
   ФОРМЫ
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1A2A3A;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #5D6D7E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 109, 126, 0.2);
}

.helptext {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.errorlist {
    color: #a93226;
    font-size: 14px;
    list-style: none;
    padding: 0;
}

.messages {
    text-align: center;
    padding: 10px 15px;
    background: #d5e8d5;
    border-radius: 5px;
    margin-bottom: 20px;
    color: #1e5e1e;
    border-left: 4px solid #2e8b57;
}

.login-link {
    text-align: center;
    margin-top: 20px;
}

/* ========================================
   ССЫЛКИ (общий стиль)
   ======================================== */
a {
    color: #5D6D7E;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5D6D7E;
    transition: width 0.3s;
}

a:hover {
    color: #1A2A3A;
}

a:hover::after {
    width: 100%;
}

/* ========================================
   СТРАНИЦА КОНТАКТОВ
   ======================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px auto;
    max-width: 1100px;
}

.contact-info {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-info h3 {
    color: #1a3e60;
    margin-top: 0;
}

.contact-info p {
    margin: 10px 0;
}

.contact-info .icon {
    font-weight: bold;
    color: #1a3e60;
    display: inline-block;
    width: 80px;
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-form h2 {
    text-align: center;
    color: #1a3e60;
    margin-bottom: 30px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    border-color: #1a3e60;
    outline: none;
}

.contact-form .btn {
    width: 100%;
    padding: 12px;
    background: #1a3e60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.contact-form .btn:hover {
    background: #2a5e80;
}

.map-container {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

/* ========================================
   СТРАНИЦА ПРОЕКТА
   ======================================== */
.project-hero {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px;
    background: linear-gradient(transparent, rgba(26,42,58,0.85));
    color: white;
}

.project-hero .overlay h1 {
    margin: 0;
    font-size: 32px;
    color: white;
}

.project-hero .overlay p {
    margin: 5px 0 0 0;
    font-size: 18px;
    opacity: 0.9;
}

.project-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.project-content .back-link {
    display: inline-block;
    margin-top: 20px;
    background: #6c757d;
    color: white;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
}

.project-content .back-link:hover {
    background: #5a6268;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.project-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* ========================================
   СТРАНИЦА УСЛУГИ
   ======================================== */
.service-hero {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.service-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-hero .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px;
    background: linear-gradient(transparent, rgba(26,42,58,0.85));
    color: white;
}

.service-hero .overlay h1 {
    margin: 0;
    font-size: 32px;
    color: white;
}

.service-hero .overlay p {
    margin: 5px 0 0 0;
    font-size: 18px;
    opacity: 0.9;
}

.service-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.service-content .price {
    font-size: 24px;
    font-weight: 700;
    color: #068117;
    margin-top: 15px;
}

.service-content .back-link {
    display: inline-block;
    margin-top: 20px;
    background: #6c757d;
    color: white;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
}

.service-content .back-link:hover {
    background: #5a6268;
}

.service-content .order-btn {
    display: inline-block;
    margin-top: 20px;
    margin-left: 10px;
    background: #1b36d3ab;
    color: white;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
}

.service-content .order-btn:hover {
    background: #42bb298f;
}

/* ========================================
   СТРАНИЦА УСПЕШНОЙ ЗАЯВКИ
   ======================================== */
.success-box {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.success-box h2 {
    color: #1a3e60;
}

/* ========================================
   СТРАНИЦА ОШИБКИ 404
   ======================================== */
   .error-page {
    max-width: 600px;
    margin: 60px auto;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(26, 42, 58, 0.08);
    text-align: center;
    border-left: 5px solid #5D6D7E;
}

.error-page .error-code {
    font-size: 96px;
    font-weight: 700;
    color: #5D6D7E;
    margin: 0 0 10px 0;
    line-height: 1;
}

.error-page h2 {
    color: #1A2A3A;
    font-size: 24px;
    margin: 0 0 15px 0;
}

.error-page p {
    color: #4a5b6e;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 30px 0;
}



/* ========================================
   АДАПТИВНОСТЬ (МЕДИА-ЗАПРОСЫ)
   ======================================== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .hero {
        padding: 30px 20px;
    }

    .project-card .project-image,
    .service-card .service-image {
        height: 160px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hero {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 20px;
    }

    .btn {
        padding: 10px 25px;
        font-size: 14px;
    }

    .project-card h3,
    .service-card h3 {
        font-size: 16px;
        padding: 12px 12px 0 12px;
    }

    .project-card p,
    .service-card p {
        padding: 8px 12px;
        font-size: 14px;
    }

    .project-card .project-image,
    .service-card .service-image {
        height: 140px;
    }

    .container {
        padding: 0 12px;
        margin: 15px auto;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    
        .error-page {
            padding: 40px 20px;
            margin: 30px auto;
        }
        .error-page .error-code {
            font-size: 72px;
        }
        .error-page h2 {
            font-size: 20px;
        }
    
}