/* =============================================
   Modern Downloads Section
   ============================================= */

/* Hero – compact section heading */
.downloads-hero {
    padding: 14px 0 12px;
    margin-bottom: 28px;
    border-bottom: 2px solid #e0e8f8;
}

.downloads-hero-icon {
    font-size: 1.3rem;
    color: #1e40a6;
    display: inline;
    margin-right: 8px;
    opacity: 0.85;
}

.downloads-hero-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: #0d2461;
    display: inline;
    letter-spacing: 0;
}

/* Download Cards */
.download-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(13, 36, 97, 0.18);
}

.download-card-header {
    background: linear-gradient(135deg, #0d2461 0%, #1e40a6 100%);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.download-card-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.download-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

.download-card-body {
    padding: 16px 12px 12px;
    flex: 1;
}

/* Loading spinner */
.download-card-loading {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 1.4rem;
}

/* File Tree Modern Override */
.download-card-body ul.jqueryFileTree {
    font-size: 14px;
    line-height: 1.4;
}

.download-card-body ul.jqueryFileTree li {
    padding-left: 10px;
    margin: 6px 0;
    white-space: normal;
    list-style: none;
}

.download-card-body ul.jqueryFileTree a {
    color: #0d2461;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    white-space: normal;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-card-body ul.jqueryFileTree a:hover {
    background: #e6ecf8;
    color: #1e40a6;
    text-decoration: none;
}

/* Icons inside file tree links – pass mouse events through to the <a> */
.download-card-body ul.jqueryFileTree a i {
    pointer-events: none;
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* =============================================
   Card Cover / PDF Thumbnail
   ============================================= */
.download-card-cover {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: #eef2fb;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #dce6f8;
}

.pdf-thumb-canvas {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}

.cover-icon-fallback {
    color: #1e40a6;
    font-size: 4.5rem;
    opacity: 0.18;
}

/* =============================================
   File type icon colours
   ============================================= */
.file-icon-pdf     { color: #e53e3e; }
.file-icon-excel   { color: #276749; }
.file-icon-word    { color: #2b6cb0; }
.file-icon-ppt     { color: #c05621; }
.file-icon-image   { color: #6b46c1; }
.file-icon-video   { color: #e53e3e; }
.file-icon-audio   { color: #d69e2e; }
.file-icon-archive { color: #d97706; }
.file-icon-folder  { color: #d97706; }
.file-icon-txt     { color: #718096; }
.file-icon-default { color: #4a5568; }

/* =============================================
   Inline PDF thumbnail in the file list
   ============================================= */
.pdf-file-thumb-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 72px;
    border: 1px solid #c8d4ee;
    border-radius: 5px;
    overflow: hidden;
    background: #f4f6fb;
    pointer-events: none;    /* pass clicks through to the <a> */
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 1px 4px rgba(13,36,97,0.10);
}

.pdf-file-thumb {
    display: none;
    width: 56px;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.pdf-icon-fb {
    pointer-events: none;
    font-size: 24px;
}
