:root {
    /* Light Mode */
    --primary-color: #1ab2c0;
    --accent-color: #008080;
    --bg-color: #F4F7F7;
    --surface-color: #ffffff;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --header-bg: rgba(244, 247, 247, 0.8);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-theme="dark"] {
    --bg-color: #0a0f10;
    --surface-color: #1a2526;
    --text-dark: #f0f3f4;
    --text-light: #b0bec5;
    --glass-bg: rgba(26, 32, 44, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    --header-bg: rgba(10, 15, 16, 0.9);
    --white: #f0f3f4;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    transition: background-color 0.4s ease;
}

body {
    font-family: "Cairo", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

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

/* Typography */
h1,
h2,
h3 {
    font-weight: 900;
    line-height: 1.8;
}

p {
    font-weight: 300;
    color: var(--text-light);
}

.highlight {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(26, 178, 192, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 178, 192, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
header {
    background-color: transparent !important;
    backdrop-filter: blur(0px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

/* Scrolled Header State */
header.scrolled {
    background-color: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition);
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Text to the right */
}

#hero {
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 100vh;
}



/* Overlay Removed for Clarity */
#hero::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-content a,
.hero-content button {
    pointer-events: auto;
}

.hero .container {
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 0 1 auto;
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
}

.hero-content p {
    font-family: "Cairo", sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.8;
    pointer-events: none;
    text-align: center;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    opacity: 1;
    transform: scale(0.9);
}

.dashboard-mockup {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--glass-border);
    transition: background-color 0.4s ease;
}

.mockup-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    margin-right: 5px;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    height: 200px;
    margin-bottom: 30px;
}

.bar {
    flex: 1;
    background: var(--primary-color);
    border-radius: 5px 5px 0 0;
    opacity: 0.7;
    transition: var(--transition);
}

.bar:hover {
    opacity: 1;
    transform: scaleX(1.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: background-color 0.4s ease;
}

.stat-item .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-color);
}

/* Social Proof */
.social-proof {
    padding: 60px 0;
    background: var(--bg-color);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    transition: background-color 0.4s ease;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-track {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.logo-slide {
    display: flex;
    align-items: center;
    gap: 100px;
    padding-right: 100px;
}

.logo-slide img {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

/* استهداف الحاوية المباشرة للشعارات في وضع الدارك */
[data-theme="dark"] .logo-track,
[data-theme="dark"] body>section.social-proof div {
    /* 1. إزالة أي فلاتر رمادية أو تبهيت */
    filter: none !important;
    opacity: 1 !important;
}

/* استهداف الشعارات نفسها (الصور) */
[data-theme="dark"] .logo-slide img,
[data-theme="dark"] body>section.social-proof img {
    filter: brightness(1) contrast(1) !important;
    /* لضمان وضوح الألوان الأصلي */
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    /* لمنع تداخل ألوان الشعار مع الخلفية الداكنة */
}

/* إزالة طبقات التلاشي (Overlays) عند الأطراف التي تسبب لوناً رمادياً */
[data-theme="dark"] body>section.social-proof::before,
[data-theme="dark"] body>section.social-proof::after {
    display: none !important;
    content: none !important;
}

.logo-slide img:hover {
    filter: none;
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Stats Section */
.stats {
    padding: 60px 0;
    background: var(--accent-color);
    color: var(--white);
}

.stats-grid-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-card h3 {
    font-size: 3rem;
    margin-bottom: 5px;
    color: var(--white);
}

.stat-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Process */
.process {
    padding: 60px 0;
    background: var(--bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

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

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.process-card {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.process-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.process-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.process-card h3 {
    margin-bottom: 15px;
}

/* Case Studies */
.case-studies {
    padding: 60px 0;
    background: var(--bg-color);
}

/* Case Studies - Bento Grid */
.case-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 25px;
}

.case-card {
    background: var(--surface-color);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.case-card:nth-child(1) {
    grid-column: span 8;
}

.case-card:nth-child(2) {
    grid-column: span 4;
}

.case-card:nth-child(3) {
    grid-column: span 4;
}

.case-card:nth-child(4) {
    grid-column: span 4;
}

.case-card:nth-child(5) {
    grid-column: span 4;
}

.case-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.case-info {
    padding: 40px;
}

.case-info h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.case-info img {
    height: 100px !important;
}

.tagline {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.results {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.results li {
    font-size: 0.9rem;
}

.results li span {
    display: block;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.results li.growth {
    grid-column: span 2;
    background: rgba(26, 178, 192, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.results li.growth span {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Contact */
.contact {
    padding: 60px 0;
    background: var(--bg-color);
}

.contact-wrapper {
    display: flex;
    background: var(--surface-color);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.08);
    transition: background-color 0.4s ease;
}

/* التنسيق الأساسي للحقول */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* عمودين للدسكيتوب */
    gap: 20px;
}

.contact-info {
    flex: 1;
    background: var(--accent-color);
    color: var(--white);
    padding: 70px;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.scarcity {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 25px;
    border-radius: 50px;
    display: inline-block;
}

.contact-form {
    flex: 1.2;
    padding: 70px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--bg-color);
    color: var(--text-dark);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 178, 192, 0.1);
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

/* Footer */
footer {
    padding: 60px 0;
    background: var(--surface-color);
    color: var(--text-dark);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--glass-border);
}

.footer-logo img {
    height: 60px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-dark);
    font-size: 20px;
    opacity: 0.6;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* --- Enhanced Blog Post Styles --- */

/* Reading Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 2000;
}

.progress-bar {
    height: 4px;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Post Hero Section */
.post-hero {
    padding: 80px 0 40px;
    text-align: center;
    background: var(--bg-color);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.post-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    line-height: 1.2;
}

.post-meta-detailed {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.author-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
}

.post-meta-item {
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-image-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.featured-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

/* Layout with Sidebar */
.post-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Table of Contents */
.toc-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 40px;
}

.toc-container h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.toc-list a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

/* Article Content Styling */
.post-main-content {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-dark);
}

.post-main-content blockquote {
    margin: 40px 0;
    padding: 30px;
    background: var(--glass-bg);
    border-right: 5px solid var(--primary-color);
    border-radius: 10px;
    font-style: italic;
    color: var(--accent-color);
    font-size: 1.4rem;
}

/* Inline CTA */
.inline-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 40px;
    border-radius: 25px;
    color: var(--white);
    text-align: center;
    margin: 50px 0;
    box-shadow: 0 15px 35px rgba(26, 178, 192, 0.3);
}

.inline-cta h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.inline-cta .btn-white {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    transition: var(--transition);
}

.inline-cta .btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Sticky Sidebar */
.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
}

/* Sharing Buttons */
.share-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.share-btns {
    display: flex;
    gap: 15px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.share-btn.whatsapp { background: #25D366; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.copy { background: var(--primary-color); cursor: pointer; }

.share-btn:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

@media (max-width: 992px) {
    .post-layout-wrapper {
        grid-template-columns: 1fr;
    }
    .post-hero h1 { font-size: 2.2rem; }
    .post-meta-detailed { flex-direction: column; gap: 15px; }
    .post-sidebar { display: none; }
}

/* Scoped refinement for blog post reveal animations */
.post-hero .reveal.active,
.post-main-content .reveal.active,
.post-layout-wrapper .reveal.active {
    opacity: 1;
    transform: translateY(0);
    margin-top: 5%;
}



/* Related Posts Section */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--glass-border);
}

.related-posts h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.related-card-img {
    height: 150px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.related-card-content {
    padding: 15px;
}

.related-card-content h4 {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Trending Widget */
.trending-widget {
    counter-reset: trending-counter;
}

.trending-list {
    list-style: none;
    padding: 0;
}

.trending-item {
    position: relative;
    padding: 15px 0 15px 45px;
    border-bottom: 1px solid var(--glass-border);
    counter-increment: trending-counter;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item::before {
    content: counter(trending-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.3;
}

.trending-item a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.trending-item a:hover {
    color: var(--primary-color);
}

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

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .logo-slide {
        gap: 40px;
        padding-right: 40px;
    }

    .logo-slide img {
        height: 50px;
    }

    .logo-track {
        animation: scroll 20s linear infinite;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

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

    .case-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .case-card:nth-child(n) {
        grid-column: span 1;
    }

    .contact-wrapper {
        flex-direction: column;
        /* يخلي الكلام فوق والفورم تحت */
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        /* يحول العمودين لعمود واحد فوق بعض */
        gap: 15px;
        /* يقلل المسافة شوية */
    }

    .contact-info {
        padding: 70px 30px;
        border-radius: 5%;
    }

    .contact-info h2 {
        font-size: 1.5rem;
        /* يصغر العنوان عشان ميبقاش ضخم */
        line-height: 1.4;
    }

    .contact-info p {
        font-size: 0.95rem;
        /* يخلي النص مريح للعين */
    }

    .scarcity {
        background: rgba(0, 0, 0, 0.2);
        padding: 15px 25px;
        border-radius: 10px;
        display: inline-block;
    }

    input,
    select,
    button {
        width: 100%;
        /* يضمن إن كل حاجة واخدة عرض الشاشة */
        font-size: 16px !important;
        /* يمنع الزوم التلقائي في الآيفون عند الكتابة */
    }

    .contact-form {
        flex: 1.2;
        padding: 70px 15px;
    }
}

/* إعدادات الموبايل (الشاشات الأصغر من 768px) */
@media (max-width: 768px) {
    /* تأكد أن حاوية النص تأخذ المساحة الكاملة في الموبايل */
    .hero-content {
        margin-right: 0 !important;
        padding: 0 13px;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .hero-content p {
        text-align: center;
    }

    .footer-bottom p {
        text-align: center;
        margin-top: 5%;
    }

    /* تعديل القائمة في الموبايل */
    body>header>div>nav>ul {
        display: flex;
        /* Always flex but hidden via position/opacity */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 20px;
        z-index: 1000;

        /* الحالة الابتدائية: مخفية خلف الهيدر */
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        /* استبدال الأبيض الثابت بالمتغير الذكي */
        background: var(--surface-color) !important;
        /* تعديل الظل ليكون أنعم في الدارك مود */
        box-shadow: var(--shadow) !important;
        /* إضافة حدود ناعمة لتمييز القائمة عن الخلفية */
        border: 1px solid var(--glass-border);
        /* التأكد من أن الترانزيشن شغال بسلاسة */
        transition: var(--transition);
    }

    body>header>div>nav>ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* التأكد من أن النصوص (الروابط) داخل المنيو تتبع لون التكست الصحيح */
    body>header>div>nav>ul>li>a {
        color: var(--text-dark) !important;
        display: block;
        padding: 10px 0;
    }

    .menu-toggle {
        display: block;
    }
}

/* --- Newsletter Section --- */
.newsletter {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    background: var(--bg-color);
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%);
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.newsletter-card {
    background: linear-gradient(135deg, rgba(26, 178, 192, 0.1) 0%, rgba(0, 128, 128, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 80px 40px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow);
    text-align: center;
    overflow: hidden;
}

.newsletter-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), transparent, var(--accent-color));
    z-index: -1;
    border-radius: 40px;
    opacity: 0.15;
}

.newsletter-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    letter-spacing: -1px;
}

.newsletter-content h2 i {
    display: inline-block;
    color: var(--primary-color);
    margin-right: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-10px) rotate(10deg);
    }
}

.newsletter-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.input-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 25px;
    color: var(--primary-color);
    font-size: 1.1rem;
    opacity: 0.7;
}

.newsletter-form input {
    width: 100%;
    background: var(--surface-color);
    border: 2px solid transparent;
    padding: 20px 60px 20px 25px;
    border-radius: 50px;
    font-size: 1.05rem;
    color: var(--text-dark);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.newsletter-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(26, 178, 192, 0.2);
    outline: none;
}

.newsletter-form .btn {
    padding: 20px 45px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    min-width: 200px;
}

.newsletter-message {
    margin-top: 25px;
    font-size: 1rem;
    font-weight: 600;
}

/* Response Section spacing Adjustments */
@media (max-width: 992px) {
    .newsletter {
        padding: 30px 0;
    }
    .hero { padding: 30px 0; }
    .social-proof { padding: 30px 0; }
    .stats { padding: 30px 0; }
    .process { padding: 30px 0; }
    .case-studies { padding: 30px 0; }
    .contact { padding: 30px 0; }
    footer { padding: 30px 0; }


    .newsletter-card {
        padding: 60px 25px;
        border-radius: 30px;
    }

    .newsletter-card::after {
        border-radius: 30px;
    }

    .newsletter-content h2 {
        font-size: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 20px;
    }

    .newsletter-form .btn {
        width: 100%;
        padding: 18px;
    }
}

/* Animations & Tweaks */
.newsletter-form .btn i {
    transition: transform 0.3s ease;
}

.newsletter-form .btn:hover i {
    transform: translateX(-8px);
}

button,
input,
select,
textarea {
    font-family: "Cairo", sans-serif !important;
}

/* تنسيق الفاصل بين الروابط والجزء العلوي */
.footer-links {
    /* 1. إضافة الخط العلوي */
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    /* لون رمادي خفيف جداً للايت مود */

    /* 2. ضبط المسافات حول الخط */
    padding-top: 25px;
    margin-top: 0px;

    /* 3. تنسيق العناصر */
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* تعديل اللون في وضع الدارك (Dark Mode) ليناسب الخلفية السوداء */
[data-theme="dark"] .footer-links {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* خط أبيض شفاف وهادئ */
}

/* لمسة جمالية للروابط نفسها لزيادة التباين */
.footer-links a {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* --- Modern Blog Styles --- */
.blog-hero {
    padding: 160px 0 60px; /* Strong top padding to clear fixed header */
    background: var(--bg-color);
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.blog-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 900;
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.2rem;
    }
}

.blog-hero p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--text-light);
}

.blog-main-section {
    padding: 80px 0; /* Reduced since hero provides top spacing */
    background: var(--bg-color);
}

.main-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 50px;
    align-items: start;
    width: 100%;
}

/* Sidebar Styling */
.blog-sidebar {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.sidebar-block {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.sidebar-block:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.sidebar-block h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--text-dark);
    font-weight: 800;
    position: relative;
    padding-right: 15px;
}

.sidebar-block h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 10px;
}

/* Beautified Inputs */
.search-box, .sidebar-block form {
    position: relative;
}

.search-box input, 
.sidebar-block form input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border-radius: 15px;
    border: 2px solid var(--glass-border);
    background: var(--bg-color);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: color 0.3s ease;
}

.search-box input:focus,
.sidebar-block form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 178, 192, 0.1);
}

.search-box input:focus + i {
    color: var(--primary-color);
}

.sidebar-block .btn-block {
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
}

.category-tabs-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tabs-vertical .cat-tab {
    text-align: right;
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--bg-color);
    border: 1px solid transparent;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition);
}

