/* ==============================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ СТИЛИ
   ============================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0a0a0a;
    --card-bg: #151515;
    --text-main: #f0f0f0;
    --gold: #d4af37;
    --gold-hover: #f1c40f;
    --overlay-dark: rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; scroll-behavior: smooth; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* ==============================
   2. ШАПКА И НАВИГАЦИЯ
   ============================== */
header { 
    background-color: rgba(10, 10, 10, 0.95); 
    padding: 15px 50px; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid rgba(212, 175, 55, 0.3); 
    backdrop-filter: blur(5px);
}

.logo-wrap { display: flex; align-items: center; text-decoration: none; }
.logo-text { font-size: 24px; font-weight: 700; color: var(--gold); letter-spacing: 2px; }

nav a { color: var(--text-main); text-decoration: none; margin-left: 30px; font-weight: 600; transition: color 0.3s; font-size: 0.9rem; }
nav a:hover { color: var(--gold); }

/* ==============================
   3. ГЛАВНЫЙ ЭКРАН (HERO)
   ============================== */
#hero { 
    padding: 180px 20px 120px 20px; 
    max-width: 100%; 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    background-image: url('images/background.png'); /* Укажите тут вашу картинку */
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    position: relative; 
    margin-top: 0; 
}

#hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; max-width: 900px; }

#hero h1 { 
    font-size: 3.5rem; 
    color: var(--gold); 
    margin-bottom: 10px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    text-shadow: 2px 4px 10px rgba(0,0,0,0.9), 0 0 30px rgba(0,0,0,0.7);
}

#hero h2 { 
    font-size: 1.5rem; 
    font-weight: 400; 
    margin-bottom: 40px; 
    color: #fff; 
    text-shadow: 1px 2px 8px rgba(0,0,0,1), 0 0 20px rgba(0,0,0,0.8);
}

