/* =========================================
   ГК МосПраво - Полный CSS (Очищенный)
   ========================================= */

:root {
    --bg-main: #1B1B1B;
    --bg-header: #161616;
    --bg-card: #222222;
    --bg-input: #1E1E1E;
    --gold-1: #F4D467;
    --gold-2: #D4AF37;
    --gold-3: #A67C00;
    --gold-dark: #8B6914;
    --blue-1: #2A3E5C;
    --blue-2: #1B2A4A;
    --text-light: #F0F0F0;
    --text-muted: #B0B0B0;
    --border: #2E2E2E;
    --danger: #E74C3C;
    --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Manrope', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background: var(--bg-main);
    color: var(--text-light);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--gold-1);
    letter-spacing: 0.5px;
    line-height: 1.3;
}

a { color: var(--gold-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-1); }

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Кнопки ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    position: relative;
    z-index: 1;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold-2);
    color: var(--gold-2);
    box-shadow: none;
}

.btn-outline:hover {
    background: linear-gradient(145deg, #F4D467 0%, #D4AF37 50%, #A67C00 100%);
    color: #1B1B1B;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-gold {
    background: linear-gradient(145deg, #F4D467 0%, #D4AF37 50%, #A67C00 100%);
    color: #1B1B1B;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -2px 0 rgba(0,0,0,0.3), 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), inset 0 -2px 0 rgba(0,0,0,0.2), 0 6px 20px rgba(212, 175, 55, 0.5);
    color: #000;
}

/* ===== Шапка ===== */
.site-header {
    background: var(--bg-header);
    padding: 15px 0;
    border-bottom: 1px solid var(--gold-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.logo-link { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.logo-img {
    height: 65px;
    width: auto;
    filter: drop-shadow(0 2px 12px rgba(212, 175, 55, 0.45));
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-1);
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Бургер */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 30px;
    position: relative;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--gold-2);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Навигация */
.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-2), var(--gold-1));
    transition: width var(--transition);
}

.main-nav a:hover::after { width: 100%; }

/* ===== КОНТАКТЫ В ХЕДЕРЕ (ВИДНЫ НА КОМПЬЮТЕРЕ) ===== */
.header-contacts {
    display: flex !important;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.phone-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--gold-1) !important;
    text-shadow: 0 2px 10px rgba(212,175,55,0.4);
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.phone-header:hover {
    color: var(--gold-1) !important;
    text-shadow: 0 4px 15px rgba(212,175,55,0.6);
    transform: scale(1.05);
}

.phone-header svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 6px rgba(212,175,55,0.3));
}

