@font-face {
  font-family: 'Cairo';
  src: url('../assets/css/fonts/cairo/cairo-arabic.woff2') format('woff2'),
       url('../assets/css/fonts/cairo/cairo-arabic.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}


body {
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fff;
}

main.container {
    flex: 1;
}

/* تحديد العرض الأقصى للموقع */
.container {
    max-width: 1045px !important;
}

.navbar-brand {
    font-weight: bold;
}

.hero-section {
    background: linear-gradient(270deg, #0052D4, #4364F7, #65C7F7);
    color: white;
    padding: 2rem 0;
    border-radius: 0.5rem;
}

.hero-section h1,
.hero-section h2 {
    font-weight: 700;
    font-size: 1.5rem; /* Further reduced font size */
}

.hero-section .lead {
    font-size: 0.9rem; /* Further reduced font size */
}

/* Reduce font size for search inputs */
.form-control[name="search_query"] {
    font-size: 0.85rem; /* Further reduced font size */
}

.level-card {
    transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
    border: none;
    border-radius: 0.5rem;
}

.level-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}


.level-card .card-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.footer {
    background-color: #e9ecef;
    font-size: 0.9rem;
}

/* Card Styles */
.card-header h5 {
    white-space: nowrap;
    text-overflow: ellipsis;
    flex-grow: 1;
    text-align: start; /* Align to the right for RTL */
    margin: 0;
    font-size: 0.9rem; /* Modern, smaller size */
    font-weight: 600; /* Semi-bold for emphasis */

}

.card-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.6rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

#file-viewer-container:-webkit-full-screen {
    background-color: #fff;
}

#file-viewer-container:-moz-full-screen {
    background-color: #fff;
}

#file-viewer-container:-ms-fullscreen {
    background-color: #fff;
}

#file-viewer-container:fullscreen {
    background-color: #fff;
}

/* Search and navigation */

#category-navigation-header {
    background-color: #fff !important;
    border: 1px solid #dee2e6;
}

.list-group-item.file-row {
    cursor: pointer;
}

.list-group-item.file-row:hover {
    background-color: #f8f9fa;
}

.file-preview-link {
    text-decoration: none;
    color: inherit;
}

.auth-form-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-card {
    width: 100%;
    max-width: 450px;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
}

/*
 * Mobile App Style Page Header
 * --------------------------------------------------
 */
.page-header-nav {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.1rem; /* Match card-header padding */
}

.page-header-nav .back-link {
    font-size: 0.9rem;
    color: #212529;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    margin-left: 0.2rem;
    border-radius: 50px;
    transition: background-color 0.2s ease-in-out;
    display: flex;
    align-items: center;
}

.page-header-nav .back-link:hover {
    background-color: #e9ecef;
}

.page-header-nav .page-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
    text-align: start; /* RTL: start is right */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-date {
    flex-shrink: 0; /* Prevent date from shrinking */
}

/* Responsive adjustments for file list */
@media (max-width: 575.98px) {
    .file-title {
        white-space: normal; /* Allow title to wrap on small screens */
        margin-bottom: 0.25rem;
    }
    .file-date {
        align-self: flex-start; /* Align date to the start (left in LTR, right in RTL) */
    }
}

#file-viewer-container {
    position: relative;
    height: 60vh; /* Increased height slightly */
    background-color: #1e1e1e;
    padding-top: 10px;
    padding-bottom: 10px;

}

/* Visited file link style */
.file-row.visited .bi-file-earmark-text {
    color: #198754 !important; /* Bootstrap Success Green */
}

/* File list title truncation */
.file-title {
    white-space: nowrap;
    flex-grow: 1;
    padding-left: 10px; /* Add some space between title and date */
}

/* Reduce font size for file list titles */
.file-title {
    font-size: 0.95rem; /* Slightly smaller font size */
}

/* Remove top border radius from buttons in file view footer */
.footer-button-group.btn-group > .btn {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Reduce font-weight for active nav links in header/footer */
.navbar-nav .nav-link.active,
.footer .nav-link.active {
    font-weight: 400 !important; /* Set to normal weight */
}

/* Animation for filter button to grab attention */
.btn-filter-highlight {
    position: relative;
    overflow: hidden;
    width: 40px; /* Initial width for icon only */
    animation: expand-button 1s ease-out 0.5s forwards;
}

/* Class to disable animation when filters are active on page load */
.btn-filter-highlight.no-animation {
    animation: none;
    width: 180px;
}

.btn-filter-highlight.no-animation .filter-text {
    animation: none;
    opacity: 1;
}

.btn-filter-highlight .filter-text {
    white-space: nowrap;
    opacity: 0;
    margin-right: 5px;
    animation: show-text 0.8s ease-out 0.8s forwards;
}

@keyframes expand-button {
    to {
        width: 180px;
    }
}

@keyframes show-text {
    to {
        opacity: 1;
    }
}

/* Reduce navbar link size for a more compact header */
.navbar-nav .nav-link {
    font-size: 1rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}



.card-header .btn,
.season-buttons-container .btn {
    font-size: 0.85rem !important;
    padding: 0.2rem 0.3rem;
}


html, body {
  overflow-x: hidden !important;
}
