/* =========================================
   MAIN.CSS - Общие стили и секции
   ========================================= */

/* Переменные */
:root {
    --bg-cream: #F5F2EB;
    --white: #FFFFFF;
    --dark-charcoal: #2A2A28;
    --dark-blue: #1C2C46; 
    --gold: #C6A664;
    --black: #1A1A1A;
    --gray-dark: #3C3C3C;
    --gray-mid: #6B6B6B;
    --light-gray: #E5E1D8;
    --dark-divider: #47443D;
    --footer-bg: #1A1A1A;
    
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.03);
    --shadow-deep: 20px 20px 60px rgba(0, 0, 0, 0.12);
}

/* Сброс и база */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-cream);
    font-family: 'Inter', sans-serif;
    color: var(--gray-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    color: var(--black);
}

/* Кнопки и ссылки */
.btn-primary {
    display: inline-block;
    background-color: var(--dark-blue);
    color: var(--white) !important;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 1px;
    padding: 16px 40px;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(28, 44, 70, 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    background-color: #14233a;
    box-shadow: 0 8px 25px rgba(28, 44, 70, 0.3);
}

.btn-gold {
    background-color: var(--gold);
    color: var(--black) !important;
    box-shadow: 0 4px 15px rgba(198, 166, 100, 0.3);
}
.btn-gold:hover { background-color: #B89551; }

.micro-cta {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: var(--dark-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--dark-blue);
    padding-bottom: 2px;
    transition: 0.2s;
}
.micro-cta:hover { color: var(--gold); border-color: var(--gold); }
.micro-cta-gold { color: var(--gold); border-color: var(--gold); }
.micro-cta-gold:hover { color: var(--bg-cream); border-color: var(--bg-cream); }

/* Блок Hero */
.hero { background-color: var(--bg-cream); padding: 80px 0 100px; position: relative; overflow: hidden; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 60px; }
.hero-text { flex: 1; z-index: 2; }
.hero h1 { font-size: 72px; font-weight: 500; line-height: 1.1; margin-bottom: 32px; color: var(--black); }
.hero p { font-size: 18px; font-weight: 300; line-height: 1.7; max-width: 450px; margin-bottom: 48px; color: var(--gray-dark); }
.hero-image { flex: 1; position: relative; }
.hero-img-container { position: relative; width: 100%; height: 600px; border-radius: 4px; background: #e6e2da; overflow: hidden; box-shadow: var(--shadow-deep); transform: scale(-1, 1); }
.hero-img-container img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-container::after { content: ''; position: absolute; top: -20px; left: -20px; width: 60%; height: 60%; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); pointer-events: none; }

/* Секции */
.section-light { background-color: var(--bg-cream); padding: 100px 0; }
.section-dark { background-color: var(--dark-charcoal); padding: 100px 0; }
.section-title { font-size: 48px; text-align: center; margin-bottom: 60px; letter-spacing: -0.5px; }
.section-title-light { color: var(--black); }
.section-title-dark { color: var(--bg-cream); }

/* Карточки (3 в ряд) */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.card-white { background: var(--white); border-radius: 4px; padding: 48px 32px; box-shadow: var(--shadow-soft); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-white:hover { transform: translateY(-5px); box-shadow: var(--shadow-deep); }
.card-number { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 56px; font-style: italic; color: var(--gold); margin-bottom: 16px; line-height: 1; }
.card-white h3 { font-size: 28px; margin-bottom: 16px; }
.card-white p { font-size: 16px; font-weight: 300; color: var(--gray-dark); line-height: 1.8; }

/* Карточки (С иконками, темный фон) */
.cards-icon-dark { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.card-icon-dark { border-top: 1px solid var(--dark-divider); padding-top: 24px; }
.card-icon-dark .icon { font-size: 24px; color: var(--gold); margin-bottom: 16px; display: block; }
.card-icon-dark h3 { font-size: 20px; font-family: 'Inter', sans-serif; font-weight: 400; color: var(--bg-cream); margin-bottom: 8px; }
.card-icon-dark p { font-size: 16px; font-weight: 300; color: var(--bg-cream); opacity: 0.7; line-height: 1.7; }

/* Карточки услуг (3x2) */
.cards-3x2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.card-service { background: var(--white); padding: 32px; border-radius: 4px; border: 1px solid var(--light-gray); box-shadow: var(--shadow-soft); transition: border-color 0.3s; }
.card-service:hover { border-color: var(--gold); }
.card-service h3 { font-size: 32px; margin-bottom: 8px; }
.card-service p { font-size: 15px; font-weight: 300; line-height: 1.7; margin-bottom: 24px; }
.card-service .price { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 20px; color: var(--dark-blue); margin-top: auto; display: block; border-top: 1px solid var(--light-gray); padding-top: 16px; }

/* Кейсы (2x2) */
.cards-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.card-case-dark { border-top: 1px solid var(--gold); padding: 24px 0; }
.card-case-dark .case-cat { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; font-size: 22px; color: var(--gold); }
.card-case-dark .case-desc { font-size: 18px; font-weight: 300; color: var(--bg-cream); opacity: 0.85; margin: 8px 0 16px; }
.card-case-dark .case-result { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 20px; color: var(--bg-cream); }

/* Отзывы */
.review-card { background: var(--white); padding: 40px; border-radius: 4px; box-shadow: var(--shadow-soft); }
.review-card blockquote { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-style: italic; font-size: 24px; color: var(--black); line-height: 1.4; margin-bottom: 24px; }
.review-card .author { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--gray-mid); }
.review-card .read-more { font-family: 'Manrope', sans-serif; font-weight: 500; font-size: 14px; color: var(--dark-blue); text-decoration: none; border-bottom: 1px solid transparent; transition: 0.2s; }
.review-card .read-more:hover { border-color: var(--dark-blue); }

/* Блок Цитаты */
.quote-block { background-color: var(--dark-blue); padding: 120px 0; text-align: center; position: relative; }
.quote-block::before { content: '«'; position: absolute; top: 40px; left: 50%; transform: translateX(-50%); font-family: 'Cormorant Garamond', serif; font-size: 200px; color: rgba(198, 166, 100, 0.1); }
.quote-block .gold-line { width: 60px; height: 1px; background-color: var(--gold); margin: 0 auto 48px; }
.quote-block blockquote { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; font-size: 32px; line-height: 1.4; color: var(--bg-cream); max-width: 800px; margin: 0 auto; position: relative; z-index: 2; }
.quote-block .author { font-family: 'Inter', sans-serif; font-weight: 300; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-top: 32px; }

/* Форма и контакты */
.contacts-form { background-color: var(--dark-charcoal); padding: 100px 0; }
.contacts-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contacts-col h3 { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.contacts-col p { font-size: 18px; font-weight: 300; color: var(--bg-cream); margin-bottom: 24px; }

.form-col .form-text { font-size: 18px; font-weight: 300; font-style: italic; color: rgba(245, 242, 235, 0.6); margin-bottom: 32px; }
.form-group { margin-bottom: 24px; }
.form-group label { font-family: 'Manrope', sans-serif; font-weight: 400; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: rgba(245, 242, 235, 0.6); display: block; margin-bottom: 8px; }
.form-group input, .form-group textarea { width: 100%; background: transparent; border: 1px solid #4A473F; border-radius: 2px; padding: 16px; font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 300; color: var(--bg-cream); outline: none; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 120px; }
.checkbox-group { display: flex; align-items: flex-start; gap: 12px; margin: 8px 0 32px; }
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--gold); }
.checkbox-group label { font-size: 13px; font-weight: 300; color: rgba(245, 242, 235, 0.6); }
.disclaimer { font-size: 13px; font-style: italic; color: rgba(245, 242, 235, 0.4); margin-top: 24px; }

/* ===== Кастомный скроллбар ===== */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-cream); /* Кремовый фон дорожки */
}
::-webkit-scrollbar-thumb {
    background: var(--gold); /* Золотой ползунок */
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--dark-blue); /* Темно-синий при наведении */
}

