/* ========================================
   DOWNLOADS PAGE – custom styles
   (for downloads.blade.php)
   BRA Blue + Gold theme
======================================== */

/* Downloads Page Modern Design */
.downloads-modern {
    padding: 100px 0;
    background: #f7f9fb;
    position: relative;
}

.downloads-modern .downloads-section__container {
    width: 100%;
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 1400px) {
    .downloads-modern .downloads-section__container {
        padding-left: 48px;
        padding-right: 48px;
    }
}

.downloads-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(6, 96, 127, 0.05), transparent);
    pointer-events: none;
}

/* Section Header */
.downloads-header {
    text-align: center;
    margin-bottom: 60px;
}

.downloads-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #06607f, #0887b5);
    color: #ffffff;
    border-radius: 25px;
    padding: 10px 25px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.downloads-header__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.downloads-header__subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== Left / Right Layout ========== */
.downloads-layout {
    display: grid;
    grid-template-columns: minmax(300px, 320px) 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

.downloads-sidebar {
    position: sticky;
    top: 24px;
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    min-width: 0;
}

.downloads-sidebar:hover {
    border-color: rgba(6, 96, 127, 0.2);
    box-shadow: 0 12px 48px rgba(6, 96, 127, 0.08);
}

.downloads-sidebar__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #06607f, #0887b5);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.downloads-sidebar__header i {
    font-size: 1.25rem;
    opacity: 0.95;
}

.downloads-sidebar__nav {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.downloads-sidebar__nav .category-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 6px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: #f8fafb;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    text-decoration: none;
    transition: all 0.25s ease;
}

.downloads-sidebar__nav .category-pill:last-child {
    margin-bottom: 0;
}

.downloads-sidebar__nav .category-pill i {
    width: 22px;
    text-align: center;
    color: #06607f;
    font-size: 1rem;
    flex-shrink: 0;
}

.downloads-sidebar__nav .category-pill span {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.35;
}

.downloads-sidebar__nav .category-pill:hover {
    background: rgba(6, 96, 127, 0.08);
    border-color: rgba(6, 96, 127, 0.15);
    color: #06607f;
}

.downloads-sidebar__nav .category-pill.active {
    background: linear-gradient(135deg, #06607f, #0887b5);
    border-color: #06607f;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(6, 96, 127, 0.25);
}

.downloads-sidebar__nav .category-pill.active i {
    color: #ffffff;
}

.downloads-main {
    min-width: 0;
}

/* ========== Downloads Table ========== */
.downloads-table-wrapper {
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    overflow: visible;
    margin-bottom: 40px;
}

.downloads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    table-layout: fixed;
    min-width: 880px;
}

.downloads-table thead {
    background: linear-gradient(135deg, #06607f, #0887b5);
    color: #ffffff;
}

.downloads-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.downloads-table thead th.col-num {
    width: 4%;
    min-width: 48px;
    text-align: center;
}

.downloads-table thead th.col-title {
    width: 45%;
}

.downloads-table thead th.col-category {
    width: 22%;
}

.downloads-table thead th.col-type {
    width: 10%;
    min-width: 70px;
}

.downloads-table thead th.col-actions {
    width: 22%;
    min-width: 260px;
    text-align: center;
}

.downloads-table tbody tr.download-row {
    transition: background-color 0.2s ease;
}

.downloads-table tbody tr.download-row:nth-child(even) {
    background: #f8fafb;
}

.downloads-table tbody tr.download-row:hover {
    background: rgba(6, 96, 127, 0.06);
}

.downloads-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.downloads-table tbody td.col-actions {
    overflow: visible;
    white-space: nowrap;
    min-width: 260px;
}

.downloads-table .col-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.downloads-table .col-title .download-title {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.downloads-table tbody tr:last-child td {
    border-bottom: none;
}

.downloads-table .col-num {
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

.downloads-table .col-category .download-category {
    display: inline-block;
    background: rgba(6, 96, 127, 0.1);
    color: #06607f;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.downloads-table .file-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, #D4AF37, #E5C65A);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.downloads-table .download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    overflow: visible;
    min-width: 0;
}

.downloads-table .download-actions .download-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s ease;
    min-width: 110px;
}

.downloads-table .download-actions .download-btn.primary {
    min-width: 120px;
}

.downloads-table .download-actions .download-btn.secondary {
    min-width: 95px;
}

.downloads-table .download-actions .download-btn i {
    flex-shrink: 0;
    width: 1em;
    text-align: center;
    font-size: 1em;
    line-height: 1;
}

.downloads-table .download-actions .download-btn span {
    flex-shrink: 0;
}

.downloads-table .download-actions .download-btn.secondary i {
    color: inherit;
}

/* Empty state (table section) */
.downloads-main .downloads-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
}

.downloads-main .downloads-empty i {
    font-size: 3.5rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
    display: block;
}

.downloads-main .downloads-empty h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}

