/* materiais.css - Premium Styles for Materials Section */

:root {
    --sidebar-width: 280px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.materials-layout {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    align-items: flex-start;
}

/* Sidebar Navigation */
.materials-sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.sidebar-nav a:hover {
    background: rgba(13, 138, 188, 0.1);
    color: var(--accent-color);
}

.sidebar-nav a.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 138, 188, 0.3);
}

/* Content Area */
.materials-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.content-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
    scroll-margin-top: 120px;
    animation: fadeInUp 0.6s ease-out both;
}

.section-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Specific Content Styles */
.legislation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.legislation-card {
    background: rgba(13, 138, 188, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(13, 138, 188, 0.1);
    transition: var(--transition-smooth);
}

.legislation-card:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.legislation-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.legislation-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Document Models */
.document-model {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.model-header {
    background: #e2e8f0;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.model-body {
    padding: 2rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    background: white;
    color: #334155;
    position: relative;
}

.btn-copy {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: var(--primary-color);
}

/* Table Style */
.norms-table-wrapper {
    overflow-x: auto;
}

.norms-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.norms-table th {
    background: rgba(13, 138, 188, 0.05);
    text-align: left;
    padding: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid var(--accent-color);
}

.norms-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.norms-table tr:hover {
    background: rgba(13, 138, 188, 0.02);
}

/* Responsive */
@media (max-width: 992px) {
    .materials-layout {
        flex-direction: column;
    }
    
    .materials-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 1rem;
    }
    
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .sidebar-nav li {
        margin-bottom: 0;
        flex: 1 1 calc(50% - 0.5rem);
    }
}

@media (max-width: 600px) {
    .sidebar-nav li {
        flex: 1 1 100%;
    }
}

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

/* Dark Mode Support */
[data-theme="dark"] .content-section {
    background: var(--bg-secondary);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .legislation-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .legislation-card:hover {
    background: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .model-body {
    background: #1e293b;
    color: #e2e8f0;
}

[data-theme="dark"] .model-header {
    background: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .norms-table td {
    border-color: rgba(255, 255, 255, 0.05);
}
