/* Beranda Module Custom Styles */

/* Font Family */
:root {
    --font-primary: 'Poppins', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
}

body {
    font-family: var(--font-primary) !important;
}

/* Hero Section with Slider */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Fallback background when no slider images */
.hero-section:not(:has(.hero-slider)) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-section:not(:has(.hero-slider)) .hero-overlay {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider .swiper-slide {
    position: relative;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%);
    z-index: 2;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,0 1000,60 0,100"/></svg>') no-repeat center bottom;
    background-size: cover;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
}

/* Swiper Custom Styling */
.hero-slider .swiper-pagination {
    bottom: 30px !important;
}

.hero-slider .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.8) !important;
    opacity: 1;
}

.hero-slider .swiper-pagination-bullet-active {
    background: white !important;
    transform: scale(1.2);
}

.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    backdrop-filter: blur(10px);
}

.hero-slider .swiper-button-next:after,
.hero-slider .swiper-button-prev:after {
    font-size: 18px !important;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Slider Image Loading States */
.slider-image {
    transition: opacity 0.3s ease;
}

.slider-image.loading {
    opacity: 0;
}

.slider-image.loaded {
    opacity: 1;
}

.slider-image.error {
    opacity: 0.5;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-image.error::before {
    content: 'Image not available';
    color: #6c757d;
    font-size: 1rem;
    text-align: center;
    padding: 2rem;
}

/* Typography */
.display-4 {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-bold) !important;
    line-height: 1.2;
}

.lead {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-normal) !important;
    font-size: 1.25rem !important;
    line-height: 1.6;
}

.section-title {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-bold) !important;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-normal) !important;
}

.card-title {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-semibold) !important;
}

.card-text {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-normal) !important;
    line-height: 1.6;
}

/* Enhanced Search Bar */
.search-container .input-group {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 50px;
    overflow: hidden;
}

.search-container .form-control {
    border: none;
    font-family: var(--font-primary) !important;
    font-size: 1.1rem;
    font-weight: var(--font-weight-normal) !important;
    padding: 1rem 1.5rem;
    background: white;
}

.search-container .form-control:focus {
    box-shadow: none;
    background: white;
}

.search-container .btn-primary {
    border: none;
    padding: 0 2rem;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-semibold) !important;
}

.search-container .btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-1px);
}

/* Statistics Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Collection Cards */
.collection-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.collection-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.collection-card .card-body {
    padding: 1.5rem;
}

.collection-card .badge {
    font-size: 0.75rem;
    font-weight: 600;
}

.collection-card .card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.collection-card .card-title a:hover {
    color: #007bff !important;
}

.collection-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6c757d;
}

.collection-card .btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.collection-card .btn:hover {
    transform: translateY(-2px);
}

/* Enhanced spacing for collection cards grid */
.collection-card {
    margin-bottom: 1.5rem;
}

/* Better spacing between card content elements */
.collection-card .d-flex.justify-content-between {
    margin-bottom: 1.25rem;
}

.collection-card .card-title {
    margin-bottom: 1.25rem !important;
}

.collection-card .card-text {
    margin-bottom: 1.5rem !important;
}

/* Improved spacing for action buttons */
.collection-card .d-flex.gap-2 {
    margin-top: auto;
    padding-top: 1rem;
}

/* Enhanced grid spacing for collections */
.row.g-4 {
    margin-bottom: 2rem;
}

/* Responsive spacing adjustments */
@media (max-width: 768px) {
    .collection-card {
        margin-bottom: 1rem;
    }

    .collection-card .card-body {
        padding: 1.25rem !important;
    }

    .collection-card .card-title {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .collection-card .card-text {
        font-size: 0.85rem !important;
        margin-bottom: 1.25rem !important;
    }
}

@media (max-width: 576px) {
    .collection-card .card-body {
        padding: 1rem !important;
    }

    .collection-card .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .collection-card .d-flex.justify-content-between .text-muted {
        font-size: 0.8rem;
    }
}

/* Text Clamping */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* Feature Cards */
.feature-card {
    border-radius: 15px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: none;
}

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

.feature-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    border-radius: 25px;
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-semibold) !important;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.4);
}

.btn-outline-primary {
    border-radius: 25px;
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-medium) !important;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.2);
}

.btn-outline-secondary {
    border-radius: 25px;
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-medium) !important;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
    background-color: #6c757d;
}

/* Badges */
.badge {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-medium) !important;
    font-size: 0.75rem !important;
}

/* Statistics */
.stat-number {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-bold) !important;
}

.stat-label {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-medium) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Empty State */
.empty-state-icon {
    opacity: 0.5;
}

/* Text Elements */
.text-muted {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-normal) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary) !important;
}

