/* ============================================================
   format_docx.css
   Word / DOCX translation landing page.
   Pure CSS — no Tailwind processing required.
   Color scheme: Blue (Word brand) vs Green (Excel brand).
   ============================================================ */

/* ── Scroll reveal ──────────────────────────────────────── */
.reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-item.revealed { opacity: 1; transform: translateY(0); }
.reveal-group .reveal-item:nth-child(1) { transition-delay: 0s; }
.reveal-group .reveal-item:nth-child(2) { transition-delay: 0.07s; }
.reveal-group .reveal-item:nth-child(3) { transition-delay: 0.14s; }
.reveal-group .reveal-item:nth-child(4) { transition-delay: 0.21s; }
.reveal-group .reveal-item:nth-child(5) { transition-delay: 0.28s; }
.reveal-group .reveal-item:nth-child(6) { transition-delay: 0.35s; }
.reveal-group .reveal-item:nth-child(7) { transition-delay: 0.42s; }
.reveal-group .reveal-item:nth-child(8) { transition-delay: 0.49s; }

/* ── Hero ───────────────────────────────────────────────── */
.doc-hero {
    background: linear-gradient(135deg, #030712 0%, #0b1730 50%, #030712 100%);
    min-height: 100vh;
}
.doc-hero-copy {
    opacity: 0;
    transform: translateY(20px);
    animation: docCopyIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}
@keyframes docCopyIn { to { opacity: 1; transform: translateY(0); } }

.doc-hero-visual {
    position: relative;
    opacity: 0;
    transform: translateX(28px);
    animation: docVisualIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}
@keyframes docVisualIn { to { opacity: 1; transform: translateX(0); } }

/* ── Background orbs ────────────────────────────────────── */
.doc-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}
.doc-orb--blue   { width: 580px; height: 580px; top: 5%;   left: 0;    background: rgba(59,130,246,0.10); animation: docOrbA 14s ease-in-out infinite; }
.doc-orb--violet { width: 420px; height: 420px; bottom: 0; right: 5%;  background: rgba(139,92,246,0.08); animation: docOrbB 17s ease-in-out infinite; }
.doc-orb--indigo { width: 320px; height: 320px; top: 40%;  left: 55%;  background: rgba(99,102,241,0.06); animation: docOrbA 11s ease-in-out infinite 2s; }
@keyframes docOrbA { 0%,100% { transform: translate(0,0); }  50% { transform: translate(25px,-25px); } }
@keyframes docOrbB { 0%,100% { transform: translate(0,0); }  50% { transform: translate(-20px,18px); } }

/* ── Gradient text ──────────────────────────────────────── */
.doc-gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Format badges (.docx, .doc …) ─────────────────────── */
.doc-format-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: ui-monospace, monospace;
    font-weight: 600;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.3);
    color: #60a5fa;
}

/* ── Trust pills ────────────────────────────────────────── */
.doc-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
}