#consultation-form {
    scroll-margin-top: 80px; /* Отступ от верхнего края окна браузера */
}

/* Анимация появления формы при скролле */
#consultation-form {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
#consultation-form.visible-anim {
    opacity: 1;
    transform: translateY(0);
}

/* Кнопка "Наверх" (Премиум) */
#scrollTopBtn {
    opacity: 0;
    visibility: hidden; /* Скрываем через visibility, чтобы работала плавность */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    
    width: 52px;
    height: 52px;
    border: 2px solid var(--gold); /* Золотая обводка */
    outline: none;
    background-color: var(--dark-blue); /* Основной синий */
    color: var(--white); /* Белая стрелка */
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    
    /* Центрируем SVG внутри круга */
    display: flex;
    align-items: center;
    justify-content: center;
    
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Эффект при наведении: кнопка становится золотой, стрелка синей, кнопка приподнимается */
#scrollTopBtn:hover {
    background-color: var(--gold);
    border-color: var(--dark-blue);
    color: var(--dark-blue);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(198, 166, 100, 0.4);
}

/* ===== Сетка для страницы "Об адвокате" ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr; /* Текст слева, фото справа */
    gap: 60px;
    align-items: center;
}

.about-content h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.about-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 24px;
    line-height: 1.1;
}

.about-content p {
    font-size: 17px;
    font-weight: 300;
    color: var(--gray-dark);
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 600px; /* Чтобы текст не растягивался на всю ширину */
}

