/* --- СБРОС И ОСНОВЫ --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Roboto', sans-serif; background-color: #ffffff; color: #1e3a5f; line-height: 1.6; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* === ВЕРХНЯЯ ПОЛОСА === */
.top-bar { position: fixed; top: 0; left: 0; width: 100%; background-color: #1e3a5f; color: #ffffff; z-index: 10000; padding: 10px 0; font-size: 15px; }
.top-bar-container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-text { color: #e2e8f0; margin-right: 5px; font-size: 15px; font-weight: 500; }
.msg-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; transition: transform 0.2s, opacity 0.2s; }
.msg-icon:hover { transform: scale(1.1); opacity: 0.9; }
.msg-icon svg { width: 100%; height: 100%; }
.max-icon { color: #8b5cf6; }
.vk-icon { color: #0077FF; }
.tg-icon { color: #0088cc; }
.wa-icon { color: #25D366; }
.top-bar-btn { background-color: #4a90e2; color: #ffffff; text-decoration: none; padding: 8px 24px; border-radius: 20px; font-weight: 600; font-size: 15px; transition: background-color 0.3s; }
.top-bar-btn:hover { background-color: #357abd; }

/* --- ХЕДЕР --- */
header { background-color: #ffffff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); position: fixed; top: 48px; left: 0; width: 100%; z-index: 9999; height: 100px; display: flex; align-items: center; }
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { height: 70px; width: auto; }
header nav ul { list-style: none; display: flex; gap: 25px; }
header nav ul li a { text-decoration: none; color: #1e3a5f; font-weight: 600; font-size: 16px; transition: color 0.3s; }
header nav ul li a:hover { color: #4a90e2; }
.header-contacts { text-align: right; font-size: 15px; }
.header-contacts a { color: #4a90e2; text-decoration: none; font-weight: 500; }

/* --- БУРГЕР-МЕНЮ --- */
.burger-menu { display: none; flex-direction: column; justify-content: space-around; width: 35px; height: 28px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 10000; }
.burger-line { width: 100%; height: 4px; background-color: #1e3a5f; border-radius: 10px; transition: all 0.3s linear; position: relative; transform-origin: 1px; }
.burger-menu.active .burger-line:nth-child(1) { transform: rotate(45deg); }
.burger-menu.active .burger-line:nth-child(2) { opacity: 0; transform: translateX(20px); }
.burger-menu.active .burger-line:nth-child(3) { transform: rotate(-45deg); }

/* --- СЕКЦИИ --- */
section { position: relative; z-index: 1; padding: 80px 0; scroll-margin-top: 160px; }
section h2 { font-size: 36px; text-align: center; color: #1e3a5f; margin-bottom: 15px; }
section > .container > p { text-align: center; color: #4a5568; margin-bottom: 50px; font-size: 18px; }

/* --- HERO --- */
#hero { background-image: linear-gradient(rgba(30, 58, 95, 0.8), rgba(30, 58, 95, 0.8)), url('hero-bg.jpg'); background-size: cover; background-position: center center; background-repeat: no-repeat; text-align: center; padding: 160px 0 100px 0; margin-top: 148px; }
#hero h1 { font-size: 42px; color: #ffffff; margin-bottom: 20px; font-weight: 800; }
#hero p { font-size: 18px; color: #e2e8f0; margin-bottom: 20px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero-buttons { margin-top: 30px; display: flex; justify-content: center; gap: 15px; }
.hero-buttons .button { background-color: #4a90e2; color: #ffffff; text-decoration: none; padding: 15px 30px; border-radius: 8px; font-size: 18px; font-weight: bold; transition: 0.2s; border: 2px solid transparent; }
.hero-buttons .button:hover { background-color: #357abd; transform: translateY(-2px); }

/* --- УСЛУГИ (Исправлен фон и прозрачность карточек) --- */
#services { 
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('cover_usluga.jpg'); 
    background-size: cover; 
    background-position: center center; 
    background-repeat: no-repeat; 
}
.service-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { 
    background-color: rgba(255, 255, 255, 0.95); /* Сделали карточки почти непрозрачными */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); 
    padding: 30px; 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 1); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    display: flex; 
    flex-direction: column; 
}
.service-card h3 { font-size: 22px; margin-bottom: 15px; color: #1e3a5f; }
.service-card p, .service-card ul li { color: #1e3a5f; font-weight: 500; font-size: 15px; }
.service-card ul { list-style: none; margin-top: 15px; }
.service-card ul li { position: relative; margin-bottom: 10px; padding-left: 20px; }
.service-card ul li::before { content: '✔'; color: #4a90e2; position: absolute; left: 0; font-weight: bold;}

/* --- ПРАЙС-ЛИСТ --- */
#price-list { 
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('price-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.price-card { background-color: #ffffff; padding: 20px 25px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); border: 1px solid #e2e8f0; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.2s, box-shadow 0.2s; }
.price-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }
.price-card-top { margin-bottom: 15px; }
.price-card h3 { font-size: 18px; color: #1e3a5f; margin-bottom: 5px; line-height: 1.4; }
.price-card-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.price-amount { font-size: 22px; color: #4a90e2; font-weight: 800; }
.price-tag { background-color: #e6f6ff; color: #0088cc; font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }

/* --- ПОРТФОЛИО --- */
#portfolio { 
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('portfolio-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.portfolio-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.portfolio-item { background-color: #f8fafc; border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); border: 1px solid #e2e8f0; overflow: hidden; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.portfolio-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); }
.portfolio-cover { position: relative; }
.portfolio-cover img { width: 100%; height: 250px; object-fit: cover; display: block; }
.portfolio-title { text-align: center; color: #1e3a5f; font-size: 20px; padding: 15px; margin: 0; flex-grow: 1; }
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background-color: rgba(74, 144, 226, 0.9); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #ffffff; font-size: 24px; padding-left: 5px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: transform 0.3s; }
.portfolio-item:hover .play-icon { transform: translate(-50%, -50%) scale(1.1); }

/* --- КОНТАКТЫ --- */
#contact {
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('contact-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.contact-info { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.contact-item { background-color: #ffffff; padding: 25px 20px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); border: 1px solid #e2e8f0; flex: 1; text-align: center; }
.contact-item h3 { font-size: 20px; margin-bottom: 10px; color: #1e3a5f; }
.contact-item p, .contact-item a { color: #4a90e2; text-decoration: none; font-weight: 500; font-size: 16px; }
.contact-form { background-color: #ffffff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); max-width: 700px; margin: 0 auto; }
.contact-form h3 { font-size: 24px; margin-bottom: 20px; text-align: center; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid #e2e8f0; border-radius: 8px; font-family: inherit; font-size: 16px; background-color: #f8fafc; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #4a90e2; background-color: #ffffff; }
.contact-button { background-color: #4a90e2; color: #ffffff; border: none; padding: 15px 30px; border-radius: 8px; cursor: pointer; font-size: 18px; font-weight: bold; width: 100%; transition: 0.2s; }
.contact-button:hover { background-color: #357abd; transform: translateY(-2px); }

/* --- МОДАЛЬНОЕ ОКНО --- */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background-color: #ffffff; padding: 30px; border-radius: 12px; max-width: 900px; width: 90%; max-height: 90vh; overflow-y: auto; position: relative; }
.close-modal { position: absolute; top: 15px; right: 20px; color: #1e3a5f; font-size: 35px; font-weight: bold; cursor: pointer; z-index: 10; }
.close-modal:hover { color: #4a90e2; }
#modal-title { text-align: center; color: #1e3a5f; font-size: 28px; margin-bottom: 20px; }
.modal-description { font-size: 16px; line-height: 1.7; color: #2b2b2b; margin-bottom: 25px; }
.modal-cover-img { width: 100%; margin-bottom: 20px; border-radius: 8px; overflow: hidden; position: relative; }
.modal-cover-img img { width: 100%; height: auto; max-height: 500px; object-fit: cover; display: block; }
.ba-section-title { font-size: 22px; color: #1e3a5f; margin-bottom: 15px; text-align: center; }
.ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.ba-img { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; width: 100%; }
.ba-img img { width: 100%; height: 100%; object-fit: cover; }
.ba-label { position: absolute; top: 10px; left: 10px; background-color: rgba(0, 0, 0, 0.6); color: #ffffff; padding: 5px 12px; border-radius: 4px; font-size: 14px; font-weight: bold; }
.ba-label-after { background-color: #4a90e2; }
.modal .video-wrapper { position: relative; width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background-color: #000; }
.modal .video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* --- ФУТЕР --- */
footer { background-color: #ffffff; padding: 40px 0 20px 0; border-top: 1px solid #e2e8f0; }
.footer-bottom { text-align: center; padding-top: 20px; }
.footer-bottom p { font-size: 14px; color: #4a5568; white-space: nowrap; }

/* ==========================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ========================================== */
@media (max-width: 768px) {
    .top-bar { padding: 8px 0; }
    .top-bar-text { display: none; }
    .top-bar-left { gap: 10px; }
    .msg-icon { width: 26px; height: 26px; }
    .top-bar-btn { font-size: 13px; padding: 6px 15px; }

    header { height: 90px; top: 42px; }
    .logo { height: 60px; }
    .burger-menu { display: flex; }
    header .header-contacts, header .header-button { display: none; }
    
    .nav-menu { display: flex; flex-direction: column; position: absolute; top: 90px; left: 0; width: 100%; background-color: #ffffff; box-shadow: 0 10px 15px rgba(0,0,0,0.1); padding: 20px 0; z-index: 999; opacity: 0; visibility: hidden; transform: translateY(-20px); transition: all 0.3s ease-in-out; }
    .nav-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav-menu ul { flex-direction: column; align-items: center; gap: 20px; width: 100%; }

    #hero { margin-top: 132px; padding: 40px 15px 30px 15px; }
    #hero h1 { font-size: 24px; line-height: 1.2; margin-bottom: 15px; }
    #hero p { font-size: 14px; margin-bottom: 15px; }
    .hero-buttons { flex-direction: column; padding: 0; gap: 10px; margin-top: 15px; }

    section { padding: 40px 0; scroll-margin-top: 140px; }
    section h2 { font-size: 24px; margin-bottom: 10px; } 
    section > .container > p { font-size: 14px; margin-bottom: 20px; } 

    #services { padding: 30px 0; }
    .service-card { background-color: rgba(255, 255, 255, 0.98); padding: 20px; }

    .price-cards { grid-template-columns: 1fr; }
    .price-card { padding: 15px 20px; }
    .price-amount { font-size: 20px; }

    .portfolio-gallery { grid-template-columns: 1fr; }
    
    .contact-info { flex-direction: column; }
    .contact-form { padding: 25px 20px; }

    .modal-content { padding: 20px 15px; }
    .ba-grid { grid-template-columns: 1fr; }
    .modal-description { font-size: 14px; }

    .footer-bottom p { font-size: 12px; }
}