.downloads-main .downloads-empty p {
    color: #6b7280;
    margin: 0;
    font-size: 0.95rem;
}

/* Search and Filter Section */
.downloads-filter {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.downloads-filter .filter-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}

.downloads-filter .search-box {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.downloads-filter .search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafbfc;
}

.downloads-filter .search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 14px;
}

.downloads-filter .search-box input:focus {
    outline: none;
    border-color: #06607f;
    box-shadow: 0 0 0 2px rgba(6, 96, 127, 0.12);
    background: #ffffff;
}

.downloads-filter .filter-select {
    min-width: 180px;
}

.downloads-filter .filter-select select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.downloads-filter .filter-select select:focus {
    outline: none;
    border-color: #06607f;
    box-shadow: 0 0 0 2px rgba(6, 96, 127, 0.12);
    background: #ffffff;
}

/* Category Pills – used in sidebar only (vertical list styled above) */
.category-pill {
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

/* Category Pills – used in sidebar only (vertical list styled above) */
.category-pill {
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.download-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Download button – white text/icon for visibility on gold */
.download-btn.primary {
    background: linear-gradient(135deg, #D4AF37, #E5C65A);
    color: #ffffff !important;
    border: none;
}

.download-btn.primary i,
.download-btn.primary .fas,
.download-btn.primary .fa-solid {
    color: #ffffff !important;
}

.download-btn.primary:hover {
    background: linear-gradient(135deg, #B8961F, #D4AF37);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    color: #ffffff !important;
}

.download-btn.primary:hover i,
.download-btn.primary:hover .fas,
.download-btn.primary:hover .fa-solid {
    color: #ffffff !important;
}

.download-btn.secondary {
    background: transparent;
    border: 2px solid #06607f;
    color: #06607f;
}

.download-btn.secondary:hover {
    background: #06607f;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Stats Section */
.downloads-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #D4AF37;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #06607f, #0887b5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

/* Empty State */
.downloads-modern .empty-state {
    text-align: center;
    padding: 80px 20px;
}

.downloads-modern .empty-state i {
    font-size: 80px;
    color: #e5e7eb;
    margin-bottom: 20px;
}

.downloads-modern .empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.downloads-modern .empty-state p {
    color: #6b7280;
}

/* Responsive – downloads page */
@media (max-width: 992px) {
    .downloads-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .downloads-sidebar {
        position: static;
    }

    .downloads-sidebar__nav {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .downloads-sidebar__nav .category-pill {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .downloads-modern {
        padding: 60px 0;
    }

    .downloads-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 35px;
    }

    .downloads-layout {
        margin-bottom: 30px;
    }

    .downloads-sidebar__nav {
        grid-template-columns: 1fr;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
    }

    .downloads-filter .filter-row {
        flex-direction: column;
    }

    .downloads-filter .search-box {
        min-width: 100%;
    }

    .downloads-header__title {
        font-size: 2rem;
    }

    .downloads-table-wrapper {
        margin-bottom: 24px;
        border-radius: 12px;
        overflow-x: auto;
    }

    .downloads-table thead th,
    .downloads-table tbody td {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .downloads-table .download-actions {
        flex-direction: column;
    }

    .downloads-table .download-actions .download-btn {
        width: 100%;
    }
}
