/* ==================================================== */
/* ============ LAW CATEGORY GRID ===================== */
/* ==================================================== */

.law-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.law-category-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border-left: 4px solid transparent;
    border-image: var(--gradient) 1;
    border-image-slice: 1;
    border-left-width: 4px;
}

.law-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.law-category-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--gradient);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(50, 155, 214, 0.3);
}

.law-category-content {
    flex: 1;
    min-width: 0;
}

.law-category-content h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 4px;
    line-height: 1.3;
}

.law-category-content p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

.law-category-arrow {
    color: var(--primary);
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.law-category-card:hover .law-category-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

/* ==================================================== */
/* ============ LAW LIST ============================== */
/* ==================================================== */

.law-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.law-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

.law-item:hover {
    box-shadow: var(--shadow-md);
}

.law-item-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.law-item-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: rgba(38, 94, 167, 0.08);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.law-item-content {
    flex: 1;
    min-width: 0;
}

.law-item-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 4px;
    line-height: 1.4;
}

.law-item-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.law-item-meta i {
    color: var(--accent);
}

.law-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 20px;
}

.law-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.law-doc-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(50, 155, 214, 0.35);
}

.law-doc-btn i {
    color: var(--gold);
}

/* ==================================================== */
/* ============ PDF MODAL ============================= */
/* ==================================================== */

.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
}

.pdf-modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.pdf-modal.active .pdf-modal-content {
    transform: translateY(0);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--gradient);
    color: var(--white);
    flex-shrink: 0;
}

.pdf-modal-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.pdf-modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pdf-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-family: inherit;
}

.pdf-modal-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--gold);
    color: var(--gold);
}

.pdf-modal-btn-close {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

.pdf-modal-btn-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    transform: rotate(90deg);
}

.pdf-modal-body {
    flex: 1;
    background: var(--gray-100);
    overflow: hidden;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ==================================================== */
/* ============ RESPONSIVE ============================ */
/* ==================================================== */

@media (max-width: 768px) {
    .law-category-grid {
        grid-template-columns: 1fr;
    }
    
    .law-item-header {
        padding: 16px;
    }
    
    .law-item-content h4 {
        font-size: 0.9rem;
    }
    
    .law-documents {
        padding: 0 16px 16px;
    }
    
    .law-doc-btn {
        width: 100%;
        justify-content: center;
    }
    
    .pdf-modal {
        padding: 0;
    }
    
    .pdf-modal-content {
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
    }
    
    .pdf-modal-header h3 {
        font-size: 0.85rem;
        max-width: 50%;
    }
}