/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f5f5f5;
}

/* Header Styles */
.header {
    background-color: white;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
}

.tools {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.tools a {
    text-decoration: none;
    color: #333;
}

/* Dropdown Menu Styles */
.nav-items {
    position: relative;
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-items a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.nav-items a:hover {
    color: #28942f;
    font-weight: 600;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-item > a::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-item:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #28942f;
    padding-right: 1.2rem;
}

/* Main Content Styles - Common */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.content-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.content-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Form Content Styles */
.form-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.required-info {
    color: #dc3545;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    /* display: grid; */                    /*/////////////////////////// check this for other forms */
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    /* display: block; */
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group label .required {
    color: #dc3545;
    margin-right: 4px;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: #1b5e20;
    box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.1);
}

.form-control.with-icon {
    padding-left: 2.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    padding: 0.75rem;
    line-height: 1.5;
}

/* Select Dropdown Styles */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 1rem;
    padding-right: 0.75rem;
}

/* RTL adjustments for select dropdown */
[dir="rtl"] select.form-control {
    background-position: right 0.75rem center;
    padding-left: 0.75rem;
    padding-right: 2.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.helper-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.helper-text i {
    color: #1b5e20;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 4px;
    border: none;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary {
    background-color: #1b5e20;
    color: white;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Text Content Container */
.text-content {
    line-height: 1.8;
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

/* Content Footer */
.content-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

/* Last Update Styling */
.last-update {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.last-update i {
    color: #1b5e20;
    font-size: 1rem;
}

/* Footer Styles */
.footer {
    background-color: #1b5e20;
    color: white;
    padding: 3rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

.social-icons, .accessibility-tools {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a, .accessibility-tools a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.2s;
}

.social-icons a:hover, .accessibility-tools a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
}

/* Special case for content page */
.main-content.form {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ==================== */
/* Responsive Additions */
/* ==================== */

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #333;
}

/* Media Queries */
@media (max-width: 1024px) {
    /* Revised header structure */
    .nav {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 1rem;
    }
    
    .logo {
        order: 1;
    }
    
    .menu-toggle {
        display: block;
        order: 2;
        margin-left: auto;
    }
    
    .tools {
        order: 3;
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
        margin-bottom: 0.5rem;
    }
    
    .tools a {
        display: block;
        text-align: center;
        padding: 0.75rem;
        background-color: #f5f5f5;
        border-radius: 4px;
    }
    
    .tools a:hover {
        background-color: #e0e0e0;
    }
    
    .nav-items {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 4;
    }
    
    .nav-items.active {
        display: flex;
    }
    
    .nav-item .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none;
        padding-right: 1rem;
    }
    
    .nav-item:hover .dropdown-menu,
    .nav-item.active .dropdown-menu {
        display: block;
    }
    
    /* Adjust main content */
    .main-content {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    /* Stack form groups on tablet */
    .form-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Adjust footer layout */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .logo img {
        height: 40px;
    }
    
    /* Content adjustments */
    .content-title {
        font-size: 1.6rem;
    }
    
    /* Form button layout */
    .form-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-bottom > div:first-child {
        order: 2;
    }
    
    .footer-bottom > div:last-child {
        order: 1;
    }
}

@media (max-width: 480px) {
    /* Further reduce padding */
    .main-content {
        padding: 1rem;
    }
    
    /* Adjust font sizes */
    .content-title {
        font-size: 1.4rem;
    }
    
    /* Input with icons */
    .input-with-icon i {
        left: 0.75rem;
    }
    
    .form-control {
        padding: 0.5rem 0.75rem;
    }
    
    /* Select dropdown arrow positioning */
    [dir="rtl"] select.form-control {
        padding-right: 2rem;
        background-position: right 0.5rem center;
    }
}

/* RTL specific adjustment */
[dir="rtl"] .menu-toggle {
    margin-right: 0;
    margin-left: 0;
}

/* PDF Viewer Styles */
.pdf-viewer-container {
    margin-top: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.pdf-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.pdf-header h3 {
    color: #1b5e20;
    margin-bottom: 0.5rem;
}

.file-description {
    color: #666;
    margin-bottom: 1rem;
}

.pdf-viewer {
    margin-top: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state i {
    margin-bottom: 1rem;
    color: #e74c3c;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .pdf-viewer iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .pdf-viewer iframe {
        height: 300px;
    }
}

/* Files Container Styles */
.files-container {
    margin-top: 2rem;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.file-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.file-icon {
    text-align: center;
    margin-bottom: 1rem;
    color: #1b5e20;
}

.file-info {
    flex: 1;
}

.file-info h3 {
    margin: 0 0 0.75rem;
    color: #333;
    font-size: 1.1rem;
}

.file-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1rem;
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.file-actions {
    display: flex;
    gap: 0.75rem;
}

.file-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-state i {
    margin-bottom: 1rem;
    color: #1b5e20;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .file-actions {
        flex-direction: column;
    }
}

/* News Container Styles */
/* .news-container {
    margin-top: 2rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.news-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #ccc;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.news-image {
    height: 180px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
}

.news-type {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.news-type.خبر {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.news-type.اعلان {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.news-date {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-body {
    padding: 1.5rem;
    flex: 1;
}

.news-body h3 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.2rem;
}

.news-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

.news-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: left;
} */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-state i {
    margin-bottom: 1rem;
    color: #1b5e20;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination a, 
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .active {
    background-color: #1b5e20;
    color: white;
    border-color: #1b5e20;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

.pagination .ellipsis {
    padding: 0.5rem;
}

/* Responsive Adjustments */

@media (max-width: 480px) {
    .pagination {
        flex-wrap: wrap;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .text-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    .content-footer {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
}

@media (max-width: 480px) {
    .text-content {
        font-size: 0.95rem;
    }
    
    .last-update {
        font-size: 0.85rem;
    }
}

 /* for filter forms */
.filter-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #ccc;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filter-form .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 10px;
}

.filter-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.filter-form input, .filter-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.filter-summary {
    background-color: #e8f4ff;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.filter-summary h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #0056b3;
}

.filter-summary ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.filter-summary li {
    display: inline-block;
    background: #fff;
    border: 1px solid #cce5ff;
    border-radius: 4px;
    padding: 4px 10px;
    margin: 0 5px 5px 0;
    font-size: 14px;
}

.filter-summary p {
    margin: 0;
    font-weight: bold;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.alert-success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}