.discount { 
    background-color: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(6px); 
    border: 2px solid var(--gold); 
    padding: 15px 30px; 
    border-radius: 5px; 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: var(--gold); 
    margin-bottom: 40px; 
    display: inline-block;
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

.btn { 
    background-color: var(--gold); 
    color: #000; 
    padding: 18px 45px; 
    text-decoration: none; 
    font-size: 1.1rem; 
    font-weight: 700; 
    border-radius: 50px; 
    transition: background 0.3s, transform 0.2s; 
    cursor: pointer; 
    border: none; 
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn:hover { background-color: var(--gold-hover); transform: scale(1.05); }

/* ==============================
   4. ОБЩИЕ СТИЛИ СЕКЦИЙ И РАЗДЕЛИТЕЛИ
   ============================== */
section { 
    padding: 100px 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
    position: relative; 
    z-index: 10; 
    border-bottom: 1px solid rgba(212, 175, 55, 0.1); 
}

.section-title { 
    text-align: center; 
    font-size: 2.8rem; 
    color: var(--gold); 
    margin-bottom: 20px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--gold);
    margin: 20px auto 40px auto;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.section-subtitle { text-align: center; margin-bottom: 60px; color: #aaa; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ==============================
   5. УСЛУГИ (КАРТОЧКИ)
   ============================== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.service-card { 
    background-color: var(--card-bg); 
    padding: 50px 30px; 
    border-radius: 10px; 
    border: 1px solid rgba(212, 175, 55, 0.2); 
    text-align: center; 
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; 
    cursor: pointer; 
    display: flex; flex-direction: column; justify-content: space-between;
}
.service-card:hover { transform: translateY(-10px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15); }

.service-icon { font-size: 2.5rem; color: var(--gold); margin-bottom: 15px; display: inline-block; }
.service-card h3 { color: var(--gold); margin-bottom: 20px; font-size: 1.6rem; font-weight: 600; }
.service-card p { font-size: 0.95rem; color: #ccc; margin-bottom: 30px; flex-grow: 1; }
.click-hint { font-size: 0.8rem; color: var(--gold); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }

/* ==============================
   6. ВСПОЛЫВАЮЩИЕ ОКНА (МОДАЛКИ)
   ============================== */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(8px); justify-content: center; align-items: center; padding: 20px; }

.modal-content { 
    background-color: var(--card-bg); 
    border: 1px solid var(--gold); 
    border-radius: 10px; 
    max-width: 800px; 
    width: 100%; 
    max-height: 90vh; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
    animation: fadeIn 0.4s ease-out; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: var(--card-bg); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.close-btn { 
    position: absolute; top: 15px; right: 15px; color: #fff; background-color: rgba(0, 0, 0, 0.6); 
    width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; 
    font-size: 30px; font-weight: bold; cursor: pointer; z-index: 100; transition: background 0.3s, color 0.3s; 
}
.close-btn:hover { color: var(--gold); background-color: rgba(0, 0, 0, 0.9); }

.modal-image { width: 100%; height: auto; max-height: 300px; object-fit: cover; border-bottom: 3px solid var(--gold); }
.modal-text-wrap { padding: 30px; }
.modal-text-wrap h3 { color: var(--gold); font-size: 1.8rem; margin-bottom: 15px; font-weight: 700; }
.modal-text-wrap p { margin-bottom: 20px; font-size: 1.1rem; color: #eee; }
.modal-text-wrap ul { margin-left: 25px; margin-bottom: 25px; color: #ccc; font-size: 1rem; }
.modal-text-wrap li { margin-bottom: 8px; }

/* ==============================
   7. КОНТАКТЫ И ФУТЕР
   ============================== */
#kontakt { background-color: var(--card-bg); text-align: center; }
.contact-info { display: flex; flex-direction: column; gap: 25px; font-size: 1.3rem; margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto; }
.contact-info p { border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 15px; }
.contact-info span { color: var(--gold); font-weight: 600; margin-right: 10px; }

footer { margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); }
footer p { font-size: 0.9rem; color: #666; }

/* ==============================
   8. АДАПТИВНОСТЬ (МОБИЛЬНЫЕ)
   ============================== */
@media (max-width: 992px) {
    #hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    header { padding: 15px 20px; flex-direction: column; gap: 10px; }
    nav a { margin: 0 8px; font-size: 0.8rem; }
    #hero h1 { font-size: 2.2rem; }
    #hero h2 { font-size: 1.2rem; }
    .discount { font-size: 1.1rem; padding: 12px 20px; }
    .btn { padding: 15px 35px; font-size: 1rem; }
    .section-title { font-size: 2.2rem; }
    .modal-image { height: 220px; }
    .modal-text-wrap { padding: 25px; }
    .modal-text-wrap h3 { font-size: 1.6rem; }
    .contact-info { font-size: 1.1rem; }
}

/* ==============================
   9. ИНТЕРАКТИВНАЯ КАРТА
   ============================== */
#map-section {
    max-width: 800px;
    margin: 0 auto 60px auto;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#map {
    height: 400px;
    width: 100%;
    border-radius: 5px;
    border: 1px solid var(--gold);
    z-index: 1; /* Чтобы карта не перекрывала шапку сайта */
}

#map-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background-color: #222;
    color: #aaa;
    border: 1px solid #444;
    transition: 0.3s;
}

/* Стили для ответов карты */
#map-result.result-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: #2ecc71;
}

#map-result.result-error {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border-color: #f39c12;
}

/* Фикс для кнопок самой карты (+/-), чтобы они не были белыми квадратами */
.leaflet-bar a {
    background-color: #222 !important;
    color: var(--gold) !important;
    border-bottom: 1px solid #444 !important;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background-color: #222;
    color: var(--gold);
}
/* Стили для изображений внутри карточек услуг */
.service-card-img {
    width: 100%;
    height: 200px; /* Фиксированная высота, чтобы все карточки были одинаковыми */
    object-fit: cover; /* Фото заполнит область, не растягиваясь */
    border-radius: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gold); /* Золотая линия под фото */
    transition: transform 0.3s ease;
}

.service-card:hover .service-card-img {
    transform: scale(1.03); /* Легкий зум при наведении на карточку */
}