/* File Grid Shared Styles */
/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container styling */
.file-container {
    display: flex;
    width: 80%;
    margin: auto;
    padding: 20px;
    gap: 20px;
    font-family: Arial, sans-serif;
}

/* Categories Sidebar */
.file-categories {
    width: 25%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    align-self: flex-start;
    height: fit-content;
    min-width: 250px;
}

.file-categories h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.file-categories ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.file-categories li {
    margin-bottom: 8px;
    border-radius: 6px;
    transition: 0.3s;
}

.file-categories li .nav-link {
    padding: 12px 15px;
    color: #333;
    border-left: 3px solid transparent;
    transition: 0.3s;
    text-decoration: none;
    display: block;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-categories li .nav-link.active,
.file-categories li .nav-link:hover {
    color: #d9534f;
    border-left: 3px solid #d9534f;
    background-color: rgba(217, 83, 79, 0.1);
}

/* Content Area */
.file-content {
    width: 75%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    background-color: #fff;
}

.file-content h3 {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #d9534f;
    padding-bottom: 10px;
}

/* Fancy Grid Layout */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #d9534f, #f39c12);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #d9534f;
}

.file-card:hover::before {
    transform: scaleX(1);
}

.file-card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #009CFF, #0056b3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.file-card:hover .file-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(217, 83, 79, 0.3);
}

.file-info {
    flex: 1;
}

.file-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.file-card:hover .file-title {
    color: #d9534f;
}

.file-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-type {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    color: #555;
}

.file-link {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.file-link:hover {
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .file-container {
        width: 95%;
        flex-direction: column;
    }

    .file-categories,
    .file-content {
        width: 100%;
    }

    .file-categories {
        min-width: auto;
        margin-bottom: 20px;
    }

    .file-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .file-card {
        padding: 15px;
    }

    .file-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .file-title {
        font-size: 14px;
    }
}

/* Mobile Tabs Styling */
#mobileTabs .nav-tabs {
    flex-wrap: wrap !important;
    border-bottom: 2px solid #d9534f;
}

#mobileTabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 10px 15px;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

#mobileTabs .nav-link.active {
    background: #d9534f;
    color: white;
}

#mobileTabs .nav-link:hover {
    background: #f8f9fa;
    color: #d9534f;
}

#mobileTabs .nav-link.active:hover {
    background: #d9534f;
    color: white;
}

/* File type icons */
.file-icon-pdf::before { content: "📄"; }
.file-icon-doc::before { content: "📝"; }
.file-icon-xls::before { content: "📊"; }
.file-icon-ppt::before { content: "📋"; }
.file-icon-img::before { content: "🖼️"; }
.file-icon-zip::before { content: "📦"; }
.file-icon-default::before { content: "📎"; }
