/* -- نفس الكود السابق من البداية حتى نهاية قسم Philosophy -- */
:root {
    --color-bg: #111827; /* كحلي داكن جداً */
    --color-bg-alt: #1F2937;
    --color-primary: #4FD1C5;
    --color-secondary: #0ea5e9; /* أزرق ساطع */
    --color-text: #E5E7EB; /* أبيض مائل للرمادي */
    --color-text-dark: #9CA3AF;
    --font-family-base: 'Tajawal', sans-serif;
    --gradient-primary: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    text-align: right;
    overflow-x: hidden;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4, h5 { font-weight: 700; }
h1 { font-size: 4rem; font-weight: 800; }
h2 { font-size: 2.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.4rem; color: var(--color-primary); }
h5 { font-size: 1.1rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--color-text-dark); }
p { color: var(--color-text-dark); margin-bottom: 1rem; max-width: 600px; }
section { padding: 100px 0; position: relative; }
.section-title { text-align: center; margin-bottom: 4rem; }
.hero-section { height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; padding: 0; }
.video-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; }
.video-background video { width: 100%; height: 100%; object-fit: cover; }
.hero-section::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.7); z-index: -1; }
.hero-content h1 { text-shadow: 0 0 20px rgba(0,0,0,0.5); opacity: 0; transform: translateY(20px); transition: opacity 1s ease 1s, transform 1s ease 1s; }
.hero-content h1.visible { opacity: 1; transform: translateY(0); }
.philosophy-section { background-color: var(--color-bg); }
.intro-text { font-size: 1.8rem; text-align: center; margin-bottom: 4rem; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.value-card i { font-size: 3rem; background-image: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 1rem; }
/* --- نهاية الكود المشترك --- */

/* ======== SERVICES SECTION (UPDATED) ======== */
.services-section {
    background-color: var(--color-bg-alt);
}
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 4rem;
}
.tab-button {
    font-family: var(--font-family-base);
    background: transparent;
    border: 2px solid var(--color-text-dark);
    color: var(--color-text-dark);
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.tab-button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.tab-button.active {
    background-image: var(--gradient-primary);
    border-color: transparent;
    color: white;
}
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}
.tab-content.active {
    display: block;
}

.service-deep-dive {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background-color: var(--color-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px; /* NEW: Adds space between services */
}
.service-deep-dive:last-child {
    margin-bottom: 0;
}
.service-media-main video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Changed to 2 columns for better fit */
    gap: 15px;
}
.feature-item {
    background: var(--color-bg-alt);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.feature-item i {
    font-size: 1.2rem;
    color: var(--color-primary);
}

/* ======== PROCESS SECTION ======== */
.process-section {
    position: relative;
}
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after { /* The central line */
    content: '';
    position: absolute;
    width: 4px;
    background-image: linear-gradient(to bottom, var(--color-secondary), var(--color-primary));
    top: 0;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    z-index: 1;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
/* Position items on the right */
.timeline-item:nth-child(odd) {
    right: 0;
    padding-left: 0;
}
/* Position items on the left */
.timeline-item:nth-child(even) {
    left: 0;
    padding-right: 0;
    text-align: left;
}
/* The circle on the timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--color-bg);
    border: 4px solid var(--color-primary);
    top: 20px;
    border-radius: 50%;
    z-index: 2;
}
.timeline-item:nth-child(odd)::after {
    right: -10px;
    transform: translateX(50%);
}
.timeline-item:nth-child(even)::after {
    left: -10px;
    transform: translateX(-50%);
}
.timeline-content {
    padding: 20px 30px;
    background: var(--color-bg-alt);
    border-radius: 8px;
    position: relative;
}

/* ======== CTA, ANIMATIONS & RESPONSIVE (UPDATED) ======== */
.cta-section { padding: 120px 0; text-align: center; overflow: hidden; position: relative; }
.cta-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; filter: blur(5px); transform: scale(1.1); }
.cta-background video { width: 100%; height: 100%; object-fit: cover; }
.cta-section::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.8); z-index: -1; }
.btn-cta { display: inline-block; padding: 15px 40px; border-radius: 50px; font-weight: 700; font-size: 1.1rem; color: white; background-image: var(--gradient-primary); background-size: 200% auto; transition: all 0.4s ease; margin-top: 1.5rem; animation: pulse 2s infinite; text-decoration: none; }
.btn-cta:hover { background-position: right center; transform: scale(1.05); animation: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.7); }
  70% { box-shadow: 0 0 0 20px rgba(79, 209, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 209, 197, 0); }
}

.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 992px) {
    .service-deep-dive { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 60px 0; }
    .values-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .timeline::after { right: 30px; transform: none;}
    .timeline-item { width: 100%; padding-right: 70px; padding-left: 0; }
    .timeline-item:nth-child(even) { text-align: right; }
    .timeline-item::after { right: 20px; transform: none; }
    .timeline-item:nth-child(even)::after { left: auto; }
}

/* ... نفس الكود السابق ... */
/* يبدأ من بعد تعديلات @media ويضيف التالي */

/* ======== HEADER & MENU (NEW) ======== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
.main-header.scrolled {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background-image: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}
.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--color-primary);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ======== WHATSAPP FLOAT ICON (NEW) ======== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px; /* RTL friendly */
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 2rem;
    line-height: 60px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
}


/* ======== GENERIC PAGE HEADER (NEW) ======== */
.page-header {
    padding-top: 150px;
    padding-bottom: 50px;
    text-align: center;
    background-color: var(--color-bg-alt);
}
.page-header p {
    max-width: 500px;
    margin: 1rem auto 0;
}


/* ======== BLOG PAGE STYLES (NEW) ======== */
.blog-section { padding-top: 50px; }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.blog-card {
    background-color: var(--color-bg-alt);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-10px);
}
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-content {
    padding: 25px;
}
.card-content .category {
    display: inline-block;
    background-image: var(--gradient-primary);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}
.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ======== CONTACT PAGE STYLES (NEW) ======== */
.contact-section { padding-top: 50px; }
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: flex-start;
}
.contact-form h3 { margin-bottom: 2rem; }
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-dark);
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    background-color: var(--color-bg-alt);
    border: 1px solid #374151;
    border-radius: 8px;
    color: var(--color-text);
    font-family: var(--font-family-base);
}
.contact-info img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.contact-info ul {
    list-style: none;
    margin-top: 1.5rem;
}
.contact-info ul li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}
.contact-info ul li i {
    font-size: 1.2rem;
    color: var(--color-primary);
}
.social-links-contact {
    margin-top: 2rem;
}
.social-links-contact a {
    color: var(--color-text-dark);
    font-size: 1.5rem;
    margin-left: 20px;
}


/* ======== RESPONSIVE UPDATES ======== */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s ease-in-out;
    }
    .nav-links.active {
        right: 0;
    }
    .menu-toggle {
        display: block;
        z-index: 1001; /* Above nav links */
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ======== BLOG POST DETAIL PAGE (NEW) ======== */

.post-hero {
    height: 60vh;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.95), transparent);
}

.post-hero .container {
    position: relative;
    z-index: 2;
}

.post-hero h1 {
    font-size: 3rem;
    color: #FFF;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    gap: 25px;
    color: var(--color-text-dark);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-section {
    padding-top: 50px;
}

.post-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 50px;
}

.post-content {
    max-width: 100%;
}

.post-content p, .post-content ul li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.post-content ul {
    list-style: disc;
    padding-right: 20px;
}

.post-content blockquote {
    border-right: 4px solid var(--color-primary);
    padding: 15px 25px;
    margin: 2rem 0;
    background-color: var(--color-bg-alt);
    font-size: 1.2rem;
    font-style: italic;
    border-radius: 8px;
}

.post-image {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-bg-alt);
}

.post-tags a {
    display: inline-block;
    background-color: var(--color-bg-alt);
    padding: 5px 15px;
    margin: 5px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--color-text-dark);
    text-decoration: none;
}

.share-buttons {
    margin-top: 1.5rem;
}

.share-buttons a {
    color: var(--color-text-dark);
    font-size: 1.3rem;
    margin-left: 15px;
}

.post-cta {
    margin-top: 3rem;
    padding: 30px;
    background-image: linear-gradient(to top right, var(--color-bg-alt), #111827);
    text-align: center;
    border-radius: 12px;
}

.post-cta .btn-cta {
    animation: none; /* Disable pulse on this button */
}

/* Sidebar Styles */
.sidebar .widget {
    background-color: var(--color-bg-alt);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.sidebar .widget h4 {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
}

.sidebar .widget ul {
    list-style: none;
}

.sidebar .widget ul li {
    margin-bottom: 1rem;
}

.sidebar .widget ul li a {
    color: var(--color-text);
    text-decoration: none;
}

/* Responsive for Blog Post */
@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        margin-top: 4rem;
    }
}

@media (max-width: 768px) {
    .post-hero h1 {
        font-size: 2.2rem;
    }
    .post-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}