/* Research Page Enhanced Styles - Mobile-First Responsive Design */

/* Research Statistics Dashboard */
.research-stats-dashboard {
    background: linear-gradient(135deg, #21808d 0%, #2da6b2 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.2rem;
}

/* Research Navigation Tabs */
.research-navigation {
    margin-bottom: 2rem;
}

.research-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 0.5rem;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.research-tab {
    flex: 1;
    min-width: 120px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.research-tab:hover {
    background: rgba(33, 128, 141, 0.1);
    color: #21808d;
}

.research-tab.active {
    background: #21808d;
    color: white;
    box-shadow: 0 4px 12px rgba(33, 128, 141, 0.3);
}

.research-tab i {
    font-size: 1rem;
}

/* Publications Controls */
.publications-controls {
    margin-bottom: 2rem;
}

.search-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.search-input-container {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #21808d;
    box-shadow: 0 0 0 3px rgba(33, 128, 141, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #6c757d;
    z-index: 2;
}

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

.filter-select {
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: #21808d;
}

.view-toggle-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-btn:hover {
    border-color: #21808d;
    color: #21808d;
}

.view-toggle-btn.active {
    background: #21808d;
    border-color: #21808d;
    color: white;
}

/* Publications Grid */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.publication-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #21808d, #2da6b2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.publication-card:hover::before {
    transform: scaleX(1);
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.publication-year {
    background: #21808d;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.publication-type {
    background: #a84b2f;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.publication-content {
    flex: 1;
}

/* IMPROVED TITLE VISIBILITY */
.publication-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    color: #1a1a1a; /* Couleur plus sombre pour meilleure visibilité */
}

.publication-title a {
    color: #1a1a1a; /* Couleur très sombre pour les titres */
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 700; /* Plus gras */
}

.publication-title a:hover {
    color: #21808d;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Ombre subtile au survol */
}

.publication-authors {
    font-size: 0.95rem;
    color: #495057; /* Couleur plus sombre pour les auteurs */
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 500; /* Plus gras */
}

.publication-authors strong {
    color: #21808d;
    font-weight: 700; /* Très gras pour votre nom */
}

.publication-venue {
    font-size: 0.95rem;
    color: #343a40; /* Couleur plus sombre pour le venue */
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 500; /* Plus lisible */
}

.publication-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.citation-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #2da6b2;
    font-weight: 600; /* Plus visible */
}

.citation-count i {
    font-size: 0.8rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    background: #21808d;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover {
    background: #2da6b2;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 128, 141, 0.3);
}

/* Research Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #21808d, #2da6b2);
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #21808d, #2da6b2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

/* IMPROVED TOOL HEADER VISIBILITY */
.tool-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a; /* Couleur très sombre */
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tool-description {
    color: #495057; /* Couleur plus sombre */
    line-height: 1.5;
    font-weight: 500;
}

.tool-features {
    margin: 1.5rem 0;
}

.tool-features ul {
    list-style: none;
    padding: 0;
}

.tool-features li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0;
    color: #343a40; /* Couleur plus sombre */
    font-weight: 500;
}

.tool-features li i {
    color: #21808d;
    font-size: 0.9rem;
}

.tool-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tool-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tool-btn.primary {
    background: #21808d;
    color: white;
}

.tool-btn.primary:hover {
    background: #2da6b2;
    transform: translateY(-2px);
}

.tool-btn.secondary {
    background: transparent;
    color: #21808d;
    border: 2px solid #21808d;
}

.tool-btn.secondary:hover {
    background: #21808d;
    color: white;
}

/* Metrics Dashboard */
.metrics-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

/* IMPROVED METRICS OVERVIEW VISIBILITY */
.metrics-overview {
    text-align: center;
    margin-bottom: 2rem;
}

.metrics-overview h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a; /* Couleur très sombre */
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metrics-overview p {
    color: #495057; /* Couleur plus sombre */
    font-size: 1.1rem;
    font-weight: 500;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.metric-header i {
    font-size: 1.5rem;
    color: #21808d;
}

/* IMPROVED METRIC HEADER VISIBILITY */
.metric-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a; /* Couleur très sombre */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.metric-value {
    text-align: center;
    margin-bottom: 1rem;
}

.value-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #21808d;
    line-height: 1;
}

.value-label {
    display: block;
    font-size: 0.95rem;
    color: #495057; /* Couleur plus sombre */
    margin-top: 0.3rem;
    font-weight: 500;
}

.metric-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #495057; /* Couleur plus sombre */
    font-weight: 500;
}

.trend-up {
    color: #10b981;
}

/* Timeline Chart */
.timeline-chart {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* IMPROVED CHART TITLE VISIBILITY */
.timeline-chart h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a; /* Couleur très sombre */
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* External Profile Links */
.external-profiles {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* IMPROVED PROFILES TITLE VISIBILITY */
.external-profiles h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a; /* Couleur très sombre */
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.profile-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a1a; /* Couleur très sombre */
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 600; /* Plus gras */
}

.profile-link:hover {
    background: #21808d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 128, 141, 0.3);
}

.profile-link i:first-child {
    font-size: 1.2rem;
}

.profile-link i:last-child {
    font-size: 0.8rem;
    margin-left: auto;
}

/* Research Content Sections */
.research-content {
    display: none;
}

.research-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

/* GENERAL TEXT IMPROVEMENTS FOR BETTER VISIBILITY */
h1, h2, h3, h4, h5, h6 {
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Specific improvements for research page titles */
#research h3,
#research h4 {
    font-weight: 700 !important;
    color: #1a1a1a !important;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .research-stats-dashboard {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .research-tabs {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .research-tab {
        min-width: auto;
        padding: 0.8rem 1rem;
    }
    
    .search-filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .search-input-container {
        min-width: auto;
    }
    
    .filter-controls {
        justify-content: space-between;
    }
    
    .filter-select {
        flex: 1;
        min-width: auto;
    }
    
    .publications-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .publication-card {
        padding: 1rem;
    }
    
    .publication-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .publication-title {
        font-size: 1.1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .metric-card {
        padding: 1rem;
    }
    
    .value-number {
        font-size: 2rem;
    }
    
    .profile-links {
        grid-template-columns: 1fr;
    }
    
    .timeline-chart,
    .external-profiles {
        padding: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
    }

    /* Mobile title improvements */
    .publication-title {
        font-size: 1rem;
        font-weight: 700;
    }
    
    .tool-header h3 {
        font-size: 1.3rem;
        font-weight: 700;
    }
}

@media (max-width: 480px) {
    .research-stats-dashboard {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .publication-title {
        font-size: 0.95rem;
        font-weight: 700;
    }
    
    .publication-authors,
    .publication-venue {
        font-size: 0.85rem;
        font-weight: 500;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .tool-header h3 {
        font-size: 1.2rem;
        font-weight: 700;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Keyboard Navigation */
.research-tab:focus,
.search-input:focus,
.filter-select:focus,
.view-toggle-btn:focus,
.tool-btn:focus,
.profile-link:focus {
    outline: 2px solid #21808d;
    outline-offset: 2px;
}

/* Animation classes */
.animate-in {
    animation: slideInUp 0.6s ease-out;
}

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

/* HIGH CONTRAST MODE for better visibility */
@media (prefers-contrast: high) {
    .publication-title a {
        color: #000000 !important;
        font-weight: 800 !important;
    }
    
    .publication-authors {
        color: #333333 !important;
        font-weight: 600 !important;
    }
    
    .publication-venue {
        color: #2c2c2c !important;
        font-weight: 600 !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000000 !important;
        font-weight: 800 !important;
    }
}