/* 
 * Legislation Page Styles
 * Modern, sleek styling for the legislation, court rules, and practice directives page
 */

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(49, 46, 129, 0.8));
    color: #fff;
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 1rem 1rem;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/pattern.svg');
    background-repeat: repeat;
    opacity: 0.1;
    z-index: -1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.breadcrumbs {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Quick Navigation Tabs */
.quick-nav {
    margin-bottom: 2rem;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
}

.nav-tab {
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    font-weight: 600;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab:hover {
    color: #1e40af;
    background-color: rgba(30, 64, 175, 0.05);
}

.nav-tab.active {
    color: #1e40af;
    background-color: rgba(30, 64, 175, 0.1);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1e40af;
    border-radius: 3px;
}

/* Search and Filter Section */
.search-filter {
    margin-bottom: 2.5rem;
}

.filter-container {
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.filter-container form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.search-input,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.search-input:focus,
.filter-select:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
    outline: none;
}

.btn-filter,
.btn-reset {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter {
    background-color: #1e40af;
    color: #fff;
}

.btn-filter:hover {
    background-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-reset {
    background-color: #e5e7eb;
    color: #4b5563;
}

.btn-reset:hover {
    background-color: #d1d5db;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 1rem 0 3rem;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Category Groups */
.category-group {
    margin-bottom: 3rem;
}

.category-group h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.category-group h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: #1e40af;
}

/* Card Grid Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* Document Cards */
.document-card {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.document-card.highlighted {
    border: 1px solid #1e40af;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.2);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-size: 2rem;
    color: #1e40af;
    background-color: rgba(30, 64, 175, 0.05);
}

.card-content {
    padding: 1.5rem;
    flex: 1;
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-content p {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-meta span::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #1e40af;
    opacity: 0.6;
}

.card-actions {
    display: flex;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(249, 250, 251, 0.7);
}

.btn-view,
.btn-download {
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-view {
    background-color: #1e40af;
    color: white;
    margin-right: 0.75rem;
}

.btn-view:hover {
    background-color: #1e3a8a;
}

.btn-download {
    background-color: transparent;
    color: #1e40af;
    border: 1px solid currentColor;
}

.btn-download:hover {
    background-color: rgba(30, 64, 175, 0.05);
}

/* Document Viewer Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow: auto;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.95);
    margin: 2rem auto;
    width: 90%;
    max-width: 1200px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 4rem);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    min-height: 400px;
}

#pdf-viewer {
    width: 100%;
    height: 100%;
    position: relative;
}

#pdf-iframe {
    width: 100%;
    height: 100%;
    min-height: 70vh;
}

.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(30, 64, 175, 0.1);
    border-radius: 50%;
    border-top: 4px solid #1e40af;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    gap: 1rem;
}

.btn-close {
    padding: 0.5rem 1rem;
    background-color: #e5e7eb;
    color: #4b5563;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background-color: #d1d5db;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tab {
        margin-bottom: 0.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-container form {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }
}

/* Glass Effect */
.glass-effect {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
