/* ============================================
   PROJECT DETAILS CSS
   Color Palette: #141d2a (dark), #8186d5 (primary), 
                  #F5875D (accent), #6366f1/#8b5cf6 (gradients)
   ============================================
   ЗАБЕЛЕЖКА: Modal стиловете са премахнати.
   Използва се общия FilePreview.css за модала.
   ============================================ */

/* === DESCRIPTION === */
.description-wrapper {
    background: var(--project-card-bg);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--container-shadow);
    border: 1px solid rgba(129, 134, 213, 0.2);
}

.section-subtitle {
    color: var(--project-accent);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, var(--project-gradient-start), var(--project-gradient-end)) 1;
    display: inline-block;
}

.project-full-description {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 0;
    font-size: 1rem;
}

/* === FILES SECTION === */
.files-section {
    background: var(--project-card-bg);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--container-shadow);
    height: 100%;
    border: 1px solid rgba(129, 134, 213, 0.2);
}

.files-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(129, 134, 213, 0.15);
}

.files-section-header i {
    color: var(--project-primary);
    font-size: 1.3rem;
}

.files-section-header h4 {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

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

/* === FILES GRID - ЗАПАЗЕНИ СТИЛОВЕ === */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 14px;
}

.file-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
    position: relative;
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

/* Document Items - ЗАПАЗЕНИ */
.document-item {
    background: rgba(129, 134, 213, 0.1);
    border: 1px solid rgba(129, 134, 213, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.document-item .file-name {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    word-break: break-word;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

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

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

.document-item:hover .file-name {
    color: rgba(255, 255, 255, 0.9);
}

/* Photo Items - ЗАПАЗЕНИ */
.photo-item {
    background: rgba(129, 134, 213, 0.1);
    border: 1px solid rgba(129, 134, 213, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
}

.photo-item:hover {
    border-color: rgba(129, 134, 213, 0.5);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 29, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 11px;
}

.photo-overlay i {
    color: white;
    font-size: 1.3rem;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

/* No Files Message */
.no-files-message {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.no-files-message i {
    font-size: 2.2rem;
    margin-bottom: 14px;
    color: var(--project-primary);
    opacity: 0.5;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 12px;
    }

    .description-wrapper,
    .files-section {
        border-radius: 16px;
        padding: 22px;
    }
}

@media (max-width: 768px) {
    .files-section {
        margin-bottom: 20px;
    }

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

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

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

    .btn-back {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}