/* GOV.UK Heading Styles - Desktop First */
/* Base styles for desktop (screens wider than 640px) */

/* Custom CSS following GOV.UK Design System principles */
:root {
    /* Main brand colors */
    --primary-base-color: #830065;
    --secondary-base-color: #041c2c;
}

.additional-information-sidebar, nav.nav-contents {
    background-color: #f8f9fa;
    border-left: 0px solid #007bff;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-bottom: 2rem;
    border-radius: 0px;
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
}

    .sidebar-title, nav.nav-contents > h3 {
        color: var(--primary-base-color);
        border-bottom: 2px solid #dee2e6;
        padding-bottom: 0.75rem;
        margin-bottom: 1.5rem;
        font-size: 2.1rem;
        font-weight: 600;
    }

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

    .sidebar-section:last-child {
        margin-bottom: 0;
    }

.section-title {
    color: var(--primary-base-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

nav.nav-contents > ul > li > a {
    color: var(--secondary-base-color);
}

/* Navigation Links Styles */
.nav-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link-item {
    margin-bottom: 0.5rem;
}

.nav-link-item:last-child {
    margin-bottom: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1.6rem;
}

.nav-link:hover {
    background-color: lightgray;
    color: white;
    text-decoration: none;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

.external-icon {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 0.25rem;
    display:none;
}

.nav-link:hover .external-icon {
    opacity: 1;
}

/* ===== ASSETS STYLES (UPDATED) ===== */
/* File icon, size, and download icon grouped together at the bottom */
.assets-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.asset-item {
    margin-bottom: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: white;
    overflow: hidden;
}

.asset-item:last-child {
    margin-bottom: 0;
}

.asset-link {
    display: block; /* Change from flex to block */
    padding: 0.75rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .asset-link:hover {
        background-color: lightgray;
        color: white;
        text-decoration: none;
    }

.file-title {
    display: block;
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.asset-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* space between size, PDF icon, download icon */
    font-size: 1.3rem;
}

.file-size {
    opacity: 0.8;
}

.file-icon {
    font-size: 1.75rem;
    line-height: 1; /* prevents extra vertical space */
}

.file-download-icon {
    font-size: 1.3rem;
    margin-left: auto; /* pushes download icon to the right */
}

.asset-description {
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

    .asset-link:hover + .asset-description,
    .asset-description:hover {
        background-color: #e8f5e8;
        color: #155724;
    }
/* ===== END ASSETS STYLES ===== */

/* Entries Styles */
.entries-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.entry-item {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

    .entry-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

.entry-link {
    display: block;
    padding: 1.45rem;
    color: var(--secondary-base-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

    .entry-link:hover {
        text-decoration: none;
    }

.entry-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--secondary-base-color);
    line-height: 1.3;
}

.entry-description {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .additional-information-sidebar {
        margin: 1rem 0;
        border-left: none;
        border-top: 4px solid #007bff;
    }

    .nav-link,
    .asset-link,
    .entry-link {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .additional-information-sidebar {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .nav-link,
    .asset-link {
        border: 1px solid #ddd;
        color: #000;
    }
}
