/* =============================================
   Article 3-Column Layout
   ============================================= */

/* Top section: breadcrumbs, header, featured image — full width within max-width */
.article-top {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 2-column grid: [Content] [AI Chat]
   TOC is now a sliding sidebar drawer triggered by a button */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    align-items: start;
}

/* TOC Trigger Button (Vertical text on the left) */
.toc-trigger {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 20px 6px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 0 8px 8px 0;
    font-family: var(--font-main, sans-serif);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    writing-mode: vertical-lr;
    /* Vertical text */
    text-orientation: mixed;
    transition: background 0.3s ease, padding 0.3s ease;
}

.toc-trigger span {
    transform: rotate(180deg);
}

.toc-trigger:hover {
    background: #222222;
    padding-left: 10px;
}

/* TOC Overlay */
.toc-overlay-v2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.toc-overlay-v2.active {
    opacity: 1;
    visibility: visible;
}

/* Reposition Left Sidebar as Drawer */
.article-sidebar--left {
    position: fixed !important;
    top: 0 !important;
    left: -320px;
    /* Initially hidden */
    width: 280px;
    height: 100vh !important;
    max-height: 100vh !important;
    background: #ffffff;
    z-index: 999;
    padding: 30px 20px;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    overflow-y: auto;
}

body.toc-open .article-sidebar--left {
    transform: translateX(320px);
}

body.toc-open {
    overflow: hidden;
    /* Prevent background scroll when TOC is open */
}

