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

:root {
    --bg-color: #FFFFFF;
    --card-bg: #F9F9F9;
    --text-main: #111111;
    --text-muted: #555555;
    --accent: #FF6719;
    --accent-hover: #E55C16;
    --border-color: #EAEAEA;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    --font-main: 'Cairo', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* --- HEADER & NAV --- */
header {
    padding: 50px 0;
    /* تم زيادة الحشوة من 30px إلى 50px لجعله أسمك */
    margin-bottom: 10px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 20px;
    font-weight: 600;
}

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

/* --- TYPOGRAPHY & DIVIDERS --- */
.section-heading {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 2rem;
    font-weight: 800;
}

.chapter-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 70px 0 20px;
}

.badge {
    display: inline-block;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Guide Card Background & Overlay Styles */
/* --- Goal 3: Guide Card Button Positioning --- */
.guide-card {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    padding: 30px;
    color: #FFFFFF;
    border: 1px solid var(--border-color);

    /* Ensure the card has enough height to push buttons down */
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.guide-card-content {
    position: relative;
    z-index: 2;
    /* Flex layout to manage vertical spacing */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.guide-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    /* This specific line pushes the buttons to the absolute bottom of the card */
    margin-top: 0;
}

.guide-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* الرقم الأخير 0.4 يعني شفافية بنسبة 40% فقط، مما يظهر الصورة بشكل أوضح بكثير */
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}


/* Override text colors inside the guide card to be white */
.guide-card-content h3,
.guide-card-content p,
.guide-card-content .price-value {
    color: #FFFFFF;
}

.bottom-actions-container {
    margin-top: auto;
    /* هذا السطر يفصل هذه المجموعة عن النص ويدفعها لأقصى الأسفل */
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* المسافة بين السعر والأزرار */
}

/* Enable smooth scrolling for the Post page group buttons */
html {
    scroll-behavior: smooth;
}

/* --- BUTTONS --- */
.btn {
    display: block !important;
    width: 100% !important;
    padding: 14px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-family: var(--font-main) !important;
    text-align: center !important;
    transition: var(--transition) !important;
    box-sizing: border-box !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.btn-primary {
    background: var(--accent) !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover {
    background: #5a1718 !important;
}

/* --- POSTS CARDS --- */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-card {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.post-card-pattern {
    width: 80px;
    background: rgba(122, 32, 33, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.8rem;
}

.post-card-body {
    padding: 20px;
    flex: 1;
}

.post-card-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.post-card-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-card-meta {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid var(--border-color);
    min-width: 120px;
}

.post-card-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-card-arrow {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* --- ABOUT PAGE STYLES --- */
.saas-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.job-item {
    border-right: 3px solid var(--accent-gold);
    padding-right: 20px;
    position: relative;
}

.job-item::before {
    content: '';
    position: absolute;
    right: -7px;
    top: 5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.job-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
}

.job-location {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
}

.job-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.job-description {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.skills-card {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(122, 32, 33, 0.08);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(122, 32, 33, 0.15);
}

/* --- FOOTER --- */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--accent);
    font-weight: 700;
    margin: 0 10px;
    transition: var(--transition);
}

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

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .post-card {
        flex-direction: column;
    }

    .post-card-pattern {
        width: 100%;
        height: 60px;
    }

    .post-card-meta {
        border-right: none;
        border-top: 1px solid var(--border-color);
        flex-direction: row;
        justify-content: space-between;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}

/* --- SKELETON LOADER & ANIMATIONS --- */
.skeleton-card {
    height: 110px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* استخدام ألوان متناسقة مع الورق الدافئ (Warm Paper) */
    background: linear-gradient(90deg, rgba(44, 40, 37, 0.03) 25%, rgba(44, 40, 37, 0.08) 50%, rgba(44, 40, 37, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

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

    100% {
        background-position: -200% 0;
    }
}

/* تأثير الظهور السلس للمقالات الجديدة */
.post-card.fade-in {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.5s ease-out forwards;
}

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

/* --- PROMO PRICING STYLES --- */
/* --- Price Section Styling --- */
.guide-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFFFFF;
    /* لون أبيض ليتناسب مع الخلفية الداكنة للكرت */
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.guide-price .price-currency {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

/* --- Email Requirement Note --- */
.email-note {
    display: block;
    font-size: 0.85rem;
    color: #cccccc;
    /* رمادي فاتح مقروء */
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
}

.email-note i {
    margin-left: 5px;
    color: var(--accent);
    /* جعل الأيقونة بلون مختلف للفت الانتباه بشكل بسيط */
}

/* تنسيقات مستعرض الـ PDF المخصص للهواتف */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdf-modal-container {
    width: 95%;
    height: 92%;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pdf-modal-header {
    background-color: var(--bg-color);
    /* Matches clean theme */
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    direction: rtl;
}

.pdf-modal-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.close-pdf-btn {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.85rem;
    transition: var(--transition);
}

.close-pdf-btn:hover {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}


.pdf-modal-body {
    flex-grow: 1;
    background: #525659;
}

/* --- Goal 4: Post Groups Navigation Buttons --- */
.post-groups-nav {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.group-btn {
    padding: 10px 25px;
    border-radius: 30px;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.group-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Profile Photo Styling --- */
.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    /* Ensures the image isn't stretched */
    border: 4px solid var(--card-bg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto 20px;
    display: block;
}

/* --- Guides Grid Layout --- */
.guides-grid {
    display: grid;
    /* This automatically makes cards side-by-side on PC, and stacks them on mobile */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* --- Coming Soon Badge --- */
.coming-soon-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    margin-top: auto;
    /* Pushes the badge to the absolute bottom of the card */
    align-self: flex-start;
    /* Keeps it button-sized instead of stretching */
    backdrop-filter: blur(5px);
}

/* --- Estimated Read Time Badge --- */
.read-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    /* شفافية بيضاء خفيفة */
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    /* مسافة بينه وبين العنوان أسفله */
    backdrop-filter: blur(4px);
    /* تأثير ضبابي للخلفية */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    /* مسار صورة الخلفية (Placeholder) - قم بتغييره لاسم صورتك */
    background-image: url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 60px 30px;
    border-radius: 15px;
    /* حواف دائرية أنيقة */
    margin-bottom: 40px;
    overflow: hidden;
    color: #FFFFFF;
    /* نص أبيض ليتناسب مع التعتيم */
}

/* طبقة تعتيم سوداء شفافة فوق الصورة لكي يبقى النص مقروءاً بوضوح */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    /* نسبة التعتيم 70% */
    z-index: 1;
}

/* حاوية المحتوى (النص والصورة) */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    /* عرض العناصر بجانب بعضها */
    align-items: center;
    justify-content: flex-start;
    /* دفع العناصر لليمين (بسبب rtl) */
    gap: 30px;
    /* المسافة بين صورتك والنص */
}

/* تنسيق الصورة الشخصية أو البارزة بجانب النص */
.hero-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero-text h1 {
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.hero-text p {
    font-size: 1.15rem;
    max-width: 600px;
    line-height: 1.8;
    color: #E0E0E0;
}

/* استجابة للهواتف المحمولة */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        /* جعل الصورة فوق النص في الهواتف */
        text-align: center;
        /* توسيط النص في الهواتف ليكون أجمل */
        justify-content: center;
    }
}