/* ============================================
   EliminateCancer.ai - Custom Styles
   Color Palette: #1abc9c (teal), #2c3e50 (navy)
   ============================================ */

/* --- Global Overrides --- */
body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Brand Logo --- */
.brand-ai {
    color: #1abc9c;
    font-weight: 300;
    font-style: italic;
    opacity: 0.9;
}

.navbar-brand {
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.brand-ai {
    text-transform: lowercase !important;
}

/* --- Navbar Enhancements --- */
.navbar .dropdown-menu {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    text-transform: none;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    transition: background 0.2s;
}

.navbar .dropdown-item:hover {
    background-color: #1abc9c;
    color: #fff;
}

/* --- Hero / Masthead --- */
.masthead {
    padding-top: 7rem;
    padding-bottom: 3rem;
}

.hero-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.25;
    max-width: 700px;
    text-transform: none;
}

.hero-description {
    font-size: 1.05rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 650px;
    line-height: 1.7;
}

.hero-stat {
    font-size: 0.95rem;
    opacity: 0.75;
    font-weight: 400;
}

.hero-stat strong {
    opacity: 1;
    font-weight: 600;
}

.hero-search {
    width: 100%;
    max-width: 560px;
    margin-top: 0.5rem;
    position: relative;
}

.hero-search .input-group {
    border-radius: 50rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-search .input-group-text {
    padding-left: 1.25rem;
}

.hero-search .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.hero-search .form-control:focus {
    box-shadow: none;
}

/* Search Results Dropdown */
.hero-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    margin-top: 0.5rem;
    max-height: 360px;
    overflow-y: auto;
    z-index: 1000;
}

.hero-search-results.visible {
    display: block;
}

.search-result-item {
    display: block;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #2c3e50;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.search-result-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.search-result-empty {
    padding: 1.25rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.search-view-all {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    color: #1abc9c;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 0 0 0.75rem 0.75rem;
}

.search-view-all:hover {
    background: #1abc9c;
    color: #fff;
}

/* Quick Links */
.hero-quick-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-quick-label {
    font-size: 0.8rem;
    opacity: 0.6;
}

.hero-quick-link {
    font-size: 0.8rem;
    color: #fff;
    opacity: 0.8;
    background: rgba(255,255,255,0.15);
    padding: 0.2rem 0.65rem;
    border-radius: 50rem;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-quick-link:hover {
    opacity: 1;
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* --- About CTA Buttons --- */
.about-cta-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.about-cta-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
    transform: translateY(-2px);
}

.about-cta-btn i {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* --- Cancer Type Cards --- */
.cancer-type-card {
    display: block;
    padding: 1.5rem 1rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2c3e50;
}

.cancer-type-card:hover {
    border-color: #1abc9c;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(26, 188, 156, 0.15);
    color: #2c3e50;
}

.cancer-type-icon {
    font-size: 2rem;
    color: #1abc9c;
    margin-bottom: 0.75rem;
}

.cancer-type-card h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.cancer-type-card .badge {
    font-size: 0.7rem;
    font-weight: 500;
}

/* --- Paper Cards (Homepage) --- */
.paper-card {
    display: block;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2c3e50;
    height: 100%;
}

.paper-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    color: #2c3e50;
}

.paper-card-img {
    overflow: hidden;
}

.paper-card-body {
    padding: 1.25rem;
}

.paper-card-tag {
    display: inline-block;
    background: rgba(26, 188, 156, 0.1);
    color: #1abc9c;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    margin-right: 0.35rem;
    margin-bottom: 0.5rem;
}

.paper-card-tag.tag-new {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.paper-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.paper-card h5 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.paper-card-meta {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.paper-card-excerpt {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
}

.paper-card-featured .paper-card-body {
    padding: 1.5rem;
}

.paper-card-sm {
    border-left: 3px solid #1abc9c;
}

.paper-card-sm .paper-card-body {
    padding: 1rem 1.25rem;
}

/* --- Cancer Type Page --- */
.cancer-type-header {
    padding-top: 7rem;
    padding-bottom: 2rem;
}

.breadcrumb-dark {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-dark .breadcrumb-item a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    text-transform: none;
    font-size: 0.85rem;
}

.breadcrumb-dark .breadcrumb-item a:hover {
    color: #1abc9c;
}

.breadcrumb-dark .breadcrumb-item.active {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    text-transform: none;
}

.breadcrumb-dark .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.4);
}

.filter-bar .filter-btn {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50rem;
    padding: 0.35rem 1rem;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: #1abc9c;
    border-color: #1abc9c;
    color: #fff;
}

/* --- Paper List Items (Cancer Type Page) --- */
.paper-list-item {
    display: block;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2c3e50;
}

.paper-list-item:hover {
    border-color: #1abc9c;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    color: #2c3e50;
}

.paper-list-item a {
    text-decoration: none;
    color: inherit;
}

.paper-list-featured {
    border: 2px solid #1abc9c;
}

.paper-list-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    height: 100%;
    position: relative;
}

.paper-list-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #1abc9c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
}

.paper-list-body {
    padding: 1.5rem;
}

