/* ── DOCUMENTS PAGE STYLING ────────────────────────── */
:root {
    --dark:      #1e2035;
    --primary:   #2A2F5B;
    --primary-light: #3a4180;
    --accent:    #ffda00;
    --accent-soft: #fff8cc;
    --text:      #1a1d2e;
    --text-muted: #6b7280;
    --bg:        #f5f6fa;
    --surface:   #ffffff;
    --border:    #e5e7ef;
    --radius:    16px;
    --shadow:    0 4px 20px rgba(42,47,91,0.08);
    --shadow-hover: 0 12px 36px rgba(42,47,91,0.16);
}

/* ── HERO BANNER ────────────────────────── */
.docs-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1a1f45 60%, #0d1030 100%);
    padding: 3.5rem 1.5rem 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.docs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,218,0,0.12);
    border: 1px solid rgba(255,218,0,0.3);
    border-radius: 50px;
    padding: 5px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}
.docs-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
}
.docs-hero-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── LAYOUT & FILTERS ────────────────────────── */
.docs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.docs-filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.docs-filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.docs-filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.docs-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(42,47,91,0.25);
}

/* ── DOCUMENTS GRID ────────────────────────── */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.8rem;
}

.doc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.doc-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(42,47,91,0.2);
}

/* ── PREVIEW CONTAINER ────────────────────────── */
.doc-preview-wrapper {
    position: relative;
    height: 220px;
    background: #f0f2f8;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.doc-iframe-preview {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.doc-card:hover .doc-iframe-preview {
    transform: scale(1.05);
}

.doc-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 29, 46, 0.65);
    backdrop-filter: blur(3px);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: opacity 0.25s ease;
    z-index: 2;
    padding: 1rem;
}

.doc-card:hover .doc-preview-overlay {
    opacity: 1;
}

.doc-overlay-btn {
    background: var(--accent);
    color: var(--dark);
    font-weight: 700;
    font-size: 13px;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.doc-overlay-btn:hover {
    background: #ffe333;
    color: var(--dark);
    transform: scale(1.04);
    text-decoration: none;
}

.doc-overlay-btn.btn-secondary {
    background: #ffffff;
    color: var(--primary);
}

.doc-overlay-btn.btn-secondary:hover {
    background: #f0f3ff;
    color: var(--primary-light);
}

/* ── CARD CONTENT ────────────────────────── */
.doc-body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.doc-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.doc-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(42,47,91,0.07);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.doc-title {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.doc-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.doc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
    margin-top: auto;
}

.doc-link-main {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: color 0.2s;
}

.doc-link-main:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.doc-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.doc-btn-icon:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ── MODAL VIEWER ────────────────────────── */
.doc-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 30, 0.85);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.doc-modal.active {
    display: flex;
    opacity: 1;
}

.doc-modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.doc-modal-header {
    background: var(--primary);
    color: #ffffff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-modal-title {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 1rem;
}

.doc-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.doc-modal-btn {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.doc-modal-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
    text-decoration: none;
}

.doc-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 0.4rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.doc-modal-close:hover { opacity: 1; }

.doc-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

/* ── RESPONSIVE ────────────────────────── */
@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: 1fr;
    }
    .docs-hero {
        padding: 1.8rem 1rem 1.8rem;
    }
    .docs-hero-badge {
        margin-bottom: 0.75rem;
        font-size: 11px;
        padding: 4px 12px;
    }
    .docs-hero h1 {
        font-size: clamp(1.4rem, 5vw, 1.85rem);
        margin-bottom: 0.5rem;
    }
    .docs-hero-subtitle {
        font-size: 13.5px;
        line-height: 1.45;
    }
    .docs-container {
        padding: 1.5rem 1rem 3rem;
    }
    .doc-modal-content {
        height: 95vh;
    }
}