/* ===== Фото ===== */
.about-image {
    width: 100%;
    height: 520px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    position: relative;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Фото аккуратно заполняет блок, не растягиваясь */
    object-position: center top; /* Фокусируемся на лице */
}

/* Адаптив для планшетов и телефонов */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr; /* На планшете фото уходит вниз */
        gap: 40px;
    }
    .about-image {
        height: 400px;
    }
}

/* ===== Обновленная секция "Привычки" ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    position: relative;
    height: 280px; /* Чуть уменьшили высоту */
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-deep);
}

/* Многослойный градиент для гарантированной читаемости */
.feature-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to top, 
        rgba(26, 26, 26, 0.98) 0%,   /* Почти непрозрачный у текста */
        rgba(26, 26, 26, 0.85) 25%,  /* Плотная середина */
        rgba(26, 26, 26, 0.4) 50%,   /* Плавное растворение */
        rgba(26, 26, 26, 0) 75%      /* Верх чистый */
    );
}

.feature-card-content {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 2;
    color: var(--bg-cream);
}

/* Заголовок: одна строка, без переносов */
.feature-card-content h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: var(--bg-cream);
    margin-bottom: 10px;
    white-space: nowrap; /* Принудительно в одну строку */
    overflow: hidden;
    text-overflow: ellipsis; /* Если вдруг текст не влезет, добавится многоточие */
}

/* Описание: максимум две строки */
.feature-card-content p {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
    color: var(--bg-cream);
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Обрезаем на второй строке */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .feature-grid { grid-template-columns: 1fr; }
}

/* Адаптив для этой сетки */
@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .feature-grid { grid-template-columns: 1fr; }
}

/* Подсказка при копировании */
.phone-copy-tooltip {
    position: fixed;
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.phone-copy-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Стили для номеров телефона и почты в темном блоке (Контакты) */
.contacts-form .header-phone {
    color: var(--bg-cream); /* Кремово-белый цвет текста */
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 24px;
    transition: color 0.3s ease;
}

/* При наведении текст подсвечивается золотым */
.contacts-form .header-phone:hover {
    color: var(--gold);
}

/* Иконки соцсетей в контактах */
.contacts-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 32px;
}
.contacts-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Тонкая обводка */
    background: rgba(255, 255, 255, 0.05);      /* Легкий полупрозрачный фон */
    color: #ffffff;
    transition: all 0.3s ease;
}
.contacts-social a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--dark-charcoal); /* Темная иконка на золотом фоне */
    transform: translateY(-3px);
}
.contacts-social svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Стили для placeholder (подсказок в полях) */
::placeholder {
    color: #888;
    opacity: 1;
    font-style: italic;
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: #888;
}
::-ms-input-placeholder { /* Microsoft Edge */
    color: #888;
}

#form-notification {
    padding: 12px 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}