/* ==========================================================================
   Header / Navbar / Footer Components (Premium Framework Layout)
   ========================================================================== */

/* Topbar Optimization */
.topbar {
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    color: rgba(255, 255, 255, 0.9);
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Navbar - Modern Glassmorphism Aesthetic */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    min-height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Brand Logo Layout */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--color-dark);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-xs));
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.04);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-grow: 1;
    justify-content: center;
}

.nav-menu a {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--color-text);
    position: relative;
    padding: 6px 0;
    display: inline-block;
    transition: var(--transition-fast);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    border-radius: var(--radius-pill);
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--color-primary);
    transform: translateY(-1px);
}

.nav-menu a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-menu a.active {
    color: var(--color-primary);
}

.nav-menu a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar-actions > * {
    padding: 8px 12px;
    white-space: nowrap;
}

/* Deep Premium Footer Foundation */
.footer {
    background: linear-gradient(135deg, #0b0f19 0%, #111827 100%);
    color: var(--color-muted);
    padding: 80px 0 30px;
    border-top: 4px solid var(--color-primary);
    position: relative;
    box-shadow: inset 0 4px 20px rgba(0,0,0,0.2);
}
/* ==========================================
   Board Message Card
   ========================================== */

.board-message-card {
    position: relative;
    background: #ffffff;
    border-radius: 28px;
    padding: 50px 60px;
    margin-bottom: 70px; /* مسافة بين كلمة المجلس والإحصائيات */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Decorative Quote */
.board-message-card::before {
    content: "❝";
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 130px;
    font-family: serif;
    color: rgba(0, 140, 90, 0.08);
    line-height: 1;
    pointer-events: none;
}

/* Main Content */
.board-message-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 2.1;
    color: #555;
    text-align: center;
}

/* Paragraph spacing */
.board-message-content p {
    margin-bottom: 1.5rem;
}

/* Signature */
.board-signature {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.board-signature strong {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #0f2747;
    margin-bottom: 6px;
}

.board-signature span {
    display: block;
    font-size: 17px;
    color: #777;
}

/* Stats Section Spacing */
.stats-section,
.statistics-section,
.home-statistics,
.stats-grid {
    margin-top: 40px;
}

/* Mobile */
@media (max-width: 768px) {
    .board-message-card {
        padding: 30px 20px;
        margin-bottom: 45px;
        border-radius: 20px;
    }

    .board-message-card::before {
        font-size: 90px;
        top: 20px;
        left: 20px;
    }

    .board-message-content {
        font-size: 15px;
        line-height: 2;
        max-width: 100%;
    }

    .board-signature strong {
        font-size: 20px;
    }

    .board-signature span {
        font-size: 15px;
    }

    .stats-section,
    .statistics-section,
    .home-statistics,
    .stats-grid {
        margin-top: 30px;
    }
}
/* ==========================================================================
   Icons & Micro-Animations System
   ========================================================================== */

.stat-icon {
    font-size: 36px;
    color: var(--color-primary);
    margin-bottom: 12px;
    display: inline-block;
    transition: var(--transition);
}

.stat-card:hover .stat-icon,
.info-card:hover .stat-icon {
    transform: translateY(-4px) scale(1.05);
    color: var(--color-secondary);
}

.section-title i,
.hero-meta i,
.hero-kicker i,
.hero-actions i,
.center-actions i,
.cta-box i {
    margin-inline-end: 8px;
    font-size: 1.05em;
    vertical-align: middle;
}

.card .btn i,
.read-more-link i {
    margin-inline-start: 6px;
    display: inline-block;
    transition: var(--transition-fast);
}

.btn:hover i.bi-arrow-right,
.btn:hover i.fa-arrow-right,
.read-more-link:hover i {
    transform: translateX(4px);
}

html[dir="rtl"] .btn:hover i.bi-arrow-right,
html[dir="rtl"] .btn:hover i.fa-arrow-right,
html[dir="rtl"] .read-more-link:hover i {
    transform: translateX(-4px) scaleX(-1);
}

/* ==========================================================================
   1. Global Flex & Grid Alignment
   ========================================================================== */

body {
    text-align: start;
}

.navbar-inner,
.navbar-actions,
.logo,
.nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
}

html[dir="rtl"] .navbar-inner {
    flex-direction: row-reverse;
}

html[dir="rtl"] .navbar-actions {
    flex-direction: row;
    margin-inline-start: auto;
    margin-inline-end: 0;
}

/* ==========================================================================
   2. Contact Section & Form Fixes
   ========================================================================== */

.contact-section-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
}

html[dir="rtl"] .contact-section-wrapper {
    flex-direction: row-reverse;
}

.contact-form-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form-container .full-width {
    grid-column: 1 / -1;
}

.contact-form-container input,
.contact-form-container select,
.contact-form-container textarea {
    width: 100%;
    text-align: start;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    transition: var(--transition-fast);
}

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

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

.contact-info-sidebar {
    width: 320px;
    flex-shrink: 0;
    text-align: start;
}

/* ==========================================================================
   3. Stats Cards Grid
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 20px;
    justify-items: center;
    text-align: center;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    width: 100%;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

.stat-card p,
.stat-label {
    font-size: 1rem;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ==========================================================================
   4. Section Headers
   ========================================================================== */

.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}

.section-title.align-start {
    align-items: flex-start;
    text-align: start;
}

html[dir="rtl"] .section-title.align-start {
    align-items: flex-end;
    text-align: right;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 6px 14px;
    width: max-content;
}

/* ==========================================================================
   5. About Section
   ========================================================================== */

.about-section {
    padding: 60px 0;
    text-align: center;
}

.about-section h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.about-section h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.about-section p {
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* ==========================================================================
   6. Contact Section
   ========================================================================== */

.contact-section {
    padding: 60px 0;
    text-align: center;
    background: var(--section-bg, #f8fafc);
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-section .subtitle {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--color-text-light);
}

.contact-section .description {
    max-width: 700px;
    margin: 0 auto 20px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.contact-section .btn {
    margin-top: 10px;
    padding: 12px 40px;
    display: inline-block;
}

/* ==========================================================================
   7. Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }

    .navbar-inner {
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px 15px;
    }

    .contact-section-wrapper {
        flex-direction: column;
    }

    .contact-info-sidebar {
        width: 100%;
    }

    html[dir="rtl"] .contact-section-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .contact-form-container {
        grid-template-columns: 1fr;
    }

    .about-section h2 {
        font-size: 2rem;
    }

    .contact-section h2 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stats-grid {
        gap: 20px 15px;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-card p,
    .stat-label {
        font-size: 0.9rem;
    }

    .about-section {
        padding: 40px 0;
    }

    .contact-section {
        padding: 40px 0;
    }

    .about-section p,
    .contact-section .description {
        font-size: 1rem;
        padding: 0 15px;
    }
}