/* =========================================================
   Nour Homepage — Design System
   ========================================================= */

/* ---- Hero Section ---- */
.hero {
    background: linear-gradient(155deg, #1a2478 0%, var(--primary-deep, #11186B) 40%, #0c1050 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0 4rem;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: heroFloat 10s ease-in-out infinite;
    pointer-events: none;
}

.hero::before {
    width: 600px; height: 600px;
    background: #4F6AFF;
    top: -20%; right: -5%;
}

.hero::after {
    width: 400px; height: 400px;
    background: #FBBF24;
    bottom: -15%; left: 5%;
    animation-delay: -5s;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -20px) scale(1.03); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text { text-align: right; }

.hero-title {
    font-size: 2.75rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-title span {
    color: #FBBF24;
}

.hero-desc {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-btns {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 0.6rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.hero-btn-primary {
    background: #fff;
    color: var(--primary, #24308F);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: var(--primary, #24308F);
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.25);
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    transform: translateY(-2px);
}

.hero-btn i { font-size: 1.1rem; }

/* Hero Visual (Left side) */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 380px;
}

.hero-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 1rem;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    animation: heroCardIn 0.6s ease backwards;
}

.hero-card:nth-child(1) { animation-delay: 0.1s; }
.hero-card:nth-child(2) { animation-delay: 0.25s; }
.hero-card:nth-child(3) { animation-delay: 0.4s; }

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

.hero-card:hover {
    background: rgba(255,255,255,0.14);
    transform: translateX(-4px);
}

.hero-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.hero-card-icon.blue { background: rgba(59,130,246,0.2); color: #60A5FA; }
.hero-card-icon.green { background: rgba(16,185,129,0.2); color: #34D399; }
.hero-card-icon.amber { background: rgba(251,191,36,0.2); color: #FBBF24; }

.hero-card-info { flex: 1; }

.hero-card-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.hero-card-label {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

/* ---- Stats Section ---- */
.stats-section {
    padding: 4rem 0;
    background: var(--bg-page, #F8FAFC);
}

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

.stat-card {
    background: #fff;
    border-radius: var(--radius, 0.75rem);
    border: 1px solid var(--border, #E5E7EB);
    border-top: 2.5px solid var(--primary, #24308F);
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--primary-soft, #EEF2FF);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.stat-icon i {
    font-size: 1.25rem;
    color: var(--primary, #24308F);
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main, #1F2937);
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.88rem;
    color: var(--text-muted, #5B6780);
    font-weight: 600;
}

/* ---- Announcements Section ---- */
.announcements-section {
    padding: 4rem 0;
    background: #F4F7FF;
    border-top: 1px solid #DDE6FF;
    position: relative;
}

/* فاصل ناعم بدل الخط الأزرق الحاد */
.announcements-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(47, 52, 143, 0.18),
        transparent
    );
    pointer-events: none;
}
/* ===== Carousel Wrapper ===== */
.announcements-carousel {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 4rem; /* مساحة للأسهم */
}

.announcements-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0 1rem;
}
.announcements-track::-webkit-scrollbar { display: none; }

.announcements-track > .announcement-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* ===== Arrow Buttons ===== */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s, transform 0.2s, color 0.2s;
    color: var(--primary, #24308F);
    font-size: 1.1rem;
}
.carousel-arrow:hover {
    background: var(--primary, #24308F);
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}
.carousel-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #fff;
    color: var(--primary, #24308F);
    transform: translateY(-50%);
}
.carousel-arrow-prev { right: 0; }   /* في RTL "السابق" يمين */
.carousel-arrow-next { left: 0; }    /* في RTL "التالي" يسار */

/* ===== Dots ===== */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #D1D5DB;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, width 0.2s;
}
.carousel-dot.is-active {
    background: var(--primary, #24308F);
    width: 28px;
    border-radius: 999px;
}
.carousel-dot:hover:not(.is-active) {
    background: #9CA3AF;
}

@media (max-width: 640px) {
    .announcements-carousel { padding: 0 0.5rem; }
    .carousel-arrow { width: 38px; height: 38px; font-size: 1rem; }
}

.announcement-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.announcement-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border-color: #D1D5DB;
}

.announcement-card.is-featured {
    border: 1px solid #C7D2FE;
    box-shadow: 0 6px 24px rgba(36, 48, 143, 0.12);
}

/* رأس الكارد: شريط رمادي يحوي العنوان (مطابق للشكل المعتمد) */
.announcement-header {
    background: #EFEFEF;
    padding: 0.9rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    position: relative;
}

/* الكارد المميز: الهيدر بلون البراند بدل الأصفر */
.announcement-card.is-featured .announcement-header {
    background: linear-gradient(135deg, var(--primary, #24308F) 0%, #3B45A8 100%);
    border-bottom-color: var(--primary, #24308F);
}

.announcement-card.is-featured .announcement-title {
    color: #fff;
}

.announcement-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1F2937;
    line-height: 1.4;
    margin: 0;
}

/* شارة "مميز" — Ribbon في ركن العلوي الأيمن (RTL) */
.announcement-badge {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    background: #F59E0B;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 0;
    border-end-end-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
    z-index: 2;
}

.announcement-badge i {
    font-size: 0.78rem;
}

/* جسم الكارد */
.announcement-body {
    padding: 1.5rem 2rem;
}

.announcement-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted, #5B6780);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed #E5E7EB;
}

.announcement-text {
    color: #1F2937;
    font-size: 0.98rem;
    line-height: 2;
    text-align: justify;
    white-space: pre-wrap;
    margin-bottom: 1rem;
}

.announcement-footer {
    color: var(--text-muted, #5B6780);
    font-size: 0.82rem;
    font-weight: 600;
    padding-top: 0.75rem;
    border-top: 1px dashed #E5E7EB;
}

@media (max-width: 640px) {
    .announcement-body { padding: 1rem 1.25rem; }
    .announcement-header { padding: 0.75rem 1rem; }
    .announcement-text { font-size: 0.92rem; line-height: 1.9; }
}

/* ---- Features Section ---- */
.features-section {
    padding: 4rem 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-card {
    background: var(--bg-page, #F8FAFC);
    border: 1px solid var(--border, #E5E7EB);
    border-radius: var(--radius, 0.75rem);
    padding: 1.75rem;
    text-align: center;
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--primary, #24308F);
    box-shadow: 0 4px 16px rgba(36,48,143,0.08);
    transform: translateY(-2px);
}

.feature-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--primary-soft, #EEF2FF);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon i {
    font-size: 1.4rem;
    color: var(--primary, #24308F);
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main, #1F2937);
    margin-bottom: 0.4rem;
}

.feature-text {
    font-size: 0.88rem;
    color: var(--text-muted, #5B6780);
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

/* ---- CTA Section ---- */
.cta-section {
    padding: 3.5rem 0;
    background: linear-gradient(135deg, var(--primary, #24308F) 0%, var(--primary-deep, #11186B) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.cta-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: #fff;
    color: var(--primary, #24308F);
    border-radius: 0.6rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: var(--primary, #24308F);
}

/* ---- Scroll Animation ---- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-text { text-align: center; }
    .hero-desc { margin: 0 auto 2rem; }
    .hero-btns { justify-content: center; }
    .hero-visual { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .hero { padding: 3rem 0; min-height: auto; }
    .hero-title { font-size: 2rem; }
    .hero-desc { font-size: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .features-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.5rem; }
    .cta-title { font-size: 1.4rem; }
}
