/* --- ОБЩИЕ СТИЛИ И ПЕРЕМЕННЫЕ --- */
:root {
    --primary-color: #007bff; /* Яркий акцентный цвет, можно заменить на свой */
    --h3-color: #74abff;
    --text-color: #e5e5e5;
    --background-color: #121212;
    --section-padding: 80px 50px;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    /*background-color: var(--background-color);*/
    scroll-behavior: smooth;
}

h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
}

section {
    padding: var(--section-padding);
    max-width: 1200px;
    margin: 0 auto;
}

/* --- ВИДЕОФОН И ШАПКА --- */
.video-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1; overflow: hidden; filter: brightness(2); background-color: #121212;
}
.video-background video {
    width: 100%; height: 100%; object-fit: cover;
}
.video-background::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7);
}

header {
    display: flex; justify-content: space-between; align-items: center; padding: 20px 50px; position: fixed; width: calc(100% - 100px); top: 0; left: 0; z-index: 100;
}
header .logo { font-size: 24px; font-weight: bold; }
header nav a { color: #fff; text-decoration: none; margin-left: 30px; font-size: 16px; transition: color 0.3s; }
header nav a:hover { color: var(--primary-color); }

/* --- СЕКЦИИ --- */
.hero { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; text-align: center; padding: 0 20px; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 20px; max-width: 800px; }
.hero p { font-size: clamp(18px, 2.5vw, 22px); margin-bottom: 30px; max-width: 600px; color: rgba(255, 255, 255, 0.8); }
.cta-button { background-color: var(--primary-color); color: #fff; padding: 15px 30px; text-decoration: none; border-radius: 16px; font-weight: bold; transition: background-color 0.3s, transform 0.3s; }
.cta-button:hover { background-color: #0056b3; transform: translateY(-3px); }

#about { text-align: center; max-width: 800px; }
#about p { font-size: 18px; line-height: 1.7; }

.plain-text { text-align: left; max-width: 800px; }

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.service-item { 
    background-color: rgba(255, 255, 255, 0.05); 
    padding: 30px; 
    border-radius: 32px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(3px);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.service-item h3 { margin-top: 0; color: var(--h3-color); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.portfolio-item { position: relative; cursor: pointer; overflow: hidden; border-radius: 32px; }
.portfolio-item img { width: 100%; display: block; transition: transform 0.4s ease; }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-item .portfolio-title { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: #fff; font-weight: bold; }

#contact .contacts-wrapper { display: flex; justify-content: center; text-align: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }
#contact .contact-link { color: var(--text-color); text-decoration: none; font-size: 20px; border: 1px solid var(--text-color); padding: 10px 20px; border-radius: 5px; transition: all 0.3s; }
#contact .contact-link:hover { background-color: var(--primary-color); border-color: var(--primary-color); }

/* --- МОДАЛЬНОЕ ОКНО ДЛЯ ВИДЕО --- */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.modal-content { position: relative; margin: auto; padding: 20px; width: 80%; max-width: 900px; top: 50%; transform: translateY(-50%); }
.close-button { color: #fff; position: absolute; top: -20px; right: 0; font-size: 40px; font-weight: bold; cursor: pointer; }
.video-container { position: relative; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */ height: 0; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- Стили для контактной формы --- */
.form-wrapper {
    /* Эффект матового стекла */
    background-color: rgba(35, 35, 45, 0.4); /* Полупрозрачный фон. Можете подобрать цвет. */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Для Safari */

    /* Внешний вид и расположение */
    max-width: 600px; /* Ограничиваем максимальную ширину формы */
    margin: 40px auto 0; /* Центрируем блок по горизонтали */
    padding: 30px; /* Внутренние отступы, чтобы контент не прилипал к краям */
    border-radius: 32px; /* Более скруглённые углы для "стеклянного" вида */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Тонкая светлая рамка */
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Мы убрали отсюда max-width и margin, так как это теперь контролирует .form-wrapper */
}

/* 3. Остальные стили для полей и кнопок остаются почти без изменений */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.contact-subtitle {
    text-align: center;
}

#contact-form input,
#contact-form textarea {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    color: #ffffff;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: none;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

#contact-form button[type="submit"] {
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
    border: none;
    padding: 15px 40px;
    border-radius: 16px; 
    background-color: var(--primary-color);
    color: #fff;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.3s;
}

#contact-form button[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.grecaptcha-badge { 
    visibility: hidden;
}

.recaptcha-notice {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 10px;
}

.recaptcha-notice a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}