/* ==========================================================================
   CityU DSpace Modern Theme (dspace-style.css) - FINAL & COMPLETE
   ========================================================================== */

:root {
    --primary-color: #005A9C;
    --primary-hover: #004375;
    --secondary-color: #475569;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--background-color);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==========================================================================
   Header & Footer
   ========================================================================== */
.header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 4px solid var(--primary-color);
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03); /* Subtle shadow for depth */
}

/* Flexbox layout to align logo and title side-by-side */
.header-container {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header img {
    max-height: 65px;
    display: block; /* Removes weird spacing under images */
}

.header-logo-link {
    flex-shrink: 0; /* Prevents the logo from squishing */
}

/* Elegant vertical line separating logo and text */
.header-divider {
    width: 2px;
    height: 45px;
    background-color: #e2e8f0;
    border-radius: 2px;
}

/* Styling specifically for the header title */
.site-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--secondary-color); /* Dark slate gray for a professional look */
    margin: 0; /* Overrides the default huge margins on h1 */
    letter-spacing: 0.02em;
}

.site-title a {
    color: inherit; /* Inherit the color from the parent h1 */
    text-decoration: none; /* Remove underline */
    cursor: pointer; /* Keep cursor as pointer to indicate clickability */
}

.site-title a:hover,
.site-title a:focus {
    color: var(--primary-color); /* Optional: add a subtle hover effect */
    text-decoration: none;
}

/* Makes sure the header stacks nicely on mobile phones */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-divider {
        display: none; /* Hide the vertical line on mobile */
    }
}

footer {
    margin-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

    footer a {
        color: var(--primary-color);
        text-decoration: none;
        padding: 0 5px;
    }

/* Cards & General Containers */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

h1 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    color: #222;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Description Box */
.department-description {
    background-color: #f0f7ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 0 6px 6px 0;
    color: #444;
    line-height: 1.6;
}

    .department-description p:last-child {
        margin-bottom: 0;
    }

/* Forms & Buttons */
input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-width: 100%;
}

select {
    padding: 8px 35px 8px 12px !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-width: 100%;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23555" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    cursor: pointer;
}

    select::-ms-expand {
        display: none;
    }

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
    }

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

    .btn-secondary:hover {
        background-color: #5a6268;
    }

/* Search Page: Result Count & Facets */
.result-count {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-muted);
    background: #e2e8f0;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.facet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .facet-list li {
        padding: 8px 0;
        border-bottom: 1px dashed var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

        .facet-list li a {
            line-height: 1.4;
            word-break: break-word;
        }

.facet-count {
    font-size: 12px;
    background: #e2e8f0;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Active Filter Styling */
.facet-item {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.facet-remove {
    color: #ef4444;
    font-weight: bold;
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

    .pagination a, .pagination span {
        padding: 8px 14px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        border: 1px solid transparent;
        transition: all 0.2s ease;
    }

    .pagination a {
        border-color: var(--border-color);
        background-color: #ffffff;
        color: var(--primary-color);
    }

        .pagination a:hover {
            background-color: #f0f7ff;
            border-color: var(--primary-color);
        }

    .pagination .current-page {
        background-color: var(--primary-color);
        color: #ffffff;
        border-color: var(--primary-color);
    }

    .pagination span:not(.current-page) {
        color: var(--text-muted);
        padding: 8px 4px;
    }

/* Details Page: Identifier Bar */
.identifier-bar {
    background-color: #e9ecef;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    font-size: 14px;
}

    .identifier-bar code {
        color: #d63384;
        font-weight: bold;
        margin-left: 10px;
        font-size: 15px;
    }

/* ==========================================================================
   UPGRADED & MODERNIZED TABLE STYLES (Zebra & Rounded Corners)
   ========================================================================== */
.table-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 20px;
}

.files-table, .itemDisplayTable {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

    .files-table td, .itemDisplayTable td {
        padding: 14px 16px;
        border: none;
    }

    /* Zebra-striping */
    .files-table tbody tr:nth-of-type(odd),
    .itemDisplayTable tr:nth-of-type(odd) {
        background-color: #f8fafc;
    }

    /* Files Table Headers */
    .files-table th {
        background-color: #f1f5f9;
        padding: 12px 16px;
        text-align: left;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        border-bottom: 2px solid var(--border-color);
    }

    /* Metadata Table Labels */
    .itemDisplayTable .metadataFieldLabel {
        font-weight: 600;
        color: var(--text-main);
        width: 20%;
        background-color: transparent !important;
        padding-left: 16px;
        border-right: 1px solid var(--border-color);
    }

    .itemDisplayTable .metadataFieldValue {
        padding-left: 20px;
    }

/* ==========================================================================
   Details Page - Copyright Notice Panel
   ========================================================================== */
.copyright-panel {
    background-color: #f8fbff;
    border: 1px solid #cce3f6;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 16px 24px;
    margin-top: 30px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 90, 156, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .copyright-panel:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 90, 156, 0.08);
    }

.copyright-icon {
    color: var(--primary-color);
    background-color: #e0effc;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copyright-text {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    font-weight: 500;
}

    .copyright-text p {
        margin: 0;
    }

@media (max-width: 576px) {
    .copyright-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .copyright-icon {
        padding: 10px;
    }
}
