/* ============================================
   LuxTax 2025 - Tax Guide Translation Styles
   ============================================ */

body {
    counter-reset: guide-article;
}

.insight-article {
    counter-increment: guide-article;
}

.insight-article h2 {
    color: #b1261e;
    letter-spacing: -0.03em;
}

.insight-article h3 {
    color: #3b3b3b;
    border-top-color: #e8e1de;
}

.insight-header {
    align-items: center;
}

.insight-tag {
    background: #b1261e;
}

.insight-ref {
    border-color: #d8d2cf;
    color: #6c6764;
}

.insight-article {
    position: relative;
    overflow: hidden;
}

.insight-article::before {
    content: counter(guide-article);
    position: absolute;
    top: 26px;
    left: 26px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: #b1261e;
    color: white;
    font-size: 16px;
    font-weight: 700;
    border-radius: 2px;
    box-shadow: 0 6px 14px rgba(177, 38, 30, 0.16);
}

.insight-article::after {
    content: "";
    position: absolute;
    top: 44px;
    left: 76px;
    right: 36px;
    height: 1px;
    background: #d85f57;
}

.insight-header,
.insight-article h2,
.insight-article .insight-subtitle {
    position: relative;
    z-index: 1;
}

.insight-header {
    padding-left: 64px;
}

.insight-article h2,
.insight-article .insight-subtitle {
    padding-left: 64px;
}

.guide-hero-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.translation-note {
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f5f9ff 0%, #fff8ea 100%);
    box-shadow: var(--shadow-sm);
}

.translation-note p {
    margin-bottom: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
}

.guide-process {
    margin: 20px 0;
    display: grid;
    gap: 12px;
}

.guide-process-step {
    position: relative;
    padding: 16px 18px 16px 62px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}

.guide-process-step::before {
    content: attr(data-step);
    position: absolute;
    left: 18px;
    top: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-dark);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.guide-process-step strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-dark);
}

.guide-process-arrow {
    text-align: center;
    font-size: 24px;
    color: var(--accent-dark);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.guide-card {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fbfbfb 0%, #f5f7fa 100%);
}

.guide-card h4 {
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 15px;
}

.guide-card p,
.guide-card li {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
}

.guide-card ul {
    margin: 0 0 0 18px;
}

.field-map {
    display: grid;
    gap: 14px;
    margin: 18px 0;
}

.field-card {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-sm);
}

.field-card h4 {
    margin-bottom: 12px;
    color: var(--primary-dark);
    font-size: 16px;
}

.field-list {
    display: grid;
    gap: 10px;
}

.field-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.field-row:last-child {
    border-bottom: none;
}

.field-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf4fd;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.field-row p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
}

.mini-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 4px solid var(--accent);
    background: #fff8ea;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
}

.key-takeaway {
    background: linear-gradient(135deg, #fff6ea 0%, #fffaf4 100%);
    border-left-color: #e1a23b;
}

.insight-warning-banner {
    background: #fff1eb;
    border-color: #f0c0b4;
    border-left-color: #c94b2e;
}

.calc-example,
.guide-card,
.field-card,
.translation-note,
.key-takeaway,
.insight-warning-banner,
.insight-table,
.guide-process-step {
    break-inside: avoid;
}

@page {
    size: A4;
    margin: 14mm 12mm 16mm;
}

@media print {
    html,
    body {
        background: white;
    }

    body {
        display: block;
        color: #1f1f1f;
        font-size: 11pt;
        line-height: 1.45;
    }

    .navbar,
    .insights-sidebar,
    .guide-hero-actions {
        display: none !important;
    }

    .main-content,
    .insights-section,
    .container,
    .insights-layout,
    .docs-content {
        display: block;
        max-width: none;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .hero.hero-insights {
        background: white !important;
        color: #222;
        text-align: left;
        padding: 0 0 10mm;
        margin: 0 0 8mm;
        border-bottom: 2px solid #c43a31;
    }

    .hero h1 {
        color: #b1261e;
        font-size: 24pt;
        margin-bottom: 5mm;
    }

    .hero-subtitle {
        max-width: none;
        color: #444;
        opacity: 1;
        margin: 0 0 4mm;
        font-size: 11pt;
    }

    .hero-badges {
        justify-content: flex-start;
    }

    .badge {
        color: #6d2a22;
        background: #fff3ee;
        border-color: #efc9c0;
    }

    .insight-article {
        page-break-before: always;
        break-before: page;
        border: none;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 14mm 0 0;
    }

    .insight-article:first-of-type {
        page-break-before: auto;
        break-before: auto;
        padding-top: 0;
    }

    .insight-article::before {
        top: 0;
        left: 0;
        width: 11mm;
        height: 11mm;
        font-size: 10pt;
        box-shadow: none;
    }

    .insight-article::after {
        top: 5.6mm;
        left: 15mm;
        right: 0;
        background: #cf4c43;
    }

    .insight-header {
        padding-left: 15mm;
        margin-bottom: 4mm;
    }

    .insight-article h2,
    .insight-article .insight-subtitle {
        padding-left: 0;
    }

    .insight-article h2 {
        font-size: 22pt;
        line-height: 1.12;
        margin-top: 8mm;
        margin-bottom: 4mm;
        color: #b1261e;
    }

    .insight-article .insight-subtitle {
        font-size: 11pt;
        color: #555;
        font-style: normal;
        margin-bottom: 5mm;
    }

    .insight-article h3 {
        font-size: 12pt;
        padding-top: 3mm;
        margin-top: 6mm;
        margin-bottom: 2.5mm;
        border-top: none;
        color: #444;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    .insight-article p,
    .insight-article li,
    .field-row p,
    .guide-card p,
    .guide-card li {
        font-size: 10.5pt;
        line-height: 1.45;
    }

    .guide-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4mm;
    }

    .guide-card,
    .field-card,
    .calc-example,
    .translation-note,
    .key-takeaway,
    .insight-warning-banner {
        box-shadow: none;
        border: 1px solid #ddd5d2;
        background: #fcfcfc;
    }

    .field-badge {
        background: #f4e6e4;
        color: #8f231d;
    }

    .footer {
        margin-top: 8mm;
        background: white;
        color: #666;
        padding: 0;
    }

    .footer a {
        color: #8f231d;
    }
}

@media (max-width: 900px) {
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .guide-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
