/* ============================================
   CLEAN APA JOURNAL-STYLE PUBLICATIONS CSS
   Traditional reference list appearance
   ============================================ */

/* Publications List Container */
.publications-apa-list {
    max-width: 900px;
    margin: 0 auto;
}

/* Year Filters */
.year-filters {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.year-btn {
    padding: 8px 20px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.year-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.year-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

/* Year Groups */
.year-group {
    margin-bottom: 50px;
}

.year-heading {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

/* Individual Publication Reference */
.pub-reference {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--white);
    border-left: 4px solid transparent;
    border-radius: 5px;
    transition: var(--transition);
    position: relative;
}

.pub-reference:hover {
    background: var(--bg-light);
    border-left-color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

/* Reference Text - Clean APA Format */
.reference-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: left;
    margin-bottom: 0;
    /* Hanging indent like proper APA */
    padding-left: 36px;
    text-indent: -36px;
}

/* Author Name Highlighting */
.author-name {
    font-weight: 700;
    color: var(--primary-color);
}

/* Journal/Book Title Italics */
.journal-name {
    font-style: italic;
}

/* Volume in Italics */
.volume {
    font-style: italic;
}

/* DOI Links */
.doi-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
    word-break: break-all;
}

.doi-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Award Badge */
.award-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    background: #FFF8E1;
    color: #F57C00;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Preprint Badge */
.preprint-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #FFF3E0;
    color: #E65100;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 8px;
}

/* Access Icons - Hidden by default, appear on hover */
.access-icons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-left: 36px; /* Match hanging indent */
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.pub-reference:hover .access-icons {
    opacity: 1;
    transform: translateY(0);
}

.access-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-size: 0.9rem;
}

.access-icon:hover {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Open Access Icon - Green */
.access-icon.open-access {
    color: #27AE60;
    border-color: #27AE60;
}

.access-icon.open-access:hover {
    background: #27AE60;
    color: var(--white);
}

/* Tooltip on Hover */
.access-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.access-icon::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.access-icon:hover::after,
.access-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Special Styling for Different Publication Types */
.pub-reference.preprint {
    border-left-color: #FF9800;
}

.pub-reference.conference {
    border-left-color: #9C27B0;
}

/* Metrics Section (keeping from before) */
.metrics-section {
    margin-top: 60px;
    text-align: center;
}

.metrics-section h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.metric-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.metric-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.metric-card h4 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.metric-source {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Print Styles */
@media print {
    .year-filters,
    .access-icons,
    .metrics-section {
        display: none !important;
    }
    
    .pub-reference {
        background: white;
        border: none;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .reference-text {
        font-size: 11pt;
        line-height: 2;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .reference-text {
        font-size: 0.95rem;
        padding-left: 24px;
        text-indent: -24px;
    }
    
    .access-icons {
        padding-left: 24px;
        opacity: 1; /* Always show on mobile */
        transform: translateY(0);
    }
    
    .year-heading {
        font-size: 1.5rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pub-reference {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .reference-text {
        font-size: 0.9rem;
        padding-left: 0;
        text-indent: 0;
    }
    
    .access-icons {
        padding-left: 0;
        flex-wrap: wrap;
    }
    
    .access-icon {
        width: 36px;
        height: 36px;
    }
}

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

.pub-reference {
    animation: fadeInUp 0.5s ease;
}
