/* ==========================================
   منصة الفرق الإشرافية - Main Stylesheet
   Modern, Premium Arabic RTL Design
   ========================================== */

/* ===== CSS Variables & Design Tokens ===== */
:root {
    /* Primary — أخضر فاتح ونعناعي رسمي (هوية عمانية) */
    --primary-teal: #3d9b78;
    --primary-teal-dark: #1f6b52;
    --primary-teal-light: #7dd3b2;
    --primary-gold: #c89827;
    --accent-gold: #8a5c0e;
    --deep-blue: #0d3d2e;

    /* Neutral Colors */
    --white: #FFFFFF;
    --off-white: #f6fcf9;
    --light-gray: #ecf8f3;
    --medium-gray: #5c7a72;
    --dark-gray: #1e3d34;
    --charcoal: #0f172a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4db892 0%, #7dd3b2 55%, #3d9b78 100%);
    --gradient-gold: linear-gradient(135deg, #d4a017 0%, #8a5c0e 100%);
    --gradient-hero: linear-gradient(120deg, rgba(220, 248, 238, 0.95) 0%, rgba(180, 232, 210, 0.9) 45%, rgba(130, 210, 180, 0.88) 100%);
    /* عناوين الهيرو والأقسام — أخضر فاتح متدرج */
    --hero-title-gradient: linear-gradient(145deg, #b8ead8 0%, #6bcea8 38%, #3d9b78 72%, #2a7a62 100%);
    /* لوحة هيرو فاتحة + إضاءة ناعمة */
    --hero-panel-start: #f2fcf8;
    --hero-panel-end: #dff5ec;
    --hero-moe-teal: #4db892;
    --hero-moe-navy: #1a4a3d;
    --gradient-overlay: linear-gradient(180deg, rgba(30, 90, 70, 0.15) 0%, rgba(20, 70, 55, 0.35) 100%);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --hero-glass-border: rgba(255, 255, 255, 0.92);
    --hero-mint-overlay: rgba(180, 235, 210, 0.35);
    /* عناوين شرائح الهيرو — نعناعي وأبيض فقط */
    --hero-slide-h1-gradient: linear-gradient(135deg, #ffffff 0%, #c5efdb 50%, #7dd3b2 100%);
    /* لوحات نصية زجاجية شفافة — موحّدة (هيرو، بطاقات، نبذة، وصف الأقسام) */
    --panel-glass-bg: rgba(20, 30, 40, 0.32);
    --panel-glass-border: rgba(255, 255, 255, 0.22);
    --panel-glass-blur: 14px;
    --panel-glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    --panel-glass-inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.25rem;
    --spacing-xl: 3.5rem;
    --spacing-xxl: 5rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2.5rem;

    /* Typography */
    --font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-slow: 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

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

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, #f0faf6 0%, #fbfffd 48%, #ffffff 100%);
    color: var(--dark-gray);
    line-height: 1.7;
    overflow-x: hidden;
    direction: rtl;
}

/* ===== Header Styles ===== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139, 21, 56, 0.1);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
}

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

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    height: 45px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    transition: transform var(--transition-medium);
    /* Remove white background using blend mode */
    mix-blend-mode: multiply;
    filter: contrast(1.1) brightness(1.05);
}

.logo-img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: var(--font-weight-extrabold);
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(56, 86, 103, 0.15);
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

nav .nav-links {
    display: flex;
    gap: 0.5rem;
    flex: 1 1 auto;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

nav > a,
nav .nav-links > a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    position: relative;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

nav > a::before,
nav .nav-links > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: all var(--transition-medium);
    transform: translateX(50%);
    border-radius: 2px;
}

nav > a:hover,
nav .nav-links > a:hover {
    color: var(--primary-teal);
    transform: translateY(-2px);
}

nav > a.active,
nav .nav-links > a.active {
    color: var(--primary-teal);
    background: rgba(56, 86, 103, 0.08);
}

nav > a:hover::before,
nav .nav-links > a:hover::before {
    width: 100%;
}

nav > a.active::before,
nav .nav-links > a.active::before {
    width: 100%;
}

.logo-vision {
    height: 55px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: transform var(--transition-medium);
    /* Remove white background using blend mode */
    mix-blend-mode: multiply;
    filter: contrast(1.1) brightness(1.05);
}

.logo-vision:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Login Button in Navigation */
.login-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(56, 86, 103, 0.2);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: auto;
    flex: 0 0 auto;
}

.header-actions .login-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

nav .header-actions a::before,
nav .header-actions a:hover::before {
    width: 0;
}

nav .header-actions a:hover {
    color: var(--white);
    transform: none;
}

/* ===== Hero Slider — لوحة نصية + صورة (نعناعي فاتح + طبقة خلفية رسمية) ===== */
.hero {
    position: relative;
    isolation: isolate;
    height: clamp(520px, 68vh, 680px);
    min-height: 520px;
    max-height: 720px;
    overflow: hidden;
    margin: 0;
    background-color: var(--hero-panel-end);
    animation: heroFadeIn 0.85s ease-out;
}

/* خلفية مبنى/بيئة تعليمية خفيفة + overlay أخضر شفاف (لا تغيير في HTML) */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(165deg, rgba(232, 252, 245, 0.92) 0%, rgba(210, 244, 230, 0.78) 42%, rgba(185, 232, 212, 0.82) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(200, 235, 218, 0.45) 100%),
        url('../assets/moe_building_hd.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

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

.slide {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-content {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* الصورة تأخذ كامل المساحة (تمتد خلف النص) */
.slide-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.slide-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Overlay أخضر داكن موحّد فوق جميع الشرائح لإبراز النص بنفس القوة */
.slide-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(13, 61, 46, 0.55) 0%, rgba(10, 50, 38, 0.78) 60%, rgba(6, 35, 26, 0.88) 100%),
        linear-gradient(135deg, rgba(31, 107, 82, 0.65) 0%, rgba(20, 70, 55, 0.75) 50%, rgba(13, 61, 46, 0.85) 100%);
}

/* النص في منتصف الهيرو فوق الصورة */
.slide-text {
    position: absolute;
    inset: 0;
    z-index: 2;
    max-width: min(1020px, 96%);
    width: auto;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #ffffff;
    text-align: center;
    animation: slideInRight 0.8s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    overflow: visible;
    box-shadow: none;
}

/* زخارف الخلفية الدائرية لم تعد ضرورية فوق الصورة */
.slide-text::before,
.slide-text::after {
    content: none;
}

.slide-text > * {
    position: relative;
    z-index: 1;
}

.slide.active .slide-text {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* عناوين الشرائح — موحّدة لجميع الشرائح الخمس؛ مسافة واضحة قبل صندوق الوصف */
.slide-text h1,
.slide-text h1.hero-title-long {
    font-size: clamp(1.25rem, 3.5vw, 2.05rem);
    font-weight: 700;
    margin: 0;
    margin-bottom: clamp(0.75rem, 2vw, 1.35rem);
    line-height: 1.35;
    padding-block: 0.05em 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    letter-spacing: 0;
    word-spacing: 0.06em;
    white-space: nowrap;
    overflow: visible;
    background: var(--hero-slide-h1-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
    text-shadow: none;
}

/* عنوان طويل: يسمح بالتفاف على الشاشات الضيقة دون تداخل مع الصندوق */
.slide-text h1.hero-title-long {
    white-space: normal;
    line-height: 1.28;
}

.slide-text h1::after {
    content: none;
}

/* صندوق وصف الشريحة — لوحة زجاجية شفافة، خط متوسط، مسافات قراءة مريحة */
.slide-text p {
    font-family: var(--font-family);
    font-size: clamp(0.98rem, 1.4vw, 1.15rem);
    font-weight: 500;
    line-height: 2;
    color: rgba(255, 255, 255, 0.97);
    margin: 0;
    margin-inline: auto;
    padding: 0.95rem 1.75rem;
    width: fit-content;
    max-width: min(760px, 92%);
    box-sizing: border-box;
    text-align: center;
    text-align-last: center;
    background: var(--panel-glass-bg);
    border: 1px solid var(--panel-glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(var(--panel-glass-blur)) saturate(1.05);
    -webkit-backdrop-filter: blur(var(--panel-glass-blur)) saturate(1.05);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
    box-shadow: var(--panel-glass-shadow), var(--panel-glass-inset-highlight);
    word-spacing: 0.12em;
    letter-spacing: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

.hero-btns {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.6rem;
}

.hero-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* الزر الأساسي — تدرج ذهبي/خردلي رسمي */
.hero-btn.primary {
    background: linear-gradient(135deg, #f4d27a 0%, #d4a017 45%, #a87c10 100%);
    color: #4a3308;
    border: 1px solid rgba(255, 245, 210, 0.55);
    box-shadow: 0 10px 26px rgba(168, 124, 16, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* الزر الثانوي — مفرّغ بحدود بيضاء (Glass) */
.hero-btn.secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.hero-btn:hover {
    transform: translateY(-2px);
}

.hero-btn.primary:hover {
    box-shadow: 0 14px 34px rgba(168, 124, 16, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    filter: brightness(1.05);
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: #ffffff;
}

/* Hero Slider Arrows */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-size: 1.65rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.arrow:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    color: #ffffff;
}

.arrow.right {
    left: var(--spacing-md);
}

.arrow.left {
    right: var(--spacing-md);
}

/* ===== Main Section Styles ===== */
.section {
    padding: var(--spacing-xxl) var(--spacing-xl);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header h2,
.about-section h2 {
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
    font-weight: 900;
    color: var(--primary-teal-dark);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: var(--primary-teal-dark);
    filter: none;
    text-shadow: none;
    margin: 0 0 var(--spacing-lg);
    padding: 0;
    position: relative;
    letter-spacing: -0.25px;
    display: inline-block;
    line-height: 1.4;
}

.section-header h2::after {
    content: none;
}

.section-header .section-desc {
    font-family: var(--font-family);
    font-size: clamp(0.98rem, 1.4vw, 1.15rem);
    font-weight: 500;
    color: var(--dark-gray);
    line-height: 2;
    margin: var(--spacing-sm) auto 0;
    max-width: 720px;
    text-align: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    text-shadow: none;
    word-spacing: 0.12em;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 2.5vw, 2.5rem);
    margin: var(--spacing-xl) auto 0;
    max-width: 1100px;
    width: 100%;
    justify-items: stretch;
}

.main-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    border: 1px solid transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.main-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
}

.main-card:hover::before {
    opacity: 1;
}

.card-image {
    position: relative;
    height: 260px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
    opacity: 0.4;
    transition: opacity var(--transition-medium);
}

.main-card:hover .card-image::after {
    opacity: 0.2;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.main-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.card-content .card-btn,
.card-content button {
    margin-top: auto;
}

.card-content h3 {
    font-family: var(--font-family);
    font-size: clamp(1.18rem, 1.45vw, 1.4rem);
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-teal-dark);
    text-align: center;
    line-height: 1.45;
    letter-spacing: -0.15px;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
}

.card-content p {
    font-family: var(--font-family);
    font-size: clamp(0.98rem, 1.4vw, 1.15rem);
    font-weight: 500;
    color: var(--dark-gray);
    line-height: 2;
    margin-bottom: var(--spacing-md);
    text-align: center;
    word-spacing: 0.12em;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

.card-content .card-btn,
.card-content button {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(31, 107, 82, 0.25);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    letter-spacing: 0;
}

.card-content .card-btn::before,
.card-content button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.card-content .card-btn:hover::before,
.card-content button:hover::before {
    width: 300px;
    height: 300px;
}

.card-content .card-btn:hover,
.card-content button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-teal-dark) 0%, var(--primary-teal) 100%);
    box-shadow: 0 8px 20px rgba(31, 107, 82, 0.35);
}

.card-content button:active {
    transform: translateY(0);
}

/* ===== About Section ===== */
.about-section {
    background: var(--off-white);
    padding: var(--spacing-xxl) var(--spacing-xl);
    text-align: center;
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-section h2 {
    margin: 0 0 var(--spacing-lg);
}

.about-section p {
    font-family: var(--font-family);
    font-size: clamp(0.98rem, 1.4vw, 1.18rem);
    font-weight: 500;
    line-height: 2;
    color: var(--dark-gray);
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    text-shadow: none;
    text-align: center;
    word-spacing: 0.12em;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

/* ===== Statistics Section ===== */
.stats-section {
    background: var(--gradient-primary);
    padding: var(--spacing-xxl) var(--spacing-xl);
    margin-top: var(--spacing-xxl);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
}

.stat-item {
    text-align: center;
    color: var(--white);
    padding: var(--spacing-md);
    min-width: 200px;
}

.stat-item h2 {
    font-size: 3rem;
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-item p {
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    opacity: 0.95;
}

/* ===== Login Modal ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-box {
    position: relative;
    background: var(--white);
    width: 420px;
    max-width: 90%;
    padding: var(--spacing-xxl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    background: transparent;
    border: none;
    font-size: 2.5rem;
    color: var(--medium-gray);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--primary-teal);
    transform: rotate(90deg);
}

.modal-box h3 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-teal);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: var(--medium-gray);
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
}

.modal-box input {
    width: 100%;
    padding: var(--spacing-md);
    margin: var(--spacing-sm) 0;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.modal-box input:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.modal-submit-btn {
    width: 100%;
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md);
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-submit-btn:active {
    transform: translateY(0);
}

/* ===== Footer Styles ===== */
footer:not(.platform-footer):not(.notif-footer) {
    background: linear-gradient(135deg, var(--primary-teal-dark) 0%, var(--deep-blue) 100%);
    color: var(--white);
    padding: var(--spacing-xxl) var(--spacing-lg);
    text-align: center;
    margin-top: 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.footer-content {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .slide-text p {
        font-size: clamp(0.95rem, 1.6vw, 1.1rem);
        line-height: 1.8;
    }

    .main-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
    }

    .logo-text {
        font-size: 1.2rem;
    }

    nav {
        gap: var(--spacing-md);
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 1rem;
    }

    .hero {
        height: clamp(440px, 60vh, 560px);
        min-height: 440px;
    }

    .slide-text {
        max-width: 92%;
        padding: clamp(1rem, 4vw, 1.5rem);
        gap: 1.15rem;
        align-items: center;
        text-align: center;
    }

    .slide-text h1,
    .slide-text h1.hero-title-long {
        margin-bottom: clamp(0.65rem, 1.8vw, 1.1rem);
        font-size: clamp(1.15rem, 4.2vw, 1.75rem);
        word-spacing: 0.05em;
    }

    /* على الشاشات الضيقة: كل العناوين قد تلتف لتفادي القص */
    .slide-text h1 {
        white-space: normal;
    }

    .slide-text p {
        font-size: clamp(0.92rem, 2.6vw, 1.02rem);
        max-width: 100%;
        line-height: 1.8;
        padding: 0.72rem 1.2rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .arrow {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
    }

    .section-header h2,
    .about-section h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 45px;
    }

    .logo-vision {
        height: 40px;
    }

    .slide-text p {
        font-size: clamp(0.88rem, 3.2vw, 0.98rem);
        padding: 0.68rem 1rem;
        line-height: 1.8;
    }

    .section {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .section-header h2,
    .about-section h2 {
        font-size: clamp(1.4rem, 6vw, 1.85rem);
    }

    .section-header .section-desc {
        font-size: clamp(1.05rem, 3.5vw, 1.2rem);
    }
}

/* ===== Utility Animations ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* ===== Smooth Loading States ===== */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== Notifications UI ===== */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    z-index: 5;
}

.notif-bell-btn {
    appearance: none;
    background: #ffffff;
    border: 1px solid rgba(18, 50, 71, 0.14);
    border-radius: 14px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    padding: 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.notif-bell-btn svg {
    width: 22px;
    height: 22px;
    stroke: #123247;
    pointer-events: none;
}

.notif-bell-btn:hover {
    background: #f3fbfc;
    border-color: rgba(15, 118, 110, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.notif-bell-btn:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.22);
    outline-offset: 2px;
}

.notif-bell-btn[aria-expanded="true"] {
    background: #edf9f8;
    border-color: rgba(15, 118, 110, 0.38);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.12);
}

.notif-badge {
    position: absolute;
    top: -6px;
    inset-inline-start: -6px;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    border-radius: 999px;
    font-size: 0.68rem;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-weight: 800;
    text-align: center;
    line-height: 1;
    border: 2px solid white;
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.28);
}

.notif-dropdown {
    --notif-green: var(--primary-teal-dark);
    --notif-green-deep: #0f5c47;
    --notif-border: #e2e6ea;
    --notif-text: #0f5c47;
    position: fixed;
    top: 84px;
    left: 16px;
    right: auto;
    width: min(300px, calc(100vw - 20px));
    background: #ffffff !important;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    border: 1px solid var(--notif-border);
    z-index: 10070;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    color: var(--notif-text);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    transform-origin: top center;
}

body > .notif-dropdown {
    z-index: 10070;
}

.notif-dropdown:not(.is-closed) {
    pointer-events: auto;
}

.notif-dropdown.is-closed {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none !important;
}

.notif-list {
    flex: 1 1 auto;
    max-height: min(280px, 52vh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 4px 6px 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #ffffff !important;
    direction: rtl;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #1f6b52 #e8f0ec;
}

.notif-list.notif-list--many {
    max-height: min(340px, 58vh);
    border-inline-start: 3px solid #e8f0ec;
    padding-inline-start: 4px;
}

.notif-list::-webkit-scrollbar {
    width: 9px;
}

.notif-list::-webkit-scrollbar-track {
    background: #e8f0ec;
    border-radius: 6px;
    margin: 4px 0;
}

.notif-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a8a6e 0%, #0f5c47 100%);
    border-radius: 6px;
    border: 2px solid #e8f0ec;
}

.notif-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1f6b52 0%, #0a4032 100%);
}

.notif-card {
    position: relative;
    display: block;
    direction: rtl;
    background: #ffffff !important;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    padding: 8px 8px 6px;
    min-height: 0;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    min-width: 0;
}

.notif-card:hover {
    border-color: #b8c4d0;
    background: #fafbfc;
}

.notif-card.unread {
    background: #ffffff;
    border-color: #c8d2dc;
}

.notif-card__icon {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 3px;
    background: var(--notif-green, var(--primary-teal-dark));
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    transition: background 0.15s ease, opacity 0.15s ease;
    z-index: 3;
    pointer-events: auto;
}

.notif-card__icon:hover {
    background: var(--notif-green-deep, #0f5c47);
}

.notif-card__icon:active {
    opacity: 0.88;
}

.notif-card__icon.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

.notif-card.is-read .notif-card__icon {
    background: #e8f5ef;
    color: #1f6b52;
    border: 1px solid #b8e0cc;
    box-shadow: none;
}

.notif-card__icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
}

.notif-card__body {
    display: block;
    text-decoration: none;
    color: inherit;
    padding-inline-end: 34px;
    min-width: 0;
}

.notif-card__message {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--notif-text, #0f5c47) !important;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.notif-card__time {
    display: block;
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--notif-text, #0f5c47) !important;
    opacity: 0.88;
    direction: ltr;
    text-align: start;
    unicode-bidi: plaintext;
}

.notif-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    direction: rtl;
    padding: 8px 10px 10px;
    margin: 0;
    border-top: 1px solid #e5e8ec;
    background: #ffffff !important;
    color: var(--notif-text, #0f5c47) !important;
    border-radius: 0;
    box-shadow: none;
    text-align: start;
}

.notif-footer__link {
    appearance: none;
    border: none;
    background: transparent !important;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--notif-text, #0f5c47) !important;
    cursor: pointer;
    padding: 2px 0;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: none;
}

.notif-footer__link:hover {
    color: #06402b !important;
}

.notif-footer__link.is-active {
    color: #06402b !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.notif-footer__mark {
    color: #0f5c47 !important;
    font-weight: 800;
}

.notif-footer__mark:not(.is-disabled):hover {
    color: #06402b !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.notif-footer__link.is-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.notif-footer__link.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

.notif-status {
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    color: #0f5c47;
    background: #e8f5ef;
    border-bottom: 1px solid #d4ebe0;
}

.notif-status--error {
    color: #9f1239;
    background: #fff1f2;
    border-bottom-color: #fecdd3;
}

.notif-empty {
    padding: 16px 10px;
    color: var(--notif-text, #0f5c47) !important;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    nav .nav-links {
        width: 100%;
    }

    .header-actions {
        margin-right: 0;
        width: auto;
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .notif-dropdown {
        width: min(280px, calc(100vw - 16px));
    }

    .notif-dropdown.is-closed {
        transform: translateY(-8px) scale(0.98);
    }

    .header-actions .login-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
}
.login-container{
display:flex;
justify-content:center;
align-items:center;
min-height:80vh;
}

.login-box{
width:420px;
background:white;
padding:40px;
border-radius:15px;
box-shadow:0 20px 40px rgba(0,0,0,0.15);
text-align:center;
}

.login-logo{
width:80px;
margin-bottom:10px;
}

.form-group{
margin-bottom:15px;
text-align:right;
}

.form-group input{
width:100%;
padding:12px;
border-radius:8px;
border:1px solid #ddd;
}

.login-btn{
width:100%;
padding:14px;
background:#385667;
border:none;
color:white;
border-radius:8px;
font-size:16px;
cursor:pointer;
}
/* زر تسجيل الدخول نفس تصميم أزرار المنصة */

.login-btn{
background:#385667;
color:white;
border:none;
border-radius:10px;
padding:12px 20px;
font-size:15px;
font-weight:600;
cursor:pointer;
width:100%;
transition:all .2s ease;
box-shadow:0 4px 10px rgba(0,0,0,0.15);
}

.login-btn:hover{
background:#0c5f59;
transform:translateY(-1px);
}

.login-btn:active{
transform:translateY(0);
}

/* ===== Team Manager Page (same design as reports) ===== */

.page-hero{
background:linear-gradient(135deg, #1f6b52 0%, #0f5c47 60%, #0a4a3a 100%);
padding:40px;
border-radius:18px;
margin-bottom:25px;
color:white;
box-shadow:0 10px 30px rgba(15, 92, 71, 0.25);
border:1px solid rgba(255,255,255,0.08);
}

.page-hero h1{
font-size:30px;
font-weight:800;
margin-bottom:8px;
}

.page-hero p{
font-size:14px;
opacity:.9;
}

.section-card{
background:#e6efee;
border-radius:16px;
padding:20px;
border-top:6px solid #1f7a7a;
margin-bottom:20px;
}

.section-title{
font-size:20px;
font-weight:700;
color:#0f4f66;
margin-bottom:15px;
display:flex;
align-items:center;
gap:8px;
}

.report-item{
background:white;
border-radius:12px;
padding:18px;
border:1px solid #d6e5ed;
margin-top:12px;
display:flex;
justify-content:space-between;
align-items:center;
}

.report-title{
font-size:18px;
font-weight:700;
color:#0f4f66;
}

.report-meta{
font-size:13px;
color:#64748b;
margin-top:6px;
}

.report-btn{
background:#385667;
color:white;
border:none;
padding:8px 14px;
border-radius:8px;
cursor:pointer;
font-size:14px;
}

.report-btn:hover{
background:#0c5f59;
}

.status-approved{
background:#d1fae5;
color:#065f46;
padding:4px 10px;
border-radius:12px;
font-size:12px;
font-weight:600;
}

/* ===== Global Unified Button Styles ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    line-height: 1.5;
    gap: 8px;
    box-sizing: border-box;
    white-space: nowrap;
}
.btn:active {
    transform: translateY(1px);
}
.btn.primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}
.btn.primary:hover {
    box-shadow: var(--shadow-md);
    filter: brightness(1.05);
    transform: translateY(-2px);
}
.btn.secondary {
    background: var(--gradient-gold);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}
.btn.secondary:hover {
    box-shadow: var(--shadow-md);
    filter: brightness(1.05);
    transform: translateY(-2px);
}
.btn.ghost {
    background: transparent;
    color: var(--primary-teal);
    border: 2px solid var(--primary-teal);
}
.btn.ghost:hover {
    background: rgba(15, 118, 110, 0.08);
    transform: translateY(-2px);
}
.btn.warn {
    background: #fffafa;
    color: #e11d48;
    border: 2px solid #fda4af;
}
.btn.warn:hover {
    background: #ffe4e6;
    border-color: #fb7185;
    transform: translateY(-2px);
}

/* ===== الإعلانات والأخبار (تُدار من لوحة المسؤول) ===== */
.announcements-section {
    background: linear-gradient(180deg, #f6fbf8 0%, #ffffff 100%);
    /* مسافات أضيق من قسم البطاقات: البطاقات كبيرة وهذه أصغر */
    padding-block: 3.2rem;
}

.announcements-section .section-header {
    margin-bottom: 2rem;
}

.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1240px;
    margin: 0 auto;
}

.announcement-card {
    background: var(--white);
    border: 1px solid #dbeae4;
    border-inline-start: 5px solid var(--primary-teal);
    border-radius: 1.1rem;
    padding: 1.4rem 1.6rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.announcement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(31, 107, 82, 0.14);
}

.announcement-date {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    background: #eef7f2;
    color: var(--primary-teal-dark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0;
}

.announcement-title {
    margin: 0;
    color: var(--primary-teal-dark);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.6;
}

.announcement-text {
    margin: 0;
    color: #4a6259;
    line-height: 1.9;
    font-size: 0.96rem;
}

@media (max-width: 620px) {
    .announcements-grid { grid-template-columns: 1fr; gap: 1rem; }
    .announcement-card { padding: 1.1rem 1.2rem; }
}
