/* ============ ПРЕМИУМ-СТИЛИ: ГРАФИТ + ЗОЛОТО ============ */

:root {
    --gold: #D4AF37;
    --graphite-900: #131313;
    --graphite-800: #1A1A1A;
    --graphite-700: #242424;
    --graphite-600: #2E2E2E;
    --platinum: #E5E5E5;
}

html, body {
    background-color: var(--graphite-800);
    color: var(--platinum);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    min-height: 100%;
}

#blazor-error-ui {
    background: #1A1A1A;
    color: #E5E5E5;
    border-bottom: 1px solid #D4AF37;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: none;
}

/* ---------- Шапка и логотип ---------- */
.appbar-graphite {
    background: var(--graphite-900) !important;
    color: var(--platinum) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.appbar-logo {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.04em;
    font-weight: 600;
}

/* ---------- Hero-блок ---------- */
.graphite-hero {
    background: linear-gradient(135deg, var(--graphite-900) 0%, var(--graphite-800) 55%, #1f1f1f 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 4rem 0;
    margin: -2rem -1rem 2rem -1rem;
}

@media (min-width: 600px) {
    .graphite-hero {
        margin: -3rem -1.5rem 2.5rem -1.5rem;
    }
}

.hero-photo {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* ---------- Фото на странице «О юристе» ---------- */
.about-photo-frame {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
    padding: 5px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.9) 0%, rgba(212, 175, 55, 0.12) 50%, rgba(212, 175, 55, 0.6) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.about-photo-frame::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.about-photo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.grid-align-center {
    align-items: center;
}

/* ---------- Фото на странице «Контакты» ---------- */
.contact-photo {
    margin: 1.75rem 0 2.5rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.contact-photo-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Цвета и акценты ---------- */
.gold-accent {
    color: var(--gold) !important;
}

.gold-text {
    color: var(--gold) !important;
}

.gold-icon {
    color: var(--gold);
}

.muted-text {
    color: #A0A0A0 !important;
}

/* ---------- Карточки ---------- */
.premium-card {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.premium-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.5) !important;
}

.graphite-card {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
}

.hero-graphite {
    background: linear-gradient(135deg, var(--graphite-900), var(--graphite-700)) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

/* ---------- Кнопки ---------- */
.mud-button-filled.mud-button-filled-primary {
    background-color: var(--gold) !important;
    color: #1A1A1A !important;
    font-weight: 600;
}

.mud-button-outlined.mud-button-outlined-primary {
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}

/* ---------- Списки услуг ---------- */
.services-list {
    margin: 0;
    padding-left: 1.2rem;
}

.services-list li {
    color: var(--platinum);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---------- Подвал ---------- */
.footer {
    background: var(--graphite-900) !important;
    color: #A0A0A0 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 3rem;
}

.footer .mud-text {
    color: #A0A0A0;
}

.footer .gold-accent {
    color: var(--gold);
}

/* ---------- Контент статей ---------- */
.article-content {
    line-height: 1.9;
    white-space: pre-line;
}

/* ---------- Фото статей ---------- */
.article-card-photo {
    margin: -1px -1px 0 -1px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.article-card-photo-img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.article-detail-photo {
    margin-bottom: 1.75rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    background: var(--graphite-900);
}

.article-detail-photo img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ---------- Полоса показателей (stats) ---------- */
.stats-band {
    background: linear-gradient(135deg, var(--graphite-900) 0%, var(--graphite-800) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.stats-band-gap {
    margin-top: 2.5rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
}

/* ---------- Текст «О юристе» ---------- */
.about-text {
    white-space: pre-line;
    line-height: 1.9;
}

/* ---------- Таймлайн опыта ---------- */
.timeline {
    position: relative;
    padding-left: 1.25rem;
    border-left: 2px solid rgba(212, 175, 55, 0.4);
}

.timeline-item {
    position: relative;
    padding: 0 0 1.5rem 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.55rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--graphite-900);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* ---------- Админ-панель ---------- */
.admin-header-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.admin-top-btn {
    min-width: 0;
    padding: 6px 16px !important;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .admin-header-actions {
        padding-left: 4rem;
    }
}

.admin-tabs .mud-tabs-panels {
    background: transparent !important;
}

.admin-tabs .mud-tab {
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.admin-tabs .mud-tab-active {
    color: var(--gold) !important;
}

.admin-tabs .mud-tab-indicator {
    background-color: var(--gold) !important;
}

.admin-tab-label {
    display: inline-flex;
    align-items: center;
}

.admin-item {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.admin-item:hover {
    border-color: rgba(212, 175, 55, 0.35);
}

.admin-thumb {
    width: 88px;
    height: 64px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    background: var(--graphite-900);
}

.status-chip {
    font-weight: 600;
    text-transform: none;
}

.admin-photo-preview {
    position: relative;
    display: inline-block;
}

.admin-photo-preview img {
    display: block;
    width: 180px;
    height: 132px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.admin-photo-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--graphite-800) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-photo-empty {
    width: 180px;
    height: 132px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    color: #A0A0A0;
    background: rgba(255, 255, 255, 0.02);
}

.reconnect-modal {
    z-index: 2000;
}

.reconnect-card {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
}

.reconnect-spin {
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============ МОБИЛЬНАЯ АДАПТАЦИЯ ============ */

/* Защита от горизонтального скролла */
html,
body {
    overflow-x: hidden;
}

/* Логотип в шапке: не переносится, обрезается многоточием */
.appbar-logo {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mud-appbar .appbar-logo {
    flex: 1 1 auto;
    margin-right: 0.5rem;
}

.mud-appbar .mud-button-root,
.mud-appbar .mud-icon-button-root {
    flex-shrink: 0;
}

/* Элементы, скрытые на телефонах (меньше 600px) */
.hide-sm-down {
    display: none !important;
}

@media (min-width: 600px) {
    .hide-sm-down {
        display: inline-flex !important;
    }
}

/* Компактные заголовки и отступы на телефонах */
@media (max-width: 599.98px) {
    .mud-typography-h1 {
        font-size: 2.4rem !important;
    }

    .mud-typography-h2 {
        font-size: 1.9rem !important;
    }

    .mud-typography-h3 {
        font-size: 1.55rem !important;
    }

    .mud-typography-h4 {
        font-size: 1.3rem !important;
    }

    .mud-typography-h5 {
        font-size: 1.15rem !important;
    }

    .graphite-hero {
        padding: 2.5rem 0;
        margin: -1.5rem -0.75rem 1.5rem -0.75rem;
    }

    .stats-band {
        padding: 1.5rem 0;
    }

    .appbar-logo {
        font-size: 1rem !important;
        letter-spacing: 0.02em;
    }

    .appbar-cta {
        padding: 4px 12px !important;
        font-size: 0.85rem !important;
        min-width: 0 !important;
        white-space: nowrap;
    }

    .footer {
        margin-top: 2rem;
    }
}

/* Кнопки в hero: на телефоне — в столбик на всю ширину */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 599.98px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .mud-button-root {
        width: 100%;
    }
}

/* Панели с крупными внутренними отступами — компактнее на телефоне */
.responsive-pad {
    padding: 1.25rem !important;
}

@media (min-width: 600px) {
    .responsive-pad {
        padding: 2rem !important;
    }
}

/* Кнопка отправки формы на всю ширину на телефоне */
@media (max-width: 599.98px) {
    .contact-submit {
        width: 100%;
    }
}

/* Кнопки в деталях кейса: перенос на телефоне */
.action-row {
    flex-wrap: wrap;
}

/* Вкладки админ-панели: горизонтальная прокрутка, если не помещаются */
.admin-tabs .mud-tabs-toolbar {
    overflow-x: auto;
}

/* Подвал: центрирование на телефоне */
@media (max-width: 599.98px) {
    .footer .mud-container .d-flex {
        text-align: center;
        align-items: center;
    }
}

/* ============ SEO: заголовки, крошки, страницы услуг ============ */

.home-h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--platinum);
    margin: 0.5rem 0 0.75rem;
}

.page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--platinum);
}

.article-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--platinum);
    margin: 0.5rem 0;
}

/* Страховка от видимой рамки фокуса вокруг заголовков (и для :focus, и для :focus-visible). */
h1:focus,
h1:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--gold);
    margin: 2.5rem 0 1rem;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    margin: 1rem 0 0.25rem;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.breadcrumbs-item {
    display: inline-flex;
    align-items: center;
    color: #a0a0a0;
}

.breadcrumbs-item + .breadcrumbs-item::before {
    content: "›";
    margin-right: 0.35rem;
    color: var(--gold);
}

.breadcrumbs-link {
    color: var(--gold);
    text-decoration: none;
}

.breadcrumbs-link:hover {
    text-decoration: underline;
}

.breadcrumbs-current {
    color: #c8c8c8;
}

/* ---------- Страницы услуг ---------- */
.service-hero {
    background: linear-gradient(135deg, var(--graphite-900) 0%, var(--graphite-800) 60%, #1f1f1f 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 3rem 1.5rem;
    margin: 0 -1rem 2rem -1rem;
}

.service-h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--platinum);
    margin: 0.5rem 0 0.75rem;
}

.service-slogan {
    font-size: 1.15rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    max-width: 720px;
}

.service-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--platinum);
    max-width: 900px;
}

.service-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.service-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.service-check-list .mud-icon-root {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.service-stages {
    counter-reset: stage;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.service-stages li {
    counter-increment: stage;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.service-stages li::before {
    content: counter(stage);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
}


.price-table {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: var(--graphite-700);
}

.price-row + .price-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.price-row .gold-accent {
    white-space: nowrap;
    font-weight: 600;
}

.timing-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    background: var(--graphite-700);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.9rem 1.25rem;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--platinum);
    list-style-position: outside;
}

.faq-item p {
    margin: 0.75rem 0 0;
    color: #c8c8c8;
    line-height: 1.6;
}

/* ---------- Блок «Почему я» ---------- */
.why-me {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    padding: 1.5rem;
}

/* ---------- Кейсы ---------- */
.case-result-block {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--gold);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.5;
}

.case-description {
    line-height: 1.7;
    color: #d8d8d8;
}

.case-service-link {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(212, 175, 55, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    line-height: 1.6;
}

/* ---------- Контент статей ---------- */
.article-content {
    line-height: 1.75;
    color: #ddd;
}

.article-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--gold);
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
}

