@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #063454;
    --primary-dark: #042738;
    --primary-light: #0a4a6b;
    --secondary-color: #f8f9fa;
    --accent-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #f5f7fa;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(6, 52, 84, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

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

.logo-icon {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-text h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(45deg, #ffffff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 300;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
    border-radius: 6px;
    transition: var(--transition);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.logout-btn {
    background: rgba(220, 53, 69, 0.2) !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    margin-right: 1rem;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.3) !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 120px);
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subsection-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

/* Card Styles */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 52, 84, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.bilingual-input {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e9ecef;
    border-color: var(--text-secondary);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Logo Upload */
.logo-upload {
    margin-bottom: 1rem;
}

.logo-preview {
    width: 200px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.logo-preview:hover {
    border-color: var(--primary-color);
    background-color: rgba(6, 52, 84, 0.05);
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.upload-placeholder {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Carousel Images */
.carousel-upload {
    margin-bottom: 1rem;
}

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

.carousel-image {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-image .delete-btn {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--danger-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.carousel-image .delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px rgba(6, 52, 84, 0.3);
}

.login-logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-btn {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    box-shadow: 0 4px 15px rgba(6, 52, 84, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 52, 84, 0.4);
}

.login-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Profile Page Styles */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(6, 52, 84, 0.3);
}

.profile-info h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-role {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.profile-form .form-group:last-of-type {
    margin-bottom: 2rem;
}

/* Admins Table */
.admins-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admins-table-container {
    overflow-x: auto;
}

.admins-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admins-table th,
.admins-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.admins-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.admins-table tbody tr {
    transition: var(--transition);
}

.admins-table tbody tr:hover {
    background-color: rgba(6, 52, 84, 0.05);
}

.admins-table .actions {
    display: flex;
    gap: 0.5rem;
}

.admins-table .actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.card-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.card-item:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.card-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.card-image-upload {
    margin-bottom: 1rem;
}

.card-image-preview {
    width: 100%;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.card-image-preview:hover {
    border-color: var(--primary-color);
    background-color: rgba(6, 52, 84, 0.05);
}

.card-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Columns */
.columns-container {
    margin-top: 2rem;
}

.column-item {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.column-posts {
    margin-top: 1rem;
}

.post-item {
    background: white;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post-item .remove-post-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
    width: auto;
}

.column-header .delete-column-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
    width: auto;
}
/* Contact Fields */
.contact-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-field h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.dynamic-inputs {
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.input-group input {
    flex: 1;
}

.input-group .btn {
    padding: 0.3rem 0.4rem;
    min-width: 30px;
    font-size: 0.8rem;
    width: auto;
    flex-shrink: 0;
}

/* Posts Table */
.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.posts-table-container {
    overflow-x: auto;
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.posts-table th,
.posts-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.posts-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.posts-table tbody tr {
    cursor: pointer;
    transition: var(--transition);
}

.posts-table tbody tr:hover {
    background-color: rgba(6, 52, 84, 0.05);
}

.posts-table .actions {
    display: flex;
    gap: 0.5rem;
}

.posts-table .actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Rich Editor */
.editor-toolbar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
}

.toolbar-btn {
    padding: 0.5rem;
    border: none;
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    min-width: 35px;
}

.toolbar-btn:hover {
    background: var(--primary-color);
    color: white;
}

.rich-editor {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    line-height: 1.6;
    font-family: 'Cairo', 'Arial', sans-serif;
    font-size: 1rem;
}

.rich-editor[id$="Ar"] {
    direction: rtl;
    text-align: right;
}

.rich-editor[id$="En"] {
    direction: ltr;
    text-align: left;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.rich-editor:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 52, 84, 0.1);
}

.rich-editor[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--text-secondary);
}

.rich-editor h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--primary-color);
}

.rich-editor h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.75rem 0;
    color: var(--primary-color);
}

.rich-editor p {
    margin: 0.5rem 0;
}

.rich-editor ul,
.rich-editor ol {
    margin: 0.5rem 0;
    padding-right: 2rem;
}

.rich-editor a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    margin: 2rem;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--danger-color);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.modal-body {
    margin-bottom: 1rem;
}

/* Preview Content */
.preview-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.preview-content {
    display: none;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    min-height: 200px;
}

.preview-content.active {
    display: block;
}

.preview-content h1,
.preview-content h2 {
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Save Section */
.gen-save-section {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.save-section {
    text-align: center;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .header-content {
        position: relative;
    }
    
    .logo-section {
        gap: 0.75rem;
    }
    
    .logo-icon {
        font-size: 2rem;
        padding: 0.4rem;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .logo-text p {
        font-size: 0.8rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: rgba(6, 52, 84, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 8px;
    }
    
    .logout-btn {
        margin-right: 0;
        margin-top: 0.5rem;
    }
    
    .bilingual-input {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-fields {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .posts-table {
        font-size: 0.9rem;
    }
    
    .posts-table th,
    .posts-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .form-actions,
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .delete-column-btn,
    .remove-post-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .input-group .btn {
        padding: 0.25rem 0.3rem;
        min-width: 25px;
        font-size: 0.7rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .post-item .remove-post-btn,
    .column-header .delete-column-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* Medium screens - fix navbar display issues */
@media (min-width: 971px) and (max-width: 1080px) {
    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .logo-text p {
        font-size: 0.8rem;
    }
    
    .header-content {
        gap: 0.8rem;
    }
}

@media (min-width: 801px) and (max-width: 970px) {
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .logo-text p {
        font-size: 0.75rem;
    }
    
    .header-content {
        gap: 0.6rem;
    }
    
    .logo-icon {
        font-size: 1.8rem;
        padding: 0.3rem;
    }
}

@media (min-width: 769px) and (max-width: 800px) {
    .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .logo-text p {
        font-size: 0.7rem;
    }
    
    .header-content {
        gap: 0.5rem;
    }
    
    .logo-icon {
        font-size: 1.6rem;
        padding: 0.25rem;
    }
}

/* Responsive bilingual input for smaller screens */
@media (max-width: 1080px) {
    .bilingual-input {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .rich-editor {
        min-height: 200px;
    }
    
    .editor-toolbar {
        flex-wrap: wrap;
    }
    
    .logo-preview {
        width: 100%;
        height: 100px;
    }
    
    .carousel-images {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 50%;
    width: 20px;
    height: 20px;
    margin: -10px -10px 0 0;
    border: 2px solid var(--primary-color);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-success {
    background-color: #4CAF50;
}

.notification-error {
    background-color: #f44336;
}

.notification-info {
    background-color: #2196F3;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
}

.carousel-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.carousel-item {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-carousel-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-carousel-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.card-header h4 {
    margin: 0;
    color: #333;
}

.columns-container {
    margin-top: 20px;
}

.column-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.column-header h4 {
    margin: 0;
    color: #333;
}

.contact-fields {
    margin-top: 20px;
}

.contact-field {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.contact-field h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.dynamic-inputs {
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.input-group .form-input {
    flex: 1;
}

.input-group .btn {
    flex-shrink: 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .modal-content {
        width: 90%;
        margin: 30% auto;
    }
}
.error-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
    font-family: 'Cairo', sans-serif;
}

.error-container {
    text-align: center;
    margin: auto;
}

.error-container h1 {
    font-size: 120px;
    margin-bottom: 0;
    color: var(--text-primary);
}

.error-container h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.error-container p {
    font-size: 18px;
    color: #666;
}

.error-container a {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 24px;
    font-size: 16px;
    color: white;
    background-color: var(--text-primary);
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.error-container a:hover {
    background-color: var(--primary-dark);
}