/* ===== Hero ===== */
.hero {
    background-image: url('/images/hero-bg-desktop.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: 120px 0;
    text-align: center;
    border-bottom: 1px solid var(--blue-1);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--gold-1);
    text-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 40px rgba(212,175,55,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* ===== Секции ===== */
.services-section, .advantages, .reviews, .cta, .calculator, .contacts, .service-page { padding: 80px 0; }
.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    margin: 15px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

/* ===== Карточки услуг ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(42,62,92,0.5);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before { left: 100%; }
.service-card:hover {
    border-color: var(--gold-2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 30px rgba(212,175,55,0.1);
    transform: translateY(-5px);
}

.service-card img {
    width: 100%; height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.service-card h3 { margin-bottom: 10px; color: var(--gold-1); }
.service-card h3 a { color: inherit; text-decoration: none; }
.service-card h3 a:hover { color: var(--gold-2); }
.service-card p { color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }
.service-card .btn { align-self: flex-start; position: relative; z-index: 2; }

/* ===== Преимущества ===== */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.adv-item {
    background: linear-gradient(145deg, #222222 0%, #1B1B1B 100%);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--gold-2);
    transition: all 0.3s ease;
    position: relative;
}

.adv-item:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.4); transform: translateX(5px); }
.adv-item h4 { color: var(--gold-1); margin-bottom: 12px; font-size: 1.2rem; }
.adv-item p { color: var(--text-muted); line-height: 1.8; }

/* ===== CTA ===== */
.cta {
    background: linear-gradient(145deg, #161616 0%, #1B1B1B 100%);
    text-align: center;
    border-top: 1px solid var(--gold-dark);
    border-bottom: 1px solid var(--gold-dark);
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 200px; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

.cta h2 { font-size: 2.5rem; margin-bottom: 15px; color: var(--gold-1); }
.cta p { font-size: 1.2rem; margin-bottom: 30px; color: var(--text-muted); }

/* ===== Калькулятор ===== */
.calculator form {
    max-width: 600px; margin: 30px auto; background: var(--bg-card); padding: 40px; border-radius: 12px;
    border: 1px solid rgba(42,62,92,0.5); box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.form-group { margin-bottom: 25px; }
.form-group label {
    display: block; margin-bottom: 8px; color: var(--gold-1); font-weight: 500; font-size: 0.9rem; letter-spacing: 0.5px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 14px; background: var(--bg-input); border: 1px solid rgba(42,62,92,0.5);
    color: var(--text-light); border-radius: 6px; font-size: 1rem; transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--gold-2); background: #222222; box-shadow: 0 0 10px rgba(212,175,55,0.2); outline: none;
}

.result {
    background: linear-gradient(145deg, #222222 0%, #1B1B1B 100%);
    padding: 30px; border-radius: 12px; margin-top: 30px; border: 1px solid var(--gold-2); text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.result strong { color: var(--gold-1); font-size: 2rem; }

/* ===== Контакты ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info, .contact-form {
    background: var(--bg-card); padding: 35px; border-radius: 12px; border: 1px solid rgba(42,62,92,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.contact-info p { margin-bottom: 15px; font-size: 1.1rem; color: var(--text-muted); }
.contact-info strong { color: var(--gold-1); }
.contact-form form { display: flex; flex-direction: column; gap: 15px; }

/* ===== Страница услуги ===== */
.service-detail {
    max-width: 800px; margin: 0 auto; background: var(--bg-card); padding: 50px; border-radius: 16px;
    border: 1px solid rgba(42,62,92,0.5); box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.service-main-img { width: 100%; max-height: 450px; object-fit: cover; border-radius: 12px; margin-bottom: 30px; }
.service-content { color: var(--text-light); font-size: 1.05rem; line-height: 1.8; margin-bottom: 30px; }
.service-content p { margin-bottom: 15px; }
.service-price {
    font-size: 1.6rem; color: var(--gold-1); font-weight: 700; margin-bottom: 30px;
    border-top: 1px solid rgba(212,175,55,0.3); padding-top: 20px;
}

/* ===== Модальные окна ===== */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px); z-index: 9999; justify-content: center; align-items: center; padding: 20px;
}

.modal-content {
    background: var(--bg-header); max-width: 500px; width: 100%; padding: 40px; border-radius: 16px;
    border: 1px solid var(--gold-2); position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal-content .close { position: absolute; top: 15px; right: 20px; font-size: 2rem; cursor: pointer; color: var(--text-muted); transition: color 0.3s; }
.modal-content .close:hover { color: var(--gold-1); }
.modal-content h3 { margin-bottom: 20px; text-align: center; color: var(--gold-1); }
.modal-content form { display: flex; flex-direction: column; gap: 15px; }
.modal-content input {
    width: 100%; padding: 14px; background: var(--bg-input); border: 1px solid rgba(42,62,92,0.5);
    color: var(--text-light); border-radius: 6px; font-size: 1rem;
}

.modal-content input:focus { border-color: var(--gold-2); outline: none; }

/* ===== Футер ===== */
.site-footer {
    background: var(--bg-header); padding: 60px 0 30px; border-top: 1px solid var(--gold-dark); position: relative;
}

.site-footer::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

.footer-logo .logo-img { height: 90px; width: auto; filter: drop-shadow(0 4px 20px rgba(212, 175, 55, 0.5)); }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; align-items: start; margin-bottom: 40px; }
.footer-about p { color: var(--text-muted); margin-top: 20px; line-height: 1.7; font-size: 0.95rem; }
.footer-nav h4, .footer-contacts h4 { margin-bottom: 20px; color: var(--gold-1); font-size: 1.1rem; letter-spacing: 1px; text-transform: uppercase; }
.footer-nav li { margin-bottom: 12px; }
.footer-nav a { color: var(--text-light); font-size: 0.95rem; transition: color 0.3s; }
.footer-nav a:hover { color: var(--gold-1); }
.footer-contacts p { margin-bottom: 12px; }
.footer-contacts a { color: var(--text-light); }
.footer-contacts a:hover { color: var(--gold-1); }

/* Телефон в футере */
.phone-footer {
    font-size: 1.3rem; font-weight: 700; color: var(--gold-1); text-decoration: none; display: flex; align-items: center; gap: 10px;
    transition: all 0.3s ease;
}

.phone-footer:hover { color: var(--gold-1); text-shadow: 0 4px 15px rgba(212,175,55,0.6); transform: scale(1.02); }
.phone-footer svg { width: 20px; height: 20px; filter: drop-shadow(0 2px 6px rgba(212,175,55,0.3)); }

.footer-bottom {
    border-top: 1px solid rgba(212,175,55,0.2); padding-top: 25px; text-align: center; color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.5px;
}

/* ===== Админка ===== */
.admin-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; background: var(--bg-main); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid var(--gold-dark); }
.admin-header h1 { color: var(--gold-1); font-size: 1.8rem; }
.tabs { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.tabs a {
    padding: 10px 20px; background: var(--bg-card); border: 1px solid rgba(42,62,92,0.5); border-radius: 6px;
    color: var(--text-light); font-size: 0.9rem; transition: all 0.3s ease;
}
.tabs a:hover { border-color: var(--gold-2); color: var(--gold-1); }
.tabs a.active {
    background: linear-gradient(145deg, #F4D467 0%, #D4AF37 50%, #A67C00 100%);
    color: #1B1B1B; border-color: transparent; box-shadow: 0 4px 10px rgba(212,175,55,0.3);
}
.success { background: rgba(212,175,55,0.15); color: var(--gold-1); padding: 15px; border-radius: 8px; margin-bottom: 20px; border-left: 4px solid var(--gold-2); }
.list { display: grid; gap: 15px; }
.item { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); padding: 18px; border-radius: 8px; border: 1px solid rgba(42,62,92,0.5); transition: all 0.3s; }
.item:hover { border-color: var(--gold-2); }
.item-title { color: var(--text-light); font-weight: 500; }
.item-actions { display: flex; gap: 10px; }
.login-form { max-width: 420px; margin: 100px auto; background: var(--bg-card); padding: 50px; border-radius: 16px; border: 1px solid var(--gold-2); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.login-form h1 { text-align: center; margin-bottom: 30px; color: var(--gold-1); }
.login-form input { width: 100%; padding: 14px; margin-bottom: 20px; background: var(--bg-input); border: 1px solid rgba(42,62,92,0.5); color: var(--text-light); border-radius: 6px; }
.login-form input:focus { border-color: var(--gold-2); outline: none; }

/* ===== Золотой чекбокс ===== */
.gold-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--gold-1);
    user-select: none;
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
}

.gold-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.gold-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 25px;
    width: 25px;
    background-color: transparent;
    border: 2px solid var(--gold-2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gold-checkbox:hover input ~ .checkmark {
    border-color: var(--gold-1);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.gold-checkbox input:checked ~ .checkmark {
    background-color: var(--gold-2);
    border-color: var(--gold-2);
}

.gold-checkbox input:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    left: 7px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #121212;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* ===== Мобильные стили ===== */
@media (max-width: 768px) {
    body { font-size: 15px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .hero { background-image: url('/images/hero-bg-phone.png'); padding: 80px 0; }
    .menu-toggle { display: block; }
    .main-nav {
        position: fixed; top: 70px; left: 0; width: 100%; background: var(--bg-header); padding: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5); transform: translateY(-150%); transition: transform 0.3s ease;
        max-height: calc(100vh - 70px); overflow-y: auto; z-index: 1050;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav ul { flex-direction: column; gap: 15px; }
    .main-nav a { font-size: 1rem; text-transform: none; letter-spacing: 0.5px; }
    .main-nav a::after { display: none; }

    /* СКРЫВАЕМ КОНТАКТЫ В ХЕДЕРЕ НА МОБИЛЬНОМ */
    .header-contacts { display: none !important; }

    /* Футер: аккордеон */
    .footer-nav-toggle { background: none; border: none; padding: 0; width: 100%; text-align: left; cursor: pointer; }
    .footer-nav-toggle h4 { margin-bottom: 0; display: flex; justify-content: space-between; align-items: center; }
    .footer-nav-toggle .arrow { font-size: 0.8rem; transition: transform 0.3s; }
    .footer-nav-list { display: none; padding-left: 10px; }
    .footer-nav-list.open { display: block; padding-top: 10px; }
    .footer-nav-list li { margin-bottom: 8px; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-grid, .footer-cols { grid-template-columns: 1fr; gap: 30px; }
    .service-detail { padding: 25px; }
    .cta h2 { font-size: 1.8rem; }
    .btn { padding: 10px 20px; font-size: 0.8rem; }
}