:root {
    --primary-color: #003399; /* Royal Blue */
    --secondary-color: #E31B23; /* Red Accent */
    --accent-color: #FBB03B; /* Gold Accent (Optional) */
    --text-dark: #1A1A1A;
    --text-light: #F8F9FA;
    --bg-light: #FFFFFF;
    --bg-dark: #001A4D; /* Deep Navy */
    --gray-light: #F1F3F5;
    --gray-dark: #ADB5BD;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --grid-gap: 30px;
}

.grid {
    display: grid;
    gap: var(--grid-gap);
}

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

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

/* Navbar */
nav.navbar {
    height: 90px;
    display: flex;
    align-items: center;
    background: transparent;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

nav.navbar.sticky {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.logo img {
    height: 50px;
    transition: var(--transition);
}

.text-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.text-logo .accent {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    transition: var(--transition);
}

.nav-links a {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.lang-link {
    background: var(--primary-color);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-block;
}

.lang-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 26, 77, 0.8), rgba(0, 51, 153, 0.4));
}

.hero-content {
    position: relative;
    max-width: 700px;
    z-index: 10;
}

.hero-content h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #C1171E;
    border-color: #C1171E;
    transform: translateY(-3px);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Cards & Layout */
.section {
    padding: 100px 0;
}

.bg-light { background-color: var(--gray-light); }

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card-grid .card,
.meth-card {
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Methodology */
.meth-card {
    text-align: center;
}

.meth-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Program Cards */
.program-card {
    overflow: hidden;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.program-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.program-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.program-content h3 {
    margin-bottom: 10px;
}

.program-content p {
    flex: 1; /* This pushes the button to the bottom */
    margin-bottom: 20px;
}

/* Rules Section */
.rules-list {
    max-width: 800px;
    margin: 0 auto;
}

.rule-item {
    background: white;
    margin-bottom: 20px;
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.rtl .rule-item {
    border-left: none;
    border-right: 5px solid var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

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

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

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.social-links a:hover {
    background: var(--secondary-color);
}

.footer-grid h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
}

.app-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-btn-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    height: 52px;
    width: 170px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    direction: ltr !important; /* Keep badges standard LTR */
}

.app-btn-premium img, 
.app-btn-premium svg {
    height: 85%; /* Slightly smaller for better padding appearance */
    width: auto;
    max-width: 90%;
    display: block;
}

.app-btn-premium:hover {
    transform: scale(1.05);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: var(--gray-dark);
}

/* Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    nav.navbar {
        background: white;
        height: 70px;
    }
    .nav-links {
        display: none; /* Hide for mobile toggle implementation later */
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-text .section-title {
        text-align: center !important;
    }
    .about-image {
        order: -1;
    }
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 40px;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        display: flex !important; /* Ensure it overrides display:none but uses left for hiding */
    }
    .nav-links.active {
        left: 0;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .section-title h2 {
        font-size: 2rem;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* RTL Support */
[dir="rtl"], 
body.rtl-layout {
    font-family: 'Almarai', sans-serif !important;
}

[dir="rtl"] .hero::before {
    background: linear-gradient(to left, rgba(0, 26, 77, 0.8), rgba(0, 51, 153, 0.4));
}

[dir="rtl"] .footer-links a:hover {
    padding-right: 5px;
    padding-left: 0;
}
