:root {
    --bg-body: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --secondary: #f59e0b;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --header-height: 70px;
    --radius: 1rem;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    --header-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-hover: #7dd3fc;
    --secondary: #fbbf24;
    --surface: #1e293b;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --header-bg: rgba(15, 23, 42, 0.85);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-ar);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

body.lang-en {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* Header */
.header {
    height: var(--header-height);
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
}

.logo img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

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

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
    [dir="rtl"] & {
        left: auto;
        right: 0;
    }
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(15deg);
}

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    width: 28px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: radial-gradient(circle at top right, var(--surface), var(--bg-body));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    opacity: 0.05;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-logo {
    height: 140px;
    width: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 2rem;
    border: 4px solid var(--border);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .hero-logo {
        height: 110px;
        width: 110px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Features/Points */
.features {
    padding: 5rem 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

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

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

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

/* Footer */
.footer {
    background-color: var(--surface);
    padding: 4rem 0 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-inline-start: 5px;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Utilities for Language */
[lang="ar"] .lang-en { display: none; }
[lang="en"] .lang-ar { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--bg-body);
        width: 100%;
        height: calc(100vh - var(--header-height));
        padding: 2rem;
        transition: 0.3s;
        border-top: 1px solid var(--border);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }
    
    [dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
    }
    
    [dir="rtl"] .nav-menu.active {
        right: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Shared Components */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    color: var(--text-main);
    font-size: 2.25rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    background: var(--bg-body);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

/* Decision Cards Specific */
.decision-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.decision-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.decision-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.decision-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.decision-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.decision-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-secret {
    background-color: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .badge-secret {
    background-color: #450a0a;
    color: #fca5a5;
}

.badge-public {
    background-color: #dcfce7;
    color: #166534;
}

[data-theme="dark"] .badge-public {
    background-color: #052e16;
    color: #86efac;
}

.decision-content {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.decision-list {
    list-style: disc;
    padding-inline-start: 1.5rem;
    margin-top: 0.5rem;
}

.decision-list li {
    margin-bottom: 0.5rem;
}

.decision-actions {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Task Status */
.task-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.task-status.completed {
    background: #dcfce7;
    color: #166534;
}

.task-status.incomplete {
    background: #fef9c3;
    color: #854d0e;
}

[data-theme="dark"] .task-status.completed {
    background: #052e16;
    color: #86efac;
}

[data-theme="dark"] .task-status.incomplete {
    background: #422006;
    color: #fef08a;
}
