/* =============================================
   BUDGET PAGE - REDESIGNED
   Color Palette: #141d2a (dark), #8186d5 (primary), #F5875D (accent)
   ============================================= */

:root {
    --budget-dark: #141d2a;
    --budget-dark-light: #1a2332;
    --budget-dark-lighter: #232d3f;
    --budget-primary: #8186d5;
    --budget-accent: #F5875D;
    --budget-gradient-start: #6366f1;
    --budget-gradient-end: #8b5cf6;
    --budget-text: #ffffff;
    --budget-text-muted: rgba(255, 255, 255, 0.7);
    --budget-border: rgba(129, 134, 213, 0.25);
    --budget-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    --budget-accent-light: rgba(245, 135, 93, 0.15);
}

/* =============================================
   HERO SECTION - Parallax with Clean Wave
   ============================================= */
.budget-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/Resources/Img/BudgetHero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

/* Fallback gradient ако няма снимка */
.budget-hero--no-image {
    background: linear-gradient(135deg, var(--budget-dark) 0%, var(--budget-dark-light) 100%);
    background-attachment: scroll;
}

.budget-hero--no-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
            radial-gradient(circle at 30% 70%, rgba(129, 134, 213, 0.15), transparent 50%),
            radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.1), transparent 40%);
}

.budget-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 29, 42, 0.85) 0%, rgba(20, 29, 42, 0.7) 100%);
    z-index: 1;
}

.budget-hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 20px;
}

.budget-icon-wrapper {
    width: 110px;
    height: 110px;
    margin: 0 auto 28px;
    background: linear-gradient(135deg, var(--budget-gradient-start), var(--budget-gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.4);
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 15px 50px rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 60px rgba(99, 102, 241, 0.5);
    }
}

.budget-icon-wrapper i {
    font-size: 2.8rem;
    color: white;
}

.budget-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--budget-text);
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.budget-subtitle {
    font-size: 1.2rem;
    color: var(--budget-text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Wave - TRANSPARENT, реже снимката */
.budget-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
    z-index: 3;
}

.budget-wave svg {
    width: 100%;
    height: 80px;
    display: block;
}

/* Вълната е в цвета на body-то (бял/светъл) */
.budget-wave svg path {
    fill: #f8fafc;
}

/* =============================================
   CONTENT SECTION - No background color
   ============================================= */
.budget-content {
    padding: 60px 0 100px;
    background: transparent;
}

/* =============================================
   STATS GRID
   ============================================= */
.budget-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--budget-dark);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--budget-shadow);
    border: 1px solid var(--budget-border);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.15);
    border-color: rgba(129, 134, 213, 0.4);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--budget-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    background: linear-gradient(135deg, var(--budget-gradient-start), var(--budget-gradient-end));
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--budget-accent);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon i {
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--budget-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--budget-text-muted);
    margin-top: 6px;
}

/* =============================================
   ACCORDION
   ============================================= */
.budget-accordion-wrapper {
    background: var(--budget-dark);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--budget-shadow);
    border: 1px solid var(--budget-border);
}

.accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: var(--budget-border);
}

.accordion-item {
    background: transparent;
    border: 1px solid var(--budget-border);
    border-radius: 16px !important;
    margin-bottom: 14px;
    overflow: hidden;
}

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

.accordion-button {
    background: rgba(129, 134, 213, 0.05);
    color: var(--budget-text);
    font-weight: 600;
    padding: 20px 24px;
    box-shadow: none;
    display: flex;
    align-items: center;
    border-radius: 16px !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(129, 134, 213, 0.12);
    color: var(--budget-text);
    box-shadow: none;
    border-radius: 16px 16px 0 0 !important;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--budget-primary);
}

.accordion-button::after {
    filter: invert(1);
    opacity: 0.5;
}

.accordion-button:not(.collapsed)::after {
    filter: invert(1);
    opacity: 0.8;
}

.accordion-title {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.accordion-title i {
    color: var(--budget-accent);
    font-size: 1.1rem;
}

.accordion-title span {
    font-size: 1.05rem;
}

.files-count-badge {
    background: linear-gradient(135deg, var(--budget-gradient-start), var(--budget-gradient-end));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-right: 14px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.accordion-body {
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--budget-border);
}

/* =============================================
   FILES GRID
   ============================================= */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 18px;
}

.file-item {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-item:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.25);
}

.document-item {
    background: rgba(129, 134, 213, 0.08);
    border: 1px solid rgba(129, 134, 213, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px;
    text-align: center;
}

.document-item .file-icon {
    font-size: 2.2rem;
    color: var(--budget-accent);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.document-item:hover .file-icon {
    color: var(--budget-primary);
    transform: scale(1.1);
}

.document-item .file-name {
    color: var(--budget-text-muted);
    font-size: 0.75rem;
    word-break: break-word;
    line-height: 1.3;
}

.document-item:hover {
    background: rgba(129, 134, 213, 0.15);
    border-color: rgba(129, 134, 213, 0.3);
}


.file-download-link {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    background: rgba(99, 102, 241, 0.95);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.35);
    transition: all 0.2s ease;
    z-index: 2;
}

.file-download-link:hover {
    color: #fff;
    background: var(--budget-primary);
    transform: translateY(-2px);
}

/* =============================================
   EMPTY STATE
   ============================================= */
.budget-empty-state {
    background: var(--budget-dark);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: var(--budget-shadow);
    border: 1px solid var(--budget-border);
}

.budget-empty-state i {
    font-size: 4rem;
    color: var(--budget-primary);
    opacity: 0.5;
    margin-bottom: 24px;
}

.budget-empty-state h4 {
    color: var(--budget-text);
    margin-bottom: 12px;
    font-weight: 600;
}

.budget-empty-state p {
    color: var(--budget-text-muted);
    margin: 0;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-accent {
    background: linear-gradient(135deg, var(--budget-gradient-start), var(--budget-gradient-end));
    border: none;
    color: white;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 992px) {
    .budget-hero {
        min-height: 60vh;
        background-attachment: scroll;
    }

    .budget-title {
        font-size: 2.4rem;
    }

    .budget-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .budget-hero {
        min-height: 55vh;
    }

    .budget-hero-content {
        padding: 50px 15px;
    }

    .budget-icon-wrapper {
        width: 90px;
        height: 90px;
    }

    .budget-icon-wrapper i {
        font-size: 2.2rem;
    }

    .budget-title {
        font-size: 1.9rem;
    }

    .budget-subtitle {
        font-size: 1rem;
    }

    .budget-wave svg {
        height: 50px;
    }

    .budget-content {
        padding: 40px 0 70px;
    }

    .budget-stats-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .stat-card {
        padding: 20px;
        border-radius: 16px;
    }

    .budget-accordion-wrapper {
        padding: 20px;
        border-radius: 20px;
    }

    .accordion-button {
        padding: 16px 18px;
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }

    .file-item {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .budget-hero {
        min-height: 50vh;
    }

    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }

    .document-item .file-icon {
        font-size: 1.8rem;
    }

    .document-item .file-name {
        font-size: 0.7rem;
    }
}