/* --- Global Styles & Variables --- */
:root {
    --primary-1: #0066B3; /* Royal Blue */
    --primary-2: #3399FF; /* Light Blue */
    --accent: #A7904C;    /* Golden Beige */
    --neutral-1: #333333;  /* Dark Gray */
    --text-white: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Set a base font size for easier responsive typography using rem units */
    font-size: 16px; 
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    background-color: var(--text-white);
    color: var(--neutral-1);
    text-align: right; /* Default for Arabic */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 15px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary-1);
    margin-bottom: 40px;
    position: relative;
}

/* --- Utility Classes --- */
.btn {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-1);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--primary-2);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* --- Header --- */
.header {
    background: var(--text-white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 04px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo img {
    height: 115px; /* Adjust height as needed */
    transition: height 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-white);
    padding: 0 20px;
}

.hero-content {
    max-width: 800px; /* Give content a max width */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- About Section --- */
.about {
    padding: 100px 0;
    text-align: center;
}

.about h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    margin: 15px auto 0;
}

.about p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* --- Features Section --- */
.features {
    padding: 100px 0;
    background-color: #f4f8fb; /* Very light blue/gray background */
}

.features-grid {
    display: grid;
    /* Default for Desktops: 3 columns */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background: var(--text-white);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.feature-item i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.feature-item h3 {
    color: var(--primary-1);
    font-size: 1.5rem;
}

/* --- Footer --- */
.footer {
    background-color: var(--neutral-1);
    color: var(--text-white);
    text-align: center;
    padding: 30px 0;
}


/*
=================================================================
--- Responsive Design using Media Queries ---
=================================================================
*/

/* For Tablets and smaller desktops (e.g., iPads in landscape) */
@media (max-width: 992px) {
    .features-grid {
        /* On tablets, switch to a 2-column layout */
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h1 {
        font-size: 3rem; /* Slightly smaller title */
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .about, .features {
        padding: 80px 0; /* Reduce vertical spacing */
    }
}

/* For large mobile phones and tablets in portrait mode */
@media (max-width: 768px) {
    .features-grid {
        /* On mobile, stack features in a single column */
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 2.5rem; /* Make title manageable on smaller screens */
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .about, .features {
        padding: 60px 0; /* Further reduce spacing */
    }
    h2 {
        font-size: 2rem;
    }
    .header .logo img {
        height: 100px; /* Make logo smaller on mobile header */
    }
    .btn {
        padding: 8px 20px; /* Smaller buttons on mobile */
    }
}

/* For small mobile phones */
@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem; /* Final adjustment for smallest screens */
        line-height: 1.3;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .btn-lg {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .container {
        padding: 0 15px; /* Reduce side padding */
    }
    .header {
        padding: 10px 0;
    }
}