h1 { font-weight: var(--font-weight-bold) !important; }
h2 { font-weight: var(--font-weight-bold) !important; }
h3 { font-weight: var(--font-weight-semibold) !important; }
h4 { font-weight: var(--font-weight-semibold) !important; }
h5 { font-weight: var(--font-weight-medium) !important; }
h6 { font-weight: var(--font-weight-medium) !important; }

/* Feature Cards */
.feature-card h5 {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-semibold) !important;
}

.feature-card p {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-normal) !important;
}

/* Citation Modal Styles */
.citation-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.citation-text pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Export Dropdown Styles */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    display: none;
    float: left;
    min-width: 200px;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
}

.export-menu.show {
    display: block;
}

.export-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.375rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

.export-menu .dropdown-item:hover,
.export-menu .dropdown-item:focus {
    color: #16181b;
    text-decoration: none;
    background-color: #f8f9fa;
}

.export-menu .dropdown-header {
    display: block;
    padding: 0.375rem 1rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.export-menu .dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

/* Export Dropdown Enhancements */
.dropdown-item {
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .display-4 {
        font-size: 2.5rem !important;
    }

    .stat-number {
        font-size: 2.5rem !important;
    }

    .search-container .input-group {
        max-width: 100%;
    }

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

    .search-container .btn-primary {
        padding: 0 1.5rem;
    }

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

    .feature-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem !important;
    }

    .lead {
        font-size: 0.95rem !important;
    }

    .stat-number {
        font-size: 2rem !important;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

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

.collection-card {
    animation: fadeInUp 0.6s ease-out;
}

.collection-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.collection-card:nth-child(even) {
    animation-delay: 0.2s;
}

/* Hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-primary:hover {
    color: #007bff !important;
    transition: color 0.2s ease;
}

/* Text clamping utilities */
.line-clamp-2,
.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
}

/* Dropdown styling */
.dropdown-header {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-weight-semibold) !important;
    font-size: 0.85rem !important;
    color: var(--bs-primary) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.5rem 0 0.25rem 0 !important;
    padding: 0.25rem 1rem !important;
}

.dropdown-divider {
    margin: 0.25rem 0 !important;
}

/* Citation modal styling */
.citation-text {
    font-family: 'Courier New', monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    word-break: break-word;
}

.citation-text code {
    background: transparent !important;
    color: #495057 !important;
    padding: 0 !important;
}

/* Pagination Styling */
.pagination {
    margin-bottom: 0;
}

.pagination-rounded .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #495057;
    background-color: #fff;
    transition: all 0.2s ease;
}

.pagination-rounded .page-link:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.pagination-rounded .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.pagination-rounded .page-item.disabled .page-link {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Search Info Styling */
.search-info {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
}

.search-info small {
    font-size: 0.85rem;
}

/* No Results Styling */
.no-results-icon {
    opacity: 0.5;
}

.no-results-icon .fa-search {
    color: #dee2e6;
}

/* Search Results Page Styles */

/* Search Header Section */
.search-header-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

/* Document Cover Container */
.document-cover-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
    align-self: flex-start; /* Align to top of row */
}

.document-cover-container .document-cover {
    width: 180px;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255,255,255,0.1);
}

.document-cover-container .document-cover:hover {
    transform: scale(1.05);
}

.document-cover-container .no-image-placeholder {
    width: 180px;
    height: 240px;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    margin: 0 auto;
    border: 2px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.document-cover-container .document-cover-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px; /* Slightly less than container */
}

.document-cover-container .no-image-placeholder p {
    font-size: 0.8rem;
    margin: 0;
    font-weight: 500;
}

/* Advanced Search Styles */
.advanced-search-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

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