/* ── Buttons ────────────────────────────────────────────── */
.doc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.doc-btn--primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 0 30px rgba(59,130,246,0.4);
}
.doc-btn--primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 0 48px rgba(59,130,246,0.6);
    transform: translateY(-2px);
}
.doc-btn--secondary {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.15);
}
.doc-btn--secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.25);
    color: white;
}
.doc-btn--cta {
    background: white;
    color: #1e3a8a;
    font-weight: 700;
    padding: 16px 36px;
    font-size: 16px;
    box-shadow: 0 0 40px rgba(255,255,255,0.15);
}
.doc-btn--cta:hover {
    background: #eff6ff;
    box-shadow: 0 0 60px rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.doc-btn--cta-ghost {
    background: transparent;
    color: #93c5fd;
    border: 1px solid rgba(147,197,253,0.3);
    padding: 16px 36px;
    font-size: 16px;
}
.doc-btn--cta-ghost:hover {
    background: rgba(147,197,253,0.08);
    border-color: rgba(147,197,253,0.5);
}

/* ── Floating badges ────────────────────────────────────── */
.doc-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(8,18,36,0.88);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.doc-float--tr { top: -12px; right: -12px; animation: docFloat 4s ease-in-out infinite; }
.doc-float--bl { bottom: 24px; left: -20px; animation: docFloat 4.5s ease-in-out infinite 1.5s; }
@keyframes docFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ═════════════════════════════════════════════════════
   WORD DOCUMENT WINDOW
═════════════════════════════════════════════════════ */
.doc-window {
    background: #e8edf2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 32px 80px rgba(0,0,0,0.55),
        0 0 70px rgba(59,130,246,0.12);
    transform: perspective(1200px) rotateY(-2deg);
    transition: transform 0.6s ease;
}
.doc-hero-visual:hover .doc-window { transform: perspective(1200px) rotateY(-0.3deg); }

/* Title bar — Word blue */
.doc-titlebar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #1e3a5f;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    gap: 0;
    min-height: 38px;
}
.doc-dots { display: flex; gap: 5px; flex-shrink: 0; }
.doc-dots span { width: 10px; height: 10px; border-radius: 50%; }
.doc-dots span:nth-child(1) { background: #ef4444; }
.doc-dots span:nth-child(2) { background: #f59e0b; }
.doc-dots span:nth-child(3) { background: #22c55e; }

.doc-filename {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-left: 10px;
    white-space: nowrap;
}

.doc-section-counter {
    font-size: 11px;
    font-family: ui-monospace, monospace;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}

.doc-status {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.45);
    transition: all 0.3s ease;
    white-space: nowrap;
}
.doc-status--translating { background: rgba(245,158,11,0.2); color: #fbbf24; }
.doc-status--complete    { background: rgba(59,130,246,0.25); color: #93c5fd; }

/* Ribbon — minimal Word toolbar illusion */
.doc-ribbon {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px 10px;
    background: #f3f6f9;
    border-bottom: 1px solid #d1d9e0;
}
.doc-rb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    background: transparent;
    border: 1px solid transparent;
    cursor: default;
    transition: background 0.15s;
}
.doc-rb-btn:hover { background: rgba(0,0,0,0.06); }
.doc-rb-sep {
    width: 1px;
    height: 16px;
    background: #d1d5db;
    margin: 0 4px;
}
.doc-rb-style {
    font-size: 10px;
    color: #374151;
    padding: 2px 8px;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    background: white;
    white-space: nowrap;
}
.doc-rb-lang {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.25);
    color: #1d4ed8;
    opacity: 0;
    transition: opacity 0.4s ease;
    white-space: nowrap;
}
.doc-rb-lang.visible { opacity: 1; }

/* Page wrap — paper-on-desk look */
.doc-page-wrap {
    padding: 12px 14px 8px;
    background: #e2e8ee;
}

/* The white document page */
.doc-page {
    background: white;
    border-radius: 2px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.05);
    padding: 20px 22px 16px;
    min-height: 220px;
}

/* Document header (decorative) */
.doc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.doc-page-header-text {
    font-size: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cbd5e1;
}

/* ── Document sections (the animated elements) ───────────── */
.doc-section {
    position: relative;
    border-radius: 4px;
    padding: 4px 6px;
    margin: 0 -6px;
    transition: background 0.3s ease;
    overflow: hidden;
}

/* Shimmer pseudo-element */
.doc-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(59,130,246,0.25) 40%,
        rgba(99,102,241,0.35) 50%,
        rgba(59,130,246,0.25) 60%,
        transparent 100%
    );
    transform: translateX(-110%);
    pointer-events: none;
    border-radius: 4px;
}