/* Sidebar: Right sidebar remains sticky on desktop */
.article-sidebar--right {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    /* Thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(207, 167, 76, 0.25) transparent;
}

.article-sidebar::-webkit-scrollbar {
    width: 4px;
}

.article-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.article-sidebar::-webkit-scrollbar-thumb {
    background: rgba(207, 167, 76, 0.25);
    border-radius: 10px;
}

/* Main content column */
.article-main {
    min-width: 0;
    /* prevent grid blowout */
}

/* =============================================
   Responsive Breakpoints
   ============================================= */

/* Tablet: 1 column grid, hide right sidebar */
@media (max-width: 1200px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-sidebar--right {
        display: none;
    }
}

/* Mobile: hide trigger button, use bottom bar TOC (existing logic) */
@media (max-width: 992px) {
    .toc-trigger {
        display: none;
    }

    .article-layout {
        padding: 0 20px;
    }

    .article-top {
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    .article-layout {
        padding: 0 16px;
    }

    .article-top {
        padding: 0 16px;
    }
}

/* =============================================
   Table of Contents (generated by js/article-toc.js)
   ============================================= */
.article-toc {
    font-family: var(--font-main);
    font-size: 13px;
    line-height: 1.5;
    padding: 8px 0 16px;
}

.article-toc:empty {
    display: none;
}

.article-toc__title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-dark, #232228);
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-bottom: 1px solid rgba(35, 34, 40, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc__item {
    margin-bottom: 1px;
}

.article-toc__item--h3 {
    padding-left: 14px;
}

.article-toc__item--h4 {
    padding-left: 28px;
}

.article-toc__link {
    display: block;
    padding: 4px 8px 4px 12px;
    color: var(--color-text-secondary-on-light, #4c4c4c);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border-radius: 0 4px 4px 0;
    word-break: break-word;
}

.article-toc__link:hover {
    color: var(--color-text-dark, #232228);
    background: rgba(227, 195, 122, 0.08);
}

.article-toc__link.active {
    color: var(--color-accent-on-light, #b5891f);
    border-left-color: var(--color-primary, #e3c37a);
    background: rgba(227, 195, 122, 0.1);
    font-weight: 500;
}

/* =============================================
   Sidebar Services (placeholder for Prompt 05)
   ============================================= */
.sidebar-services {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(35, 34, 40, 0.08);
}

.sidebar-services__title {
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-medium, #b1b1b1);
    margin-bottom: 8px;
}

.sidebar-services__list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-services__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text-dark, #232228);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-services__item:hover {
    background: rgba(227, 195, 122, 0.1);
    border-color: rgba(227, 195, 122, 0.25);
}

.sidebar-services__name {
    flex: 1;
    line-height: 1.3;
}

.sidebar-services__arrow {
    flex-shrink: 0;
    color: var(--color-primary, #e3c37a);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.sidebar-services__item:hover .sidebar-services__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Right sidebar variant: no top border, different spacing */
.sidebar-services--right {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Service card with image (clickable widget) */
.sidebar-services__card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid rgba(227, 195, 122, 0.2);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 8px;
}

.sidebar-services__card:hover {
    box-shadow: 0 6px 20px rgba(46, 35, 7, 0.14);
    transform: translateY(-2px);
    border-color: rgba(227, 195, 122, 0.45);
}

.sidebar-services__card-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.sidebar-services__card-name {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-dark, #232228);
    line-height: 1.35;
}

/* =============================================
   Article content images — constrained to
   central column, responsive scaling
   ============================================= */
.article-content img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 24px auto;
    object-fit: contain;
}

/* =============================================
   Mobile TOC: bottom bar + drawer + overlay
   ============================================= */

/* Bar: hidden by default, shown via JS + media query */
.toc-mobile-bar {
    display: none;
}

@media (max-width: 992px) {
    .toc-mobile-bar.toc-mobile-bar--visible {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9990;
        background: var(--color-background-dark, #232228);
        border-top: 2px solid var(--color-primary, #e3c37a);
        padding: 14px 16px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    /* Push floating buttons above the bar */
    .floating-contact-btn {
        bottom: 85px !important;
    }

    .floating-lang-btn {
        bottom: 155px !important;
    }

    .floating-contact-menu {
        bottom: 150px !important;
    }
}

@media (max-width: 768px) {
    .toc-mobile-bar.toc-mobile-bar--visible {
        padding: 12px 14px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .floating-contact-btn {
        bottom: 70px !important;
    }

    .floating-lang-btn {
        bottom: 128px !important;
    }

    .floating-contact-menu {
        bottom: 128px !important;
    }
}

.toc-mobile-bar__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    color: var(--color-text-light, #f8f2e5);
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    -webkit-tap-highlight-color: transparent;
}

.toc-mobile-bar__btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--color-primary, #e3c37a);
}

.toc-mobile-bar__btn span {
    flex: 1;
    text-align: left;
}

.toc-mobile-bar__arrow {
    transition: transform 0.3s ease;
}

/* Drawer */
.toc-mobile-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99991;
    background: var(--color-background-light, #faf8f4);
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
}

.toc-mobile-drawer.open {
    transform: translateY(0);
}

.toc-mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(35, 34, 40, 0.08);
    flex-shrink: 0;
}

.toc-mobile-drawer__handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgba(35, 34, 40, 0.15);
    border-radius: 2px;
}

.toc-mobile-drawer__title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark, #232228);
    flex: 1;
}

.toc-mobile-drawer__consult-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid var(--color-primary, #e3c37a);
    background: linear-gradient(135deg, rgba(227, 195, 122, 0.15) 0%, rgba(227, 195, 122, 0.08) 100%);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-dark, #232228);
    cursor: pointer;
    margin-right: 8px;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s;
}

.toc-mobile-drawer__consult-btn:active {
    transform: scale(0.96);
}

.toc-mobile-drawer__consult-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-primary, #e3c37a);
    flex-shrink: 0;
}

.toc-mobile-drawer__close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(35, 34, 40, 0.06);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: var(--color-text-dark, #232228);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.toc-mobile-drawer__close:hover {
    background: rgba(35, 34, 40, 0.12);
}

.toc-mobile-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 16px;
    -webkit-overflow-scrolling: touch;
}

.toc-mobile-drawer__body .article-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-mobile-drawer__body .article-toc__link {
    padding: 10px 12px 10px 14px;
    font-size: 15px;
    border-left-width: 3px;
}

.toc-mobile-drawer__body .article-toc__link.active {
    color: var(--color-accent-on-light, #b5891f);
    border-left-color: var(--color-primary, #e3c37a);
    background: rgba(227, 195, 122, 0.1);
    font-weight: 600;
}

.toc-mobile-drawer__footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(35, 34, 40, 0.1);
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}

.toc-mobile-drawer__ai-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3a2e1a 0%, #2f2414 100%);
    color: #f8f2e5;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.toc-mobile-drawer__ai-btn:hover {
    opacity: 0.9;
}

.toc-mobile-drawer__ai-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Mobile drawer: linked services */
.toc-mobile-drawer__services {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(35, 34, 40, 0.08);
}

.toc-mobile-drawer__services-title {
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-medium, #b1b1b1);
    margin-bottom: 8px;
    padding: 0 4px;
}

.toc-mobile-drawer__service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text-dark, #232228);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.toc-mobile-drawer__service-item:hover,
.toc-mobile-drawer__service-item:active {
    background: rgba(227, 195, 122, 0.1);
}

.toc-mobile-drawer__service-item span {
    flex: 1;
    line-height: 1.3;
}

.toc-mobile-drawer__service-item svg {
    flex-shrink: 0;
    color: var(--color-primary, #e3c37a);
}

/* Overlay */
.toc-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toc-mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =============================================
   Document-specific styles
   ============================================= */

/* Description block */
.document-description {
    background: linear-gradient(135deg, #f8f6f2 0%, #f0ece4 100%);
    padding: 25px 30px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.document-description h2 {
    font-family: var(--font-display);
    font-size: 22px;
    margin: 0 0 12px;
    color: var(--color-background-dark);
}

.document-description p {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin: 0;
}

/* =============================================
   Article FAQ Accordion (Shortcode)
   ============================================= */
.article-faq-container {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
}

.article-faq-item {
    border-bottom: 1px solid #ddd;
}

.article-faq-item:last-child {
    border-bottom: none;
}

.article-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.article-faq-question span[itemprop="name"] {
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 600;
    color: #232228;
    flex: 1;
    padding-right: 16px;
    line-height: 1.4;
}

.article-faq-toggle {
    font-size: 24px;
    color: var(--color-primary, #e3c37a);
    font-weight: 300;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.article-faq-item.open .article-faq-toggle {
    transform: rotate(45deg);
}

.article-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0;
}

.article-faq-item.open .article-faq-answer {
    max-height: 800px;
    padding: 0 0 22px;
}

.article-faq-answer p {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

@media (max-width: 768px) {
    .article-faq-container {
        padding: 20px;
    }

    .article-faq-question span[itemprop="name"] {
        font-size: 16px;
    }
}

/* Numbered lists for article steps and errors */
.article-steps,
.article-errors {
    counter-reset: item;
    list-style: none;
    margin: 20px 0 30px;
    padding: 0;
}

.article-steps li,
.article-errors li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.article-steps li::before,
.article-errors li::before {
    counter-increment: item;
    content: counter(item);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #fff3cd;
    color: #8a6d3b;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.article-steps p,
.article-errors p {
    margin: 0;
}

/* Downloads sidebar (right sidebar for documents) */
.sidebar-downloads {
    margin-bottom: 24px;
}

.sidebar-downloads__title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-background-dark, #232228);
    margin-bottom: 12px;
    line-height: 1.3;
}

.sidebar-downloads__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-downloads__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--color-background-dark, #232228);
    color: var(--color-text-light, #f0ede6);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sidebar-downloads__item:hover {
    background: var(--color-primary, #e3c37a);
    color: var(--color-background-dark, #232228);
    border-color: var(--color-primary, #e3c37a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 195, 122, 0.3);
}

.sidebar-downloads__icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary, #e3c37a);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-background-dark, #232228);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar-downloads__item:hover .sidebar-downloads__icon {
    background: var(--color-background-dark, #232228);
    color: var(--color-primary, #e3c37a);
}

.sidebar-downloads__info {
    flex: 1;
    min-width: 0;
}

.sidebar-downloads__name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-downloads__hint {
    font-size: 11px;
    opacity: 0.7;
}

.sidebar-downloads__arrow {
    flex-shrink: 0;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.sidebar-downloads__item:hover .sidebar-downloads__arrow {
    opacity: 1;
    transform: translateY(2px);
}

/* Disclaimer / Important notice */
.document-disclaimer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(227, 195, 122, 0.1);
    border-radius: 10px;
}

.document-disclaimer p {
    margin: 0;
    color: var(--color-background-dark, #232228);
    font-size: 14px;
    line-height: 1.6;
}

/* Hide floating lang button on article pages (lang is in TOC now) */
.article-layout~.floating-lang-btn,
body.page-article .floating-lang-btn {
    display: none !important;
}

/* =============================================
   Sidebar Language Switcher (desktop)
   ============================================= */
.sidebar-lang-switcher {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(227, 195, 122, 0.08);
    border: 1px solid rgba(227, 195, 122, 0.2);
}

.sidebar-lang-switcher__link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-text-dark, #232228);
    font-size: 12px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.sidebar-lang-switcher__link:hover {
    opacity: 0.75;
}

.sidebar-lang-switcher__flag {
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.sidebar-lang-switcher__flag--active {
    opacity: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-lang-switcher__sep {
    font-size: 11px;
    color: #999;
}

.sidebar-lang-switcher__label {
    font-size: 11px;
    color: #8a7450;
    margin-left: 2px;
}

/* =============================================
   Mobile Drawer Language Switcher
   ============================================= */
.toc-mobile-drawer__lang {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(227, 195, 122, 0.1);
    border: 1px solid rgba(227, 195, 122, 0.25);
}

.toc-mobile-drawer__lang-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text-dark, #232228);
}

.toc-mobile-drawer__lang-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.45;
    transition: opacity 0.2s;
    font-size: 13px;
    font-weight: 700;
    color: #8a7450;
}

.toc-mobile-drawer__lang-flag svg {
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toc-mobile-drawer__lang-flag--active {
    opacity: 1;
    color: var(--color-text-dark, #232228);
}

.toc-mobile-drawer__lang-flag--active svg {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toc-mobile-drawer__lang-sep {
    font-size: 14px;
    color: #bbb;
}

/* =============================================
   Sidebar Consultation Banner (desktop only)
   ============================================= */
.sidebar-consult-banner {
    margin-top: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 1px solid rgba(227, 195, 122, 0.25);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sidebar-consult-banner__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.sidebar-consult-banner__trigger:hover {
    background: rgba(227, 195, 122, 0.08);
}

.sidebar-consult-banner__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e3c37a 0%, #d4a843 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-consult-banner__icon svg {
    width: 20px;
    height: 20px;
    stroke: #1a1a2e;
}

.sidebar-consult-banner__text {
    flex: 1;
    min-width: 0;
}

.sidebar-consult-banner__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.sidebar-consult-banner__sub {
    display: block;
    font-size: 11px;
    color: #e3c37a;
    margin-top: 2px;
    font-weight: 400;
}

.sidebar-consult-banner__chevron {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.sidebar-consult-banner.open .sidebar-consult-banner__chevron {
    transform: rotate(180deg);
}

/* Expandable form area */
.sidebar-consult-banner__form-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 14px;
}

.sidebar-consult-banner.open .sidebar-consult-banner__form-wrap {
    max-height: 400px;
    padding: 0 14px 14px;
}

.sidebar-consult-banner__field {
    margin-bottom: 10px;
}

.sidebar-consult-banner__field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.sidebar-consult-banner__field input,
.sidebar-consult-banner__field textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid rgba(227, 195, 122, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.sidebar-consult-banner__field input::placeholder,
.sidebar-consult-banner__field textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.sidebar-consult-banner__field input:focus,
.sidebar-consult-banner__field textarea:focus {
    border-color: #e3c37a;
    box-shadow: 0 0 0 2px rgba(227, 195, 122, 0.15);
}

.sidebar-consult-banner__field textarea {
    resize: vertical;
    min-height: 60px;
}

.sidebar-consult-banner__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(135deg, #e3c37a 0%, #d4a843 100%);
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}

.sidebar-consult-banner__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(227, 195, 122, 0.4);
}

.sidebar-consult-banner__submit:active {
    transform: translateY(0);
}

.sidebar-consult-banner__submit svg {
    width: 15px;
    height: 15px;
    stroke: #1a1a2e;
}

.sidebar-consult-banner__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sidebar-consult-banner__msg {
    margin-top: 8px;
    font-size: 12px;
    text-align: center;
    min-height: 0;
}

.sidebar-consult-banner__msg.success {
    color: #4ade80;
}

.sidebar-consult-banner__msg.error {
    color: #f87171;
}

/* Hide on mobile/tablet — only show on desktop with right sidebar */
@media (max-width: 1199px) {
    .sidebar-consult-banner {
        display: none;
    }
}

/* =============================================
   Mobile Consultation Modal
   ============================================= */
.mobile-consult-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-consult-modal.active {
    display: flex;
}

.mobile-consult-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mobile-consult-modal__content {
    position: relative;
    z-index: 1;
    background: var(--color-background-light, #faf8f4);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-consult-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(35, 34, 40, 0.1);
}

.mobile-consult-modal__header h3 {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-dark, #232228);
    margin: 0;
}

.mobile-consult-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(35, 34, 40, 0.06);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: var(--color-text-dark, #232228);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s;
}

.mobile-consult-modal__close:active {
    background: rgba(35, 34, 40, 0.15);
}

.mobile-consult-modal__form {
    padding: 20px;
}

.mobile-consult-modal__field {
    margin-bottom: 16px;
}

.mobile-consult-modal__field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-dark, #232228);
    margin-bottom: 6px;
}

.mobile-consult-modal__field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(35, 34, 40, 0.15);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text-dark, #232228);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.mobile-consult-modal__field input:focus {
    border-color: var(--color-primary, #e3c37a);
    box-shadow: 0 0 0 3px rgba(227, 195, 122, 0.15);
}

.mobile-consult-modal__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e3c37a 0%, #d4a843 100%);
    color: var(--color-background-dark, #232228);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-consult-modal__submit:active {
    transform: scale(0.97);
}

.mobile-consult-modal__submit svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-background-dark, #232228);
}

.mobile-consult-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mobile-consult-modal__msg {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
    min-height: 0;
}

.mobile-consult-modal__msg.success {
    color: #16a34a;
}

.mobile-consult-modal__msg.error {
    color: #dc2626;
}

/* Downloads in main content (mobile fallback) */
.document-downloads-mobile {
    display: none;
}

@media (max-width: 1199px) {
    .document-downloads-mobile {
        display: block;
        margin: 30px 0;
    }

    .document-downloads-mobile .sidebar-downloads__title {
        font-size: 20px;
        text-align: center;
        margin-bottom: 16px;
    }
}

/* =============================================
   БЛОК 1: ЖЕЛТЫЕ ФОРМЫ (CTA)
   ============================================= */
.cta-yellow {
    background: #FFD700;
    border-radius: 24px;
    padding: 40px;
    margin: 50px 0;
    color: #1a1a1d;
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cta-yellow-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.cta-yellow-desc {
    font-size: 16px;
    margin: 0 0 25px 0;
    opacity: 0.85;
    max-width: 500px;
}

.tg-input-group {
    position: relative;
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 40px;
    display: flex;
    align-items: center;
    padding: 6px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tg-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 20px;
    font-size: 16px;
    color: #000;
    outline: none;
    border-radius: 40px;
}

.tg-input::placeholder {
    color: #aaa;
}

.tg-submit-btn {
    position: absolute;
    right: 6px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a1a1d;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tg-submit-btn:hover {
    transform: scale(1.05);
}

.tg-submit-btn svg {
    width: 20px;
    height: 20px;
    fill: #FFD700;
    margin-left: -2px;
}

.multi-input-form {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cta-yellow-msg {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.cta-yellow-msg.success {
    color: #16a34a;
}

.cta-yellow-msg.error {
    color: #dc2626;
}

/* =============================================
   БЛОК 2: ЮРИСТЫ LAWCRAFT (200px Круг + Центровка + Черный текст)
   ============================================= */
.team-insert {
    margin: 0;
    /* Убраны маргины */
    padding: 20px 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.team-insert-title {
    text-align: left;
    color: #000000;
    /* Черный цвет */
    font-size: 26px;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: inherit;
}

.team-scroll-track {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 0 0 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.team-scroll-track::-webkit-scrollbar {
    display: none;
}

.team-card {
    flex: 0 0 200px;
    /* Уменьшили до 200px */
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Центрируем кружочки и текст */
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
}

.avatar-wrap {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    margin-bottom: 15px;
    border: 2px solid #e3c37a;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.avatar-placeholder {
    color: #999;
    font-size: 13px;
    text-align: center;
}

.team-name {
    color: #000000;
    /* Черный цвет */
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center;
    transition: color 0.3s ease;
}

.team-card:hover .team-name {
    color: #e3c37a;
}

.team-role {
    color: #000000;
    /* Черный цвет */
    font-size: 13px;
    text-align: center;
    line-height: 1.4;
    max-width: 100%;
    opacity: 0.8;
}