.article-content h3 {
    color: var(--platinum);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.article-content h4 {
    color: var(--platinum);
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
}

.article-content p {
    margin: 0.75rem 0;
}

.article-content ul,
.article-content ol {
    margin: 0.75rem 0 0.75rem 1.5rem;
    padding: 0;
}

.article-content li {
    margin: 0.35rem 0;
}

.article-content a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Шапка ---------- */
.appbar-brand {
    color: inherit;
    text-decoration: none;
}

.appbar-slogan {
    margin-left: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* ---------- Подвал ---------- */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

.footer-links a {
    color: #c8c8c8;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.contact-link {
    color: inherit;
    text-decoration: none;
}

.contact-link:hover {
    color: var(--gold);
}

/* ---------- Формы ---------- */
.consultation-form {
    padding: 1.5rem;
}

.consultation-anchor {
    scroll-margin-top: 90px;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none;
}

.home-consultation {
    max-width: 720px;
    margin-inline: auto;
}

/* ---------- Адаптив для новых блоков ---------- */
@media (max-width: 599.98px) {
    .home-h1 {
        font-size: 1.9rem;
    }

    .service-h1 {
        font-size: 1.6rem;
    }

    .service-hero {
        padding: 2rem 1rem;
        margin: -1.5rem -0.75rem 1.5rem -0.75rem;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .appbar-slogan {
        display: none;
    }
}