.doc-section--translating {
    background: rgba(59,130,246,0.06);
}
.doc-section--translating::after {
    animation: docShimmer 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes docShimmer {
    0%   { transform: translateX(-110%); }
    100% { transform: translateX(110%); }
}

.doc-section--done {
    background: rgba(59,130,246,0.08);
    animation: docDoneFade 0.7s ease forwards;
}
@keyframes docDoneFade {
    0%   { background: rgba(59,130,246,0.12); }
    100% { background: rgba(59,130,246,0.03); }
}

/* ── Section content ─────────────────────────────────────── */
.doc-section-inner {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.doc-check {
    font-size: 9px;
    font-weight: 800;
    color: #22c55e;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 12px;
}
.doc-check.visible {
    opacity: 1;
    transform: scale(1);
}

/* H1 style — Word default heading 1 */
.doc-h1-text {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.3;
    transition: opacity 0.2s ease;
}

/* H2 style — Word default heading 2 */
.doc-h2-text {
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1.3;
    border-bottom: 1px solid #bfdbfe;
    padding-bottom: 2px;
    margin-bottom: 0;
    transition: opacity 0.2s ease;
}

/* Paragraph */
.doc-p-text {
    font-size: 10px;
    color: #374151;
    line-height: 1.65;
    transition: opacity 0.2s ease;
}

/* Blinking cursor while typing */
.doc-typing-cursor::after {
    content: '|';
    color: #2563eb;
    animation: docBlink 0.65s step-end infinite;
    margin-left: 1px;
}
@keyframes docBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* Section dividers */
.doc-rule {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0 6px;
}
.doc-section-gap { height: 8px; }

/* Document footer (decorative) */
.doc-page-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
}
.doc-page-footer-text {
    font-size: 8px;
    color: #cbd5e1;
}

/* Progress bar */
.doc-progress { padding: 7px 12px 6px; background: #f0f4f8; border-top: 1px solid #d1d9e0; }
.doc-progress__track { height: 4px; background: #d1d9e0; border-radius: 999px; overflow: hidden; }
.doc-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #818cf8);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}
.doc-progress__labels { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.doc-progress__text { font-size: 10px; color: #94a3b8; }
.doc-progress__pct  { font-size: 10px; font-weight: 700; color: #3b82f6; font-family: ui-monospace, monospace; }

/* Download bar */
.doc-download-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
}
.doc-download-bar.visible {
    display: flex;
    animation: docSlideUp 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes docSlideUp { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.doc-download-bar__filename { font-size: 11px; color: #1d4ed8; font-weight: 500; }
.doc-download-bar__btn {
    font-size: 11px;
    font-weight: 700;
    color: #1e3a8a;
    background: #bfdbfe;
    padding: 3px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    animation: docDlPulse 1.8s ease-out 0.5s infinite;
}
.doc-download-bar__btn:hover { background: #93c5fd; }
@keyframes docDlPulse {
    0%   { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    70%  { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* ═════════════════════════════════════════════════════
   SECTION BADGES
═════════════════════════════════════════════════════ */
.doc-badge-section {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.3);
    color: #60a5fa;
}
.doc-badge-section--violet { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.3); color: #c4b5fd; }
.doc-badge-section--green  { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #34d399; }

/* ═════════════════════════════════════════════════════
   HOW IT WORKS — STEP CARDS
═════════════════════════════════════════════════════ */
.doc-step-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.doc-step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.3);
    border-color: rgba(59,130,246,0.3);
}
.doc-step-card--offset { margin-top: 28px; }
@media (max-width: 1023px) { .doc-step-card--offset { margin-top: 0; } }

.doc-step-num {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 84px;
    font-weight: 900;
    color: rgba(255,255,255,0.04);
    line-height: 1;
    user-select: none;
}
.doc-step-icon {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.doc-step-icon--blue   { background: rgba(59,130,246,0.2);   border: 1px solid rgba(59,130,246,0.4);   color: #60a5fa; }
.doc-step-icon--violet { background: rgba(139,92,246,0.2);   border: 1px solid rgba(139,92,246,0.4);   color: #a78bfa; }
.doc-step-icon--indigo { background: rgba(99,102,241,0.2);   border: 1px solid rgba(99,102,241,0.4);   color: #818cf8; }

.doc-step-title { font-size: 18px; font-weight: 700; color: white; margin-bottom: 8px; }
.doc-step-desc  { font-size: 13px; line-height: 1.65; color: #94a3b8; }

/* ═════════════════════════════════════════════════════
   FORMATTING PRESERVED GRID
═════════════════════════════════════════════════════ */
.doc-preserve-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 640px) { .doc-preserve-grid { grid-template-columns: repeat(4, 1fr); } }

.doc-preserve-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.doc-preserve-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,0.3);
    box-shadow: 0 16px 32px rgba(59,130,246,0.08);
}
.doc-preserve-icon {
    font-size: 26px;
    margin-bottom: 10px;
    line-height: 1;
    color: #93c5fd;
}
.doc-preserve-label {
    font-size: 12px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}
.doc-preserve-sub {
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
}

/* ═════════════════════════════════════════════════════
   USE CASE CARDS
═════════════════════════════════════════════════════ */
.doc-uc-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 28px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.doc-uc-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59,130,246,0.25);
    box-shadow: 0 20px 40px rgba(59,130,246,0.08);
}
.doc-uc-emoji { font-size: 32px; margin-bottom: 16px; line-height: 1; }
.doc-uc-title { font-size: 17px; font-weight: 700; color: white; margin-bottom: 8px; }
.doc-uc-desc  { font-size: 13px; color: #94a3b8; line-height: 1.65; margin-bottom: 16px; }
.doc-uc-file  {
    font-size: 11px;
    font-family: ui-monospace, monospace;
    color: #60a5fa;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* ═════════════════════════════════════════════════════
   AI ENGINE CARDS
═════════════════════════════════════════════════════ */
.doc-engine-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.doc-engine-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); }
.doc-engine-logo {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.doc-engine-logo--claude { background: rgba(251,146,60,0.2);  border: 1px solid rgba(251,146,60,0.3);  color: #fdba74; }
.doc-engine-logo--openai { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #e2e8f0; }
.doc-engine-logo--deepl  { background: rgba(59,130,246,0.15);  border: 1px solid rgba(59,130,246,0.3);  color: #93c5fd; }
.doc-engine-logo--google { background: rgba(239,68,68,0.12);   border: 1px solid rgba(239,68,68,0.25);  color: #fca5a5; }

.doc-engine-name { font-size: 16px; font-weight: 700; color: white; margin-bottom: 4px; }
.doc-engine-tag  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: #64748b; margin-bottom: 12px; }
.doc-engine-desc { font-size: 12px; color: #94a3b8; line-height: 1.55; }

/* ═════════════════════════════════════════════════════
   FAQ
═════════════════════════════════════════════════════ */
.doc-faq {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.doc-faq[data-open="true"] { border-color: rgba(59,130,246,0.35); }

.doc-faq__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}
.doc-faq__q:hover { background: rgba(255,255,255,0.03); }
.doc-faq__chevron { flex-shrink: 0; color: #64748b; transition: transform 0.3s ease; }
.doc-faq__a { padding: 0 24px 20px; font-size: 14px; line-height: 1.75; color: #94a3b8; }

/* ═════════════════════════════════════════════════════
   BEFORE / AFTER DOC VISUALIZATION
═════════════════════════════════════════════════════ */
.doc-before-after-label {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}
.doc-before-after-label--before { background: rgba(255,255,255,0.06); color: #64748b; }
.doc-before-after-label--after  { background: rgba(59,130,246,0.15);  color: #60a5fa; }

.doc-doc-preview {
    background: rgba(8,16,32,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
}
.doc-doc-preview__header {
    padding: 10px 16px;
    background: rgba(30,58,95,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}
.doc-doc-preview__body { padding: 16px; }

.doc-preview-block {
    margin-bottom: 12px;
}
.doc-preview-block:last-child { margin-bottom: 0; }
.doc-preview-block__label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    margin-bottom: 4px;
}
.doc-preview-block__h1 {
    font-size: 13px;
    font-weight: 700;
    color: #93c5fd;
}
.doc-preview-block__h2 {
    font-size: 11px;
    font-weight: 700;
    color: #a5b4fc;
    border-bottom: 1px solid rgba(99,102,241,0.25);
    padding-bottom: 3px;
    margin-bottom: 4px;
}
.doc-preview-block__p {
    font-size: 10px;
    color: #64748b;
    line-height: 1.6;
}
.doc-preview-block__p--translated {
    color: #6ee7b7;
}
.doc-preview-rule { height: 1px; background: rgba(255,255,255,0.05); margin: 10px 0; }

/* ═════════════════════════════════════════════════════
   WORD DOCUMENT WINDOW — Before/After redesign
═════════════════════════════════════════════════════ */
.doc-word-win {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35), 0 24px 64px rgba(0,0,0,0.5);
    font-family: 'Calibri', 'Segoe UI', system-ui, sans-serif;
}
.doc-word-win--translated {
    box-shadow: 0 0 0 1px rgba(52,211,153,0.4), 0 24px 64px rgba(0,0,0,0.5);
}

/* Title bar */
.doc-word-win__titlebar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 6px 12px;
    background: #1a3a6e;
    border-bottom: 1px solid rgba(0,0,0,0.25);
    min-height: 32px;
}
.doc-word-win__dots { display: flex; gap: 5px; flex-shrink: 0; }
.doc-word-win__dots span { width: 9px; height: 9px; border-radius: 50%; }
.doc-word-win__dots span:nth-child(1) { background: #ef4444; }
.doc-word-win__dots span:nth-child(2) { background: #f59e0b; }
.doc-word-win__dots span:nth-child(3) { background: #22c55e; }
.doc-word-win__icon {
    width: 14px; height: 14px;
    flex-shrink: 0;
    margin-left: 8px;
}
.doc-word-win__filename {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    margin-left: 6px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-word-win__badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(52,211,153,0.2);
    border: 1px solid rgba(52,211,153,0.45);
    color: #6ee7b7;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 6px;
}
.doc-word-win__winctrls {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
    margin-left: 4px;
}
.doc-word-win__winctrls span {
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    cursor: default;
    user-select: none;
}

/* Ribbon */
.doc-word-win__ribbon {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 4px 10px;
    background: #f0f3f8;
    border-bottom: 2px solid #c5cdd8;
}
.doc-word-win__rb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 18px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
    color: #374151;
    background: transparent;
    border: 1px solid transparent;
    cursor: default;
    flex-shrink: 0;
}
.doc-word-win__rb-sep {
    width: 1px; height: 14px;
    background: #d1d5db;
    margin: 0 3px;
    flex-shrink: 0;
}
.doc-word-win__rb-style {
    font-size: 9px;
    color: #374151;
    padding: 2px 6px;
    border: 1px solid #d1d9e0;
    border-radius: 2px;
    background: white;
    white-space: nowrap;
    cursor: default;
}
.doc-word-win__rb-lang {
    margin-left: auto;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    color: #1d4ed8;
    white-space: nowrap;
    flex-shrink: 0;
}
.doc-word-win__rb-lang--fr {
    background: rgba(16,185,129,0.12);
    border-color: rgba(16,185,129,0.35);
    color: #047857;
}

/* Ruler — the thin horizontal strip above the page */
.doc-word-win__ruler {
    height: 13px;
    background: linear-gradient(to bottom, #dde3eb, #eaeff5);
    border-bottom: 1px solid #c5cdd8;
    position: relative;
    overflow: hidden;
}
/* White margin area between the ruler edges */
.doc-word-win__ruler::before {
    content: '';
    position: absolute;
    top: 3px; bottom: 3px;
    left: 24px; right: 24px;
    background: white;
    border-left: 1px solid #9fb5c5;
    border-right: 1px solid #9fb5c5;
}
/* Tick marks */
.doc-word-win__ruler::after {
    content: '';
    position: absolute;
    top: 7px; left: 24px; right: 24px;
    height: 4px;
    background: repeating-linear-gradient(
        to right,
        transparent 0px, transparent 8px,
        #b0bec5 8px, #b0bec5 9px
    );
}

/* Page wrap — gray desk behind the white paper */
.doc-word-win__page-wrap {
    padding: 10px 14px 8px;
    background: #cdd3db;
}

/* The white paper */
.doc-word-win__page {
    background: white;
    box-shadow: 0 1px 6px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.04);
    padding: 16px 20px 12px;
}

/* Page decorative header */
.doc-word-win__page-hdr {
    display: flex;
    justify-content: space-between;
    padding-bottom: 5px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.doc-word-win__page-hdr-txt {
    font-size: 7px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
    font-family: ui-monospace, monospace;
}

/* Typography — Word default styles */
.doc-word-win__h1 {
    font-size: 14px;
    font-weight: 700;
    color: #1F3864;
    line-height: 1.25;
    margin-bottom: 0;
}
.doc-word-win__h2 {
    font-size: 10.5px;
    font-weight: 700;
    color: #2E74B5;
    border-bottom: 1px solid #bfdbfe;
    padding-bottom: 3px;
    margin: 10px 0 5px;
}
.doc-word-win__p {
    font-size: 9px;
    color: #1f2937;
    line-height: 1.65;
    margin: 0;
}
.doc-word-win__rule {
    height: 1px;
    background: #e5e7eb;
    margin: 7px 0;
}

/* Table — Word "Table Grid" style */
.doc-word-win__tbl {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 8px;
}
.doc-word-win__tbl th {
    background: #1e3a5f;
    color: rgba(255,255,255,0.95);
    font-weight: 700;
    padding: 4px 7px;
    text-align: left;
    letter-spacing: 0.02em;
    border: 1px solid #163058;
}
.doc-word-win__tbl td {
    padding: 3px 7px;
    border: 1px solid #dde3ea;
    color: #374151;
    vertical-align: top;
}
.doc-word-win__tbl tr:nth-child(even) td { background: #f0f5fc; }
.doc-word-win__tbl--translated th {
    background: #065f46;
    border-color: #064e3b;
}
.doc-word-win__tbl--translated td { color: #1a2e25; }
.doc-word-win__tbl--translated tr:nth-child(even) td { background: #f0fdf7; }

/* Decorative page footer */
.doc-word-win__page-ftr {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #e2e8f0;
}
.doc-word-win__page-ftr-txt {
    font-size: 7px;
    color: #94a3b8;
    font-family: ui-monospace, monospace;
}

/* Status bar */
.doc-word-win__statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 10px;
    background: #1a3a6e;
    font-size: 8px;
    font-family: ui-monospace, monospace;
    color: rgba(255,255,255,0.4);
}
.doc-word-win__statusbar--translated {
    border-top: 2px solid rgba(52,211,153,0.5);
}