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

:root {
    --primary-color: #0c2b1e;      /* Deep forest emerald */
    --primary-light: #16402d;      /* Mossy green */
    --accent-color: #c5a059;       /* Sand gold */
    --accent-light: #d6b77a;       /* Light sand gold */
    --bg-light: #f7f6f2;           /* Soft warm cream background */
    --card-bg: rgba(255, 255, 255, 0.85); /* Glassmorphism card base */
    --text-dark: #1b2621;          /* Deep dark green-gray for body text */
    --text-muted: #64736a;         /* Muted gray-green */
    --white: #ffffff;
    --border-color: rgba(12, 43, 30, 0.08);
    --border-accent: rgba(197, 160, 89, 0.25);
    --success: #2e7d32;
    --warning: #f57c00;
    --danger: #d32f2f;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 8px rgba(12, 43, 30, 0.04);
    --shadow-md: 0 8px 24px rgba(12, 43, 30, 0.08);
    --shadow-lg: 0 16px 36px rgba(12, 43, 30, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

body[dir="rtl"] {
    font-family: var(--font-ar);
}

body[dir="ltr"] {
    font-family: var(--font-en);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

input, textarea, select, button {
    font-family: inherit;
}

/* Layout Containers */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

/* Glassmorphism Effect */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-md);
}

/* Header & Navigation (Mobile First) */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(12, 43, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white);
    border-bottom: 2px solid var(--accent-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--accent-color);
    animation: rotateSlow 20s linear infinite;
}

.logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--white) 30%, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Lang Toggle Button */
.lang-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.lang-toggle:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
}

/* Nav Menu & Hamburger */
.nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary-color);
    display: none;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 3px solid var(--accent-color);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.nav-menu.active {
    display: flex;
}

.nav-item {
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    color: var(--white);
    background: rgba(197, 160, 89, 0.15);
    padding-inline-start: 1.5rem;
    border-inline-start: 4px solid var(--accent-color);
}

/* Mobile Nav Toggle Button */
.menu-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    display: block;
}

/* Desktop Navigation */
@media (min-width: 992px) {
    .menu-btn {
        display: none;
    }
    
    .nav-menu {
        position: static;
        display: flex;
        flex-direction: row;
        background: none;
        padding: 0;
        gap: 0.5rem;
        border: none;
    }
    
    .nav-item {
        padding: 0.5rem 1rem;
        border-radius: var(--radius-sm);
    }
    
    .nav-item:hover, .nav-item.active {
        background: rgba(255, 255, 255, 0.1);
        border-inline-start: none;
        padding-inline-start: 1rem;
        border-bottom: 2px solid var(--accent-color);
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 4rem 0 3rem 0;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background-image: radial-gradient(var(--accent-color) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-desc {
        font-size: 1.2rem;
    }
    .hero-section {
        padding: 6rem 0 5rem 0;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}

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

.btn-primary:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Image Showcase */
.city-showcase {
    margin-top: -2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.showcase-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--white);
    position: relative;
}

.showcase-image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.showcase-wrapper:hover .showcase-image {
    transform: scale(1.03);
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(12, 43, 30, 0.85) 0%, rgba(12, 43, 30, 0) 100%);
    color: var(--white);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.showcase-badge {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Vision / Content Sections */
.section {
    padding: 4rem 0;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 5px;
}

/* Quick Links Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(197, 160, 89, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: rotateY(180deg);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Cards & Lists */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

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

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success { background-color: rgba(46, 125, 50, 0.15); color: var(--success); }
.badge-warning { background-color: rgba(245, 124, 0, 0.15); color: var(--warning); }
.badge-danger { background-color: rgba(211, 47, 47, 0.15); color: var(--danger); }
.badge-info { background-color: rgba(12, 43, 30, 0.1); color: var(--primary-color); }

/* Forms styling */
.form-card {
    max-width: 500px;
    margin: 3rem auto;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid rgba(12, 43, 30, 0.15);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

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

.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: rgba(46, 125, 50, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.alert-danger {
    background-color: rgba(211, 47, 47, 0.15);
    color: var(--danger);
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.alert-warning {
    background-color: rgba(245, 124, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 124, 0, 0.2);
}

/* Discussion Board */
.forum-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.forum-item:last-child {
    border-bottom: none;
}

.forum-thread-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.forum-thread-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.forum-post-main {
    font-size: 1rem;
    margin-top: 1rem;
    background-color: rgba(12, 43, 30, 0.02);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border-inline-start: 4px solid var(--accent-color);
}

.replies-section {
    margin-top: 2rem;
}

.reply-card {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    border-inline-start: 3px solid var(--primary-color);
}

/* Document List */
.doc-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    transition: var(--transition);
    gap: 1rem;
}

.doc-list-item:hover {
    border-color: var(--accent-color);
    background-color: rgba(197, 160, 89, 0.05);
}

.doc-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.doc-title {
    font-weight: 700;
    color: var(--primary-color);
}

/* Admin Dashboard layout */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .admin-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.admin-sidebar-section {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

th {
    background-color: rgba(12, 43, 30, 0.05);
    color: var(--primary-color);
    font-weight: 700;
}

tr:hover td {
    background-color: rgba(197, 160, 89, 0.03);
}

/* Footer styling */
.main-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0;
    text-align: center;
    border-top: 3px solid var(--accent-color);
    font-size: 0.9rem;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Animations */
@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Utility Helpers */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* RTL alignment overrides where logical properties aren't enough */
body[dir="rtl"] .menu-btn {
    order: -1;
}

body[dir="rtl"] .nav-item:hover, body[dir="rtl"] .nav-item.active {
    padding-left: 1rem;
    padding-right: 1.5rem;
}
@media (min-width: 992px) {
    body[dir="rtl"] .nav-item:hover, body[dir="rtl"] .nav-item.active {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
