/* ============================================
   LuxTax 2025 - Document Repository Styles
   ============================================ */

/* Hero for docs page */
.hero-docs {
    padding: 40px 0 32px;
}

/* Search Box */
.search-box {
    max-width: 520px;
    margin: 24px auto 0;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font);
    font-size: 15px;
    transition: var(--transition);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}

/* ============================================
   Docs Layout
   ============================================ */
.docs-section {
    padding: 32px 0;
}

.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 80px;
}

.docs-nav h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.docs-nav ul {
    list-style: none;
}

.docs-nav-link {
    display: block;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    transition: var(--transition);
    margin-bottom: 2px;
}

.docs-nav-link:hover {
    color: var(--primary);
    background: rgba(26, 58, 92, 0.04);
}

.docs-nav-link.active {
    color: var(--primary);
    background: rgba(26, 58, 92, 0.06);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Document Articles
   ============================================ */
.doc-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 80px;
}

.doc-article.hidden {
    display: none;
}

.doc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.doc-tag {
    display: inline-flex;
    padding: 3px 10px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-ref {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.doc-article h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.doc-article h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 10px;
}

.doc-article p {
    color: var(--text);
    font-size: 15px;
    margin-bottom: 14px;
    line-height: 1.7;
}

/* Info Tables */
.info-table {
    margin: 16px 0;
    overflow-x: auto;
}

.info-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table thead th {
    background: var(--primary-dark);
    color: white;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.info-table thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.info-table thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.info-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.info-table tbody tr:hover {
    background: rgba(26, 58, 92, 0.02);
}

.info-table tbody tr:last-child td {
    border-bottom: none;
}

.tax-bracket-table tbody td:first-child {
    font-variant-numeric: tabular-nums;
}

.tax-bracket-table tbody td:last-child {
    font-weight: 600;
    color: var(--primary);
}

/* Class Badges */
.class-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.class-1 { background: #4a7ab5; }
.class-1a { background: #5a9a6e; }
.class-2 { background: #b5734a; }

/* Info Boxes */
.info-box {
    margin: 16px 0;
    padding: 16px 20px;
    background: #edf4fd;
    border-left: 4px solid var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.info-box h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.info-box p, .info-box li {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}

.info-box ul {
    margin-left: 20px;
    margin-top: 6px;
}

.info-box.info-warning {
    background: #fef3e2;
    border-left-color: var(--warning);
}

.info-box.info-warning h4 {
    color: var(--warning);
}

/* Legal Notes */
.legal-note {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.legal-note h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.legal-note ul {
    list-style: none;
}

.legal-note li {
    font-size: 13px;
    color: var(--text-light);
    padding: 4px 0;
    padding-left: 12px;
    position: relative;
}

.legal-note li::before {
    content: "\00a7";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.legal-note li strong {
    color: var(--primary-light);
}

/* Category List */
.categories-list {
    margin: 16px 0;
}

.category-item {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.cat-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.category-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.category-item p {
    font-size: 13px;
    margin: 0;
}

.category-item em {
    color: var(--primary-light);
    font-style: normal;
    font-size: 12px;
}

/* Checklist */
.checklist {
    margin: 12px 0;
}

.check-item {
    padding: 8px 0 8px 28px;
    position: relative;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

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

.check-item::before {
    content: "\2713";
    position: absolute;
    left: 4px;
    color: var(--primary-light);
    font-weight: 700;
}

/* Source List */
.source-list {
    margin: 16px 0;
}

.source-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.source-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.source-item p {
    font-size: 14px;
    margin-bottom: 6px;
}

.source-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-light);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-light);
    transition: var(--transition);
}

.source-link:hover {
    color: var(--primary);
    border-bottom-style: solid;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        border-bottom: 1px solid var(--border);
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .docs-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .docs-nav-link {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 6px 10px;
        font-size: 12px;
    }

    .docs-nav-link.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }
}

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

    .doc-article h2 {
        font-size: 18px;
    }
}
