/* Paper Sharing Main Page Styles */
.papers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.papers-header {
    text-align: center;
    margin-bottom: 40px;
}

.papers-header h1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 15px;
}

.papers-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Search and Filter Section */
.papers-search-section {
    margin-bottom: 40px;
}

.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-bar input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

/* Filter Rows */
.filter-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.filter-row.level-1 {
    margin-bottom: 10px;
}

.filter-row.level-2 {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.sub-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Level 1 Filter Tags (Main Categories) */
.filter-tag {
    padding: 12px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border: 2px solid #468EA6;
    border-radius: 8px;
    background-color: white;
    color: #468EA6;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tag:hover {
    background-color: #f0f7f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(70, 142, 166, 0.2);
}

.filter-tag.active {
    background-color: #468EA6;
    color: white;
    box-shadow: 0 4px 12px rgba(70, 142, 166, 0.3);
}

/* Level 2 Filter Tags (Sub-categories) */
.filter-tag-sub {
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid #7DBA87;
    border-radius: 6px;
    background-color: white;
    color: #7DBA87;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tag-sub:hover {
    background-color: #f0f9f3;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(125, 186, 135, 0.2);
}

.filter-tag-sub.active {
    background-color: #7DBA87;
    color: white;
    box-shadow: 0 3px 8px rgba(125, 186, 135, 0.3);
}

.filter-select {
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 200px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.papers-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.paper-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #F2EFE9;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    transition: all 0.3s ease;
}

.paper-item:hover {
    background: #E8E5DF;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.paper-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-primary);
    min-width: 30px;
}

.paper-content {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.paper-author {
    font-weight: 600;
    color: var(--color-primary);
}

.paper-title {
    color: #0078A8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.paper-title:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.paper-journal {
    color: #555;
    font-style: italic;
}

.paper-year {
    color: #777;
    font-weight: 500;
}

.paper-badge {
    display: inline-block;
    padding: 3px 10px;
    margin-left: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    background-color: rgba(70, 142, 166, 0.15);
    color: #468EA6;
    text-transform: capitalize;
    vertical-align: middle;
}

.paper-badge[data-category="review"] {
    background-color: rgba(125, 186, 135, 0.15);
    color: #7DBA87;
}

.paper-badge[data-category="concepts-mechanisms"],
.paper-badge[data-category="susceptibility-assessment"],
.paper-badge[data-category="hazard-modelling"] {
    background-color: rgba(70, 142, 166, 0.15);
    color: #468EA6;
}

.paper-badge[data-category="vulnerability"],
.paper-badge[data-category="exposure"],
.paper-badge[data-category="risk-assessment"] {
    background-color: rgba(28, 55, 95, 0.15);
    color: #1C375F;
}

.paper-badge[data-category="landslide-detection"],
.paper-badge[data-category="early-warning"],
.paper-badge[data-category="landslide-mitigation"] {
    background-color: rgba(125, 186, 135, 0.15);
    color: #5fa56d;
}

.paper-badge[data-category="others"] {
    background-color: rgba(119, 119, 119, 0.15);
    color: #777;
}

/* Paper Detail Page Styles */
.paper-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.paper-detail {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.paper-detail h1 {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 30px;
    line-height: 1.4;
    border-bottom: 3px solid var(--color-accent);
    padding-bottom: 15px;
}

.paper-section {
    margin-bottom: 35px;
}

.paper-section h2 {
    font-size: 1.6rem;
    color: var(--color-primary-light);
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid var(--color-accent);
}

.paper-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.citation-text {
    background: #F2EFE9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.citation-text a {
    color: #0078A8;
    text-decoration: none;
    font-weight: 500;
}

.citation-text a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.back-link {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #E0E0E0;
}

.back-link a {
    color: var(--color-primary-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .papers-section,
    .paper-detail {
        padding: 25px;
    }

    .papers-section h1,
    .paper-detail h1 {
        font-size: 1.8rem;
    }

    .paper-section h2 {
        font-size: 1.4rem;
    }

    .paper-item {
        flex-direction: column;
        gap: 10px;
    }

    .paper-number {
        min-width: auto;
    }
}

/* ========================================
   CONTRIBUTION SECTION
   ======================================== */

.contribute-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f3f7fc 0%, #d6ddeb 100%);
    border-radius: 12px;
    margin-top: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contribute-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.contribute-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn-contribute {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background-color: var(--color-accent);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-contribute:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 39, 76, 0.3);
}

@media (max-width: 768px) {
    .contribute-section {
        padding: 40px 20px;
    }

    .contribute-section h2 {
        font-size: 1.75rem;
    }

    .contribute-section p {
        font-size: 1rem;
    }

    .btn-contribute {
        padding: 12px 25px;
        font-size: 1rem;
    }
}