.advanced-search-panel .form-label {
    color: var(--bs-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.advanced-search-panel .form-control,
.advanced-search-panel .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.advanced-search-panel .form-control:focus,
.advanced-search-panel .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.advanced-search-panel .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.advanced-search-panel .btn:hover {
    transform: translateY(-1px);
}

/* Responsive adjustments for search results */
@media (max-width: 768px) {
    .document-cover-container .document-cover,
    .document-cover-container .no-image-placeholder {
        width: 120px;
        height: 160px;
    }

    .document-cover-container {
        margin-bottom: 0.75rem;
    }

    .result-title {
        font-size: 1rem !important;
    }

    .result-abstract {
        font-size: 0.85rem !important;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .advanced-search-panel .row > div {
        margin-bottom: 1rem;
    }

    .advanced-search-panel .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .advanced-search-panel .d-flex > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .document-cover-container .document-cover,
    .document-cover-container .no-image-placeholder {
        width: 100px;
        height: 140px;
    }

    .document-cover-container .no-image-placeholder p {
        font-size: 0.7rem;
    }

    .social-share-compact .btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .advanced-search-panel .form-label {
        font-size: 0.85rem;
    }

    .advanced-search-panel .row .col-md-6 {
        margin-bottom: 0.75rem;
    }
}

.search-title {
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.search-summary {
    color: #718096;
}

/* Search Result Cards */
.search-result-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #e9ecef;
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.result-title {
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.result-title a:hover {
    color: #007bff !important;
}

.result-abstract {
    color: #718096;
    margin-bottom: 1rem;
}

/* Social Share Compact */
.social-share-compact .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.8rem;
}

.social-share-compact .btn-outline-primary:hover {
    background-color: #1877f2;
    border-color: #1877f2;
    color: white;
}

.social-share-compact .btn-outline-info:hover {
    background-color: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.social-share-compact .btn-outline-secondary:hover {
    background-color: #0077b5;
    border-color: #0077b5;
    color: white;
}

/* Enhanced No Results */
.no-results-icon {
    opacity: 0.3;
    margin-bottom: 2rem;
}

/* Additional utility classes */
.min-vh-75 {
    min-height: 75vh;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.border-radius-xl {
    border-radius: 1rem;
}

.shadow-soft {
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.hover-primary:hover {
    color: #007bff !important;
    transition: color 0.2s ease;
}

/* Document Detail Page Styles */

/* Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Document Header Section */
.document-header-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0 4rem 0;
    margin-top: -1rem;
}

.document-header-section .row {
    align-items: flex-start !important;
}

.document-header-section .document-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 0;
    min-height: 240px; /* Match cover height for better alignment */
}

/* Ensure title starts at the same level as cover */
.document-header-section .document-title {
    margin-top: 0;
    line-height: 1.2;
}

.document-cover-container {
    position: relative;
    text-align: center;
}

.document-cover {
    max-width: 280px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.document-cover:hover {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 280px;
    height: 380px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    color: #6c757d;
    margin: 0 auto;
}

.gmd-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
}

.document-title {
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.authors-section .authors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.author-link {
    font-size: 0.9rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.author-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.2);
}

.social-buttons .btn {
    border-radius: 25px;
    transition: all 0.2s ease;
}

.social-buttons .btn:hover {
    transform: translateY(-2px);
}

/* Compact Abstract in Document Header */
.document-abstract {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.abstract-title {
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.abstract-content {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.abstract-content::-webkit-scrollbar {
    width: 4px;
}

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

.abstract-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
}

.abstract-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #6c757d;
    text-align: justify;
    text-justify: inter-word;
    margin-bottom: 0;
}

/* Legacy Abstract Section (if still used elsewhere) */
.abstract-section .abstract-card {
    border-radius: 15px;
    overflow: hidden;
}

.abstract-section .abstract-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    text-align: justify;
    text-justify: inter-word;
}

/* Details Section */
.details-section {
    background: #f8f9fa;
}

.info-card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

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

.info-card dl.row dt {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card dl.row dd {
    font-weight: 500;
    color: #495057;
}

.contributors-list .contributor-item {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.contributors-list .contributor-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.topics-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    transition: all 0.2s ease;
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.topic-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
}

/* Attachments Section */
.attachments-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.attachments-section .section-title,
.attachments-section .section-subtitle {
    color: white;
}

.attachment-card {
    background: rgba(255, 255, 255, 0.95);
    color: #212529;
    border-radius: 15px;
    transition: all 0.3s ease;
}

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

.file-icon {
    margin-bottom: 1rem;
}

.attachment-card .btn {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.attachment-card .btn:hover {
    transform: translateY(-2px);
}

/* Alert styling for attachments section */
.attachments-section .alert {
    background: rgba(255, 255, 255, 0.9);
    color: #495057;
    border: none;
    border-radius: 15px;
}

.attachments-section .alert .alert-heading {
    color: #212529;
}

/* Responsive Design for Detail Page */
@media (max-width: 768px) {
    .document-header-section {
        padding: 2rem 0;
    }

    .document-title {
        font-size: 1.75rem;
    }

    .document-cover {
        max-width: 200px;
    }

    .no-image-placeholder {
        width: 200px;
        height: 280px;
    }

    .authors-section .authors-list {
        justify-content: center;
    }

    .action-buttons {
        text-align: center;
    }

    .social-buttons {
        justify-content: center;
    }

    .info-card dl.row dt {
        font-size: 0.8rem;
    }

    .contributors-list .contributor-item {
        padding: 0.75rem;
    }

    .avatar-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .document-header-section {
        padding: 1.5rem 0;
    }

    .document-title {
        font-size: 1.5rem;
    }

    .action-buttons .dropdown {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .action-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .social-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .attachment-card {
        margin-bottom: 1rem;
    }
}