.category-tabs-vertical .cat-tab.active,
.category-tabs-vertical .cat-tab:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(-5px);
}

.premium-block {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
}

.premium-block h3, .premium-block p {
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}

.premium-block form input {
    margin-bottom: 10px;
}

/* Main Content Area */
.blog-content-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--surface-color);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.featured-img {
    height: 350px;
}

.featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h2 {
    font-size: 1.8rem;
    margin: 15px 0;
}

/* Grid Area */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.blog-card {
    background: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.blog-card-img {
    height: 200px;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 20px;
}

.tag {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: rgba(26, 178, 192, 0.1);
    color: var(--primary-color);
    border-radius: 5px;
    font-weight: 700;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 15px 0;
    display: flex;
    gap: 15px;
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 5px 0;
}

.blog-read-more i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.blog-read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.blog-read-more:hover {
    color: var(--primary-dark);
}

.blog-read-more:hover i {
    transform: translateX(-5px);
}

.blog-read-more:hover::after {
    width: 70%;
}

/* Responsive */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
    
    .category-tabs-vertical {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        width: 100%;
    }
    
    .category-tabs-vertical::-webkit-scrollbar {
        display: none;
    }
    
    .category-tabs-vertical .cat-tab {
        width: auto;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-card {
        grid-template-columns: 1fr;
    }
}