/* Blog Post Template Styles - Shared across all resource pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 80px;
    padding: 40px 20px;
}

header {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: -4px 0 12px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    color: #000;
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Statistics Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: transparent;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: #000;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Controls Section (Search & Filters) */
.controls {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: grid;
    gap: 15px;
    align-items: start;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
}

.filter-toggle:hover {
    background: #f5f5f5;
}

.chevron {
    transition: transform 0.3s;
    font-size: 0.8em;
}

.chevron.open {
    transform: rotate(180deg);
}

.type-filters-container {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-top: 10px;
    grid-column: 1 / -1;
}

.type-filters-container.open {
    display: flex;
}

.type-filters-container .filter-btn {
    flex: 0 1 auto;
}

.type-filters-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 100;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.type-filters-dropdown.open {
    display: flex;
}

.type-filters-dropdown .filter-btn {
    flex: 0 1 auto;
    margin: 0;
}

.filter-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
}

.filter-btn:hover {
    background: #f5f5f5;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: auto;
    border: 1px solid #000;
    position: relative;
}

@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        width: auto;
        min-width: 100%;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    background: #1a1a1a;
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    position: relative;
}

.th-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.th-header.toggleable:hover {
    opacity: 0.8;
}

.th-chevron {
    font-size: 0.8em;
    transition: transform 0.3s;
}

.th-chevron.open {
    transform: rotate(180deg);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background: #f9f9f9;
}

.name {
    font-weight: 600;
    color: #333;
}

.name a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.name a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Badge Styles */
.dr-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.dr-high {
    background: #d4edda;
    color: #155724;
}

.dr-medium {
    background: #fff3cd;
    color: #856404;
}

.dr-low {
    background: #f8d7da;
    color: #721c24;
}

.dr-unknown {
    background: #e2e3e5;
    color: #383d41;
}

.niche-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    background: #e7f3ff;
    color: #0056b3;
    margin-right: 5px;
    margin-bottom: 3px;
}

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    background: #e7f3ff;
    color: #0056b3;
    margin-right: 5px;
    margin-bottom: 3px;
}

.submission-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    background: #f0e6ff;
    color: #5a3a9d;
    font-weight: 500;
}

.sources {
    font-size: 0.85em;
    color: #666;
    max-width: 200px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Pagination */
.pagination-info {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9em;
}

.pagination-info-top {
    text-align: center;
    padding: 15px 0;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.load-more-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.3s;
}

.load-more-btn:hover {
    background: #34495e;
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Educational Content Section */
.education-section {
    background: white;
    border-radius: 8px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: -4px 0 12px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.education-section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #333;
}

.education-section p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
    font-size: 1.05em;
}

.header-container {
    margin-bottom: 40px;
}

.header-container h2 {
    margin: 0;
    text-align: left;
}

/* FAQ Section */
.faq-container {
    margin-top: 40px;
}

.faq-item {
    background: #f9f9f9;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: -4px 0 12px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #333;
    display: block;
}

.faq-item h3 .toggle {
    display: none;
}

.faq-item h3 .toggle.open {
    display: none;
}

.faq-answer {
    display: block;
    color: #555;
    line-height: 1.8;
    font-size: 1em;
}

.faq-answer.open {
    display: block;
}

.faq-answer a {
    color: #667eea;
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 10px;
    }

    .sources {
        display: none;
    }

    header {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .filter-group {
        justify-content: space-between;
    }

    .education-section {
        padding: 20px;
    }

    .education-section h2 {
        font-size: 1.4em;
    }

    .faq-item {
        padding: 15px;
    }
}

/* Content Section Styling */
.content-section {
    margin-top: 30px;
}

.content-section h3 {
    margin-top: 0;
    color: #333;
}

.authors-section {
    margin-top: 40px;
}

.authors-section h4 {
    margin-top: 0;
    color: #333;
}
