/* Main Stylesheet for SAF Kuwait */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #1A365D;
    /* Deep Blue */
    --secondary-color: #2F855A;
    /* Fresh Green */
    --accent-color: #D69E2E;
    /* Gold */
    --text-color: #2D3748;
    --light-text: #718096;
    --bg-color: #F7FAFC;
    --white: #FFFFFF;
    --overlay-color: rgba(0, 0, 0, 0.6);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Typography */
html[lang="ar"] body {
    font-family: 'Cairo', sans-serif;
}

html[lang="en"] body {
    font-family: 'Poppins', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

/* Navigation Links - Desktop Default */
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    font-weight: 600;
    color: var(--primary-color);
}

.nav-item:hover {
    color: var(--secondary-color);
}

.lang-toggle {
    font-weight: bold;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 6px 18px;
    border-radius: 50px;
}

.lang-toggle:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Hero Section */
.hero {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    color: var(--white);
    margin-bottom: 60px;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-color);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Features / Cards Grid */
.grid-section {
    padding: 40px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--secondary-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.card p {
    color: var(--light-text);
    margin-bottom: 20px;
}

.btn-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Content Pages */
.page-title {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 40px;
}

.page-title h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

article.content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-links a {
    display: block;
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

html[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* MOBILE RESPONSIVE STYLES */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        height: 350px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Mobile Header Logic */
    header .container {
        flex-wrap: wrap;
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
        /* Visible on Mobile */
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--primary-color);
        cursor: pointer;
        padding: 5px;
        order: 2;
        /* Right or Left depending on RTL/LTR */
    }

    .logo {
        order: 1;
    }

    .nav-links {
        display: none;
        /* Hidden by Default */
        flex-direction: column;
        width: 100%;
        background-color: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        border-top: 1px solid #f0f0f0;
        order: 3;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
        /* Visible when toggled */
    }

    .nav-item {
        display: block;
        width: 100%;
        padding: 15px 0;
        text-align: center;
        border-bottom: 1px solid #f9f9f9;
    }

    .nav-item:hover {
        background-color: #f9f9f9;
        color: var(--secondary-color);
    }

    .lang-toggle {
        display: inline-block;
        margin-top: 10px;
    }
}

/* DESKTOP OVERRIDES */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
        /* Hide hamburger */
    }

    .nav-links {
        display: flex !important;
        /* Always show links */
        flex-direction: row;
        position: static;
        box-shadow: none;
        background: none;
        width: auto;
        border: none;
        padding: 0;
        height: auto;
    }
}