/* ==========================================================================
   Biazotto Solutions - Downloads & Ferramentas V2 Design
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --dl-primary: #0284c7;
    --dl-primary-light: #2bb0ef;
    --dl-primary-dark: #0369a1;
    --dl-secondary: #0f172a;
    --dl-dark-bg: #0b132b;
    --dl-dark-bg-2: #1c2541;
    --dl-text-main: #1e293b;
    --dl-text-muted: #64748b;
    --dl-card-bg: #ffffff;
    --dl-card-border: rgba(226, 232, 240, 0.8);
    --dl-radius: 16px;
    --dl-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --dl-shadow-hover: 0 20px 35px -5px rgba(2, 132, 199, 0.15), 0 10px 15px -5px rgba(2, 132, 199, 0.08);
}

.dl-page-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--dl-text-main);
    background-color: #f8fafc;
}

.dl-page-body h1, 
.dl-page-body h2, 
.dl-page-body h3, 
.dl-page-body h4, 
.dl-page-body h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.dl-hero {
    background: linear-gradient(135deg, var(--dl-dark-bg) 0%, var(--dl-dark-bg-2) 100%);
    padding: 70px 0 90px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
}

.dl-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 20%, rgba(43, 176, 239, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.dl-hero .breadcrumbs {
    margin-bottom: 20px;
}

.dl-hero .breadcrumbs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 18px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dl-hero .breadcrumbs ul li {
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
}

.dl-hero .breadcrumbs ul li a {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.2s;
}

.dl-hero .breadcrumbs ul li a:hover {
    color: #ffffff;
}

.dl-hero .breadcrumbs ul li + li::before {
    content: '/';
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.3);
}

.dl-hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    line-height: 1.15;
    background: linear-gradient(to right, #ffffff 40%, #7dd3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .dl-hero-title {
        font-size: 2.2rem;
    }
}

.dl-hero-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Filter & Search Toolbar
   -------------------------------------------------------------------------- */
.dl-toolbar-section {
    margin-top: -45px;
    position: relative;
    z-index: 20;
    margin-bottom: 45px;
}

.dl-toolbar-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 22px 28px;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dl-search-box {
    position: relative;
    flex: 1 1 300px;
    max-width: 420px;
}

.dl-search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
}

.dl-search-input {
    width: 100%;
    height: 48px;
    padding: 10px 18px 10px 48px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 14px;
    color: var(--dl-text-main);
    transition: all 0.25s ease;
    outline: none;
}

.dl-search-input:focus {
    background: #ffffff;
    border-color: var(--dl-primary-light);
    box-shadow: 0 0 0 3px rgba(43, 176, 239, 0.15);
}

.dl-categories-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.dl-cat-pill {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dl-cat-pill:hover {
    color: var(--dl-primary);
    background: #e0f2fe;
    border-color: #bae6fd;
}

.dl-cat-pill.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--dl-primary) 0%, var(--dl-primary-light) 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* --------------------------------------------------------------------------
   Downloads Grid & Cards
   -------------------------------------------------------------------------- */
.dl-grid-section {
    padding-bottom: 70px;
}

.dl-card-col {
    margin-bottom: 30px;
    display: flex;
}

.dl-card {
    background: var(--dl-card-bg);
    border-radius: var(--dl-radius);
    border: 1px solid var(--dl-card-border);
    box-shadow: var(--dl-shadow);
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dl-primary), var(--dl-primary-light));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.dl-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--dl-shadow-hover);
    border-color: rgba(43, 176, 239, 0.3);
}

.dl-card:hover::before {
    opacity: 1;
}

/* Card Header */
.dl-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dl-badge-cat {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(43, 176, 239, 0.1);
    color: var(--dl-primary);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dl-badge-ver {
    display: inline-block;
    padding: 3px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

/* Icon Box */
.dl-card-body-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.dl-icon-box {
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(43, 176, 239, 0.12), rgba(2, 132, 199, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dl-primary);
    font-size: 26px;
    transition: all 0.3s ease;
    border: 1px solid rgba(43, 176, 239, 0.2);
}

.dl-card:hover .dl-icon-box {
    background: linear-gradient(135deg, var(--dl-primary) 0%, var(--dl-primary-light) 100%);
    color: #ffffff;
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.3);
}

.dl-title-wrap {
    flex: 1;
}

.dl-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dl-secondary);
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.dl-card-desc {
    color: var(--dl-text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Metadata Strip */
.dl-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #64748b;
    border: 1px solid #f1f5f9;
}

.dl-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dl-meta-item i {
    font-size: 13px;
    color: #94a3b8;
}

.dl-meta-item.verified i {
    color: #10b981;
}

/* Actions */
.dl-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dl-btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--dl-primary) 0%, var(--dl-primary-light) 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
    border: none;
    cursor: pointer;
}

.dl-btn-download:hover {
    background: linear-gradient(135deg, var(--dl-primary-dark) 0%, var(--dl-primary) 100%);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
    transform: translateY(-2px);
}

.dl-btn-download i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.dl-btn-download:hover i {
    transform: translateY(2px);
}

.dl-btn-mirror {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 14px;
    background: transparent;
    color: #64748b !important;
    font-weight: 600;
    font-size: 12px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dl-btn-mirror:hover {
    background: #f1f5f9;
    color: var(--dl-primary) !important;
    border-color: var(--dl-primary-light);
}

/* Empty State */
.dl-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    margin: 30px auto;
    max-width: 600px;
}

.dl-empty-state i {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Support Notice / Bottom Banner
   -------------------------------------------------------------------------- */
.dl-support-section {
    padding-bottom: 70px;
}

.dl-support-box {
    background: linear-gradient(135deg, #0b132b 0%, #1e293b 100%);
    border-radius: 22px;
    padding: 40px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(11, 19, 43, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dl-support-box::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(43, 176, 239, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.dl-support-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.dl-support-text {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.dl-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #ffffff !important;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.25s ease;
}

.dl-support-btn:hover {
    background: #20bd5a;
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Download Progress Modal (Live HUD)
   -------------------------------------------------------------------------- */
.dl-modal-content {
    background: #0f172a;
    border-radius: 24px;
    border: 1px solid rgba(0, 242, 255, 0.25);
    color: #f8fafc;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 242, 255, 0.1);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.dl-modal-badge {
    background: rgba(0, 242, 255, 0.12);
    color: #00f2ff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 5px 14px;
    border: 1px solid rgba(0, 242, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.dl-modal-icon-wrap {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.2) 0%, rgba(15, 23, 42, 0.5) 70%);
    border: 2px solid rgba(0, 242, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #00f2ff;
    margin: 0 auto 20px;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.3);
    transition: all 0.3s ease;
}

.dl-modal-icon-wrap.downloading {
    animation: dlPulseGlow 1.8s infinite;
}

@keyframes dlPulseGlow {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 242, 255, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 35px rgba(0, 242, 255, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 242, 255, 0.3); }
}

.dl-modal-icon-wrap.success {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(15, 23, 42, 0.5) 70%);
}

.dl-modal-icon-wrap.error {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
    background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, rgba(15, 23, 42, 0.5) 70%);
}

.dl-modal-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.dl-modal-subtitle {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.5;
}

.dl-progress-container {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dl-progress-bar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    height: 16px;
    overflow: hidden;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dl-progress-bar-fill {
    height: 100%;
    border-radius: 30px;
    background: linear-gradient(90deg, #0284c7 0%, #00f2ff 100%);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dl-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: dlShimmer 1.5s infinite;
}

@keyframes dlShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.text-cyan {
    color: #00f2ff !important;
}

.dl-error-box .alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 12px;
}

.dl-success-box .card-success-inner {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 14px;
    padding: 16px;
    color: #6ee7b7;
}

.btn-cyan {
    background: linear-gradient(135deg, #0284c7 0%, #00f2ff 100%);
    color: #0f172a !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
    transition: all 0.25s ease;
}

.btn-cyan:hover {
    background: linear-gradient(135deg, #00f2ff 0%, #38bdf8 100%);
    box-shadow: 0 6px 20px rgba(0, 242, 255, 0.5);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Downloads List View Layout (Prático e Moderno)
   -------------------------------------------------------------------------- */
.dl-list-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.dl-list-item {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-left: 4px solid transparent;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dl-list-item:hover {
    transform: translateY(-2px);
    border-left-color: #0284c7;
    border-top-color: rgba(43, 176, 239, 0.35);
    border-right-color: rgba(43, 176, 239, 0.35);
    border-bottom-color: rgba(43, 176, 239, 0.35);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.1);
}

.dl-list-icon-box {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(43, 176, 239, 0.12), rgba(2, 132, 199, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    font-size: 22px;
    border: 1px solid rgba(43, 176, 239, 0.2);
    transition: all 0.25s ease;
}

.dl-list-item:hover .dl-list-icon-box {
    background: linear-gradient(135deg, #0284c7 0%, #2bb0ef 100%);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.dl-list-content {
    flex: 1 1 auto;
    min-width: 0;
}

.dl-list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.dl-list-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
}

.dl-list-desc {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.dl-list-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: #94a3b8;
}

.dl-list-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.dl-list-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0284c7 0%, #2bb0ef 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.dl-list-btn-download:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
    transform: translateY(-2px);
}

.dl-list-btn-download i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.dl-list-btn-download:hover i {
    transform: translateY(2px);
}

.dl-list-btn-mirror {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dl-list-btn-mirror:hover {
    background: #e0f2fe;
    color: #0284c7 !important;
    border-color: #bae6fd;
}

/* Responsividade Mobile para Lista */
@media (max-width: 768px) {
    .dl-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
    }

    .dl-list-top-row {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
    }

    .dl-list-actions {
        width: 100%;
        justify-content: stretch;
        margin-left: 0;
        margin-top: 6px;
    }

    .dl-list-btn-download {
        flex: 1;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Modal Overrides & Bootstrap 3 Compatibility
   -------------------------------------------------------------------------- */
.d-none {
    display: none !important;
}

.modal {
    z-index: 10050 !important;
}

.modal-backdrop {
    z-index: 10040 !important;
    background-color: #0b132b !important;
    opacity: 0.75 !important;
}

.modal-dialog-centered {
    margin: 60px auto;
}

@media (min-width: 768px) {
    .modal-dialog {
        width: 540px;
        margin: 80px auto;
    }
}