.paper-list-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.paper-list-body h5 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.paper-list-tags {
    margin-bottom: 0.75rem;
}

.paper-list-excerpt {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.paper-list-stats {
    display: flex;
    gap: 1.25rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.paper-list-stats i {
    color: #1abc9c;
}

/* --- Pagination --- */
.pagination .page-link {
    color: #2c3e50;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #1abc9c;
    border-color: #1abc9c;
}

/* ============================================
   SPLIT-PANEL READER (paper.html)
   ============================================ */

.paper-reader-page {
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Slim navbar on paper reader pages */
.paper-reader-page #mainNav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.paper-reader-page #mainNav .navbar-brand {
    font-size: 1.25em;
}

/* Paper Header */
.paper-header {
    padding-top: 4.5rem;
    padding-bottom: 0.75rem;
}

.paper-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    text-transform: none;
}

.paper-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.paper-header .breadcrumb {
    font-size: 0.75rem;
    margin-bottom: 0.25rem !important;
}

/* Reading Progress Bar */
.reading-progress-container {
    position: sticky;
    top: 68px;
    z-index: 100;
    height: 3px;
    background: #e9ecef;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1abc9c, #16a085);
    width: 0%;
    transition: width 0.1s ease;
}

/* Reader Container */
.reader-container {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

.reader-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reader-panel-left {
    flex: 1;
    min-width: 300px;
    border-right: 1px solid #e9ecef;
}

.reader-panel-right {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.reader-panel-right .panel-header {
    background: #f0f2f5;
}

.panel-label {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.panel-controls .btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

/* Panel Content */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    scroll-behavior: smooth;
}

#paperContent {
    font-size: 1rem;
    line-height: 1.8;
    color: #2c3e50;
}

#paperContent h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1abc9c;
}

#paperContent h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

#paperContent p {
    margin-bottom: 1rem;
}

.paper-section {
    margin-bottom: 2rem;
}

/* Annotated / Highlighted Text */
.annotated-text {
    background: rgba(26, 188, 156, 0.12);
    border-bottom: 2px solid #1abc9c;
    cursor: pointer;
    padding: 1px 2px;
    border-radius: 2px;
    transition: background 0.2s ease;
}

.annotated-text:hover {
    background: rgba(26, 188, 156, 0.25);
}

.annotated-text.active {
    background: rgba(26, 188, 156, 0.3);
    border-bottom-color: #16a085;
}

.annotated-text-demo {
    background: rgba(26, 188, 156, 0.15);
    border-bottom: 2px solid #1abc9c;
    padding: 1px 4px;
    border-radius: 2px;
}

/* Resizable Divider */
.reader-divider {
    width: 6px;
    background: #e9ecef;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.reader-divider:hover {
    background: #1abc9c;
}

.divider-handle {
    color: #adb5bd;
    font-size: 0.7rem;
}

.reader-divider:hover .divider-handle {
    color: #fff;
}

/* Explanation Cards */
.explanation-placeholder {
    padding: 2rem;
}

.explanation-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border-left: 4px solid #1abc9c;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    animation: slideIn 0.3s ease;
}

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

.explanation-section-tag {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.explanation-card h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.explanation-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 0.75rem;
}

.explanation-tldr {
    background: rgba(26, 188, 156, 0.08);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-top: 1rem;
    border: 1px solid rgba(26, 188, 156, 0.2);
}

.explanation-tldr strong {
    color: #1abc9c;
}

/* Mobile Reader Toggle */
.reader-mobile-toggle {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #e9ecef;
    padding: 0.5rem;
    z-index: 200;
}

.reader-mobile-toggle .btn {
    border-radius: 0;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Mobile: hide right panel by default */
@media (max-width: 991.98px) {
    .reader-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 150px);
        padding-bottom: 60px;
    }

    .reader-panel-left,
    .reader-panel-right {
        min-width: 100%;
        height: auto;
        min-height: calc(100vh - 220px);
    }

    .reader-panel-right {
        display: none;
    }

    .reader-panel-right.mobile-visible {
        display: flex;
    }

    .reader-panel-left.mobile-hidden {
        display: none;
    }

    .reader-divider {
        display: none;
    }

    .paper-title {
        font-size: 1.2rem;
    }

    .paper-meta-bar {
        gap: 0.75rem;
    }
}

@media (min-width: 992px) {
    .reader-mobile-toggle {
        display: none !important;
    }
}

/* --- Section Heading Adjustments --- */
.page-section {
    padding: 4rem 0;
}

/* --- Footer Adjustments --- */
.footer {
    padding-top: 3rem;
    padding-bottom: 1rem;
}

/* Paper Footer */
.paper-footer {
    flex-shrink: 0;
    padding: 0.5rem 0;
    background: #2c3e50;
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
    border-top: 2px solid #1abc9c;
}

.paper-footer a {
    color: #1abc9c;
    text-decoration: none;
}

.paper-footer a:hover {
    color: #fff;
}

/* Page Reference Badge */
.page-ref {
    display: inline-block;
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 50rem;
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* --- Scrollbar Styling --- */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}
