/* --- General Reset & Variables --- */
:root {
    --header-height: 70px;
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-color: #343a40;
    --light-text-color: #6c757d;
    --font-family: 'Vazirmatn', sans-serif;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    direction: rtl;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.button-primary {
    background-color: var(--primary-color);
    color: white;
}

.button-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

.button-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.button-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Header & Navigation --- */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-list {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--light-text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-close,
.nav-toggle {
    display: none;
    /* Hidden by default */
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
}

.nav-item-button {
    display: none;
    /* Hide button inside menu on desktop */
}


/* --- Hero Section --- */
.hero {
    min-height: 80vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(235, 245, 255, 0.5) 0%, var(--background-color) 100%);
}

.hero-content {
    max-width: 700px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--light-text-color);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* --- Features Section --- */
.features {
    padding: 80px 0;
    background-color: var(--surface-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--background-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.feature-text {
    color: var(--light-text-color);
}

/* --- About Section --- */
.about {
    padding: 80px 0;
    text-align: center;
}

.about-content {
    max-width: 700px;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--light-text-color);
}

/* --- Footer --- */
.footer {
    background-color: var(--text-color);
    color: #aab0b6;
    padding: 25px 0;
    text-align: center;
}


/* ==================== RESPONSIVE DESIGN FOR MOBILE ==================== */
@media screen and (max-width: 768px) {
    .nav-login-button {
        display: none;
        /* Hide main login button on mobile */
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hide menu off-screen */
        width: 100%;
        height: 100%;

        /* FIX: This line gives the menu a solid, non-transparent background */
        background-color: var(--background-color);

        padding: 6rem 2rem 2rem;
        transition: right 0.4s ease-in-out;

        /* Optional: Adds a subtle shadow to feel like a new layer */
        box-shadow: -5px 0px 15px rgba(0, 0, 0, 0.1);

        z-index: 110;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        background-color: var(--background-color);
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .nav-item-button {
        display: block;
        /* Show login button inside mobile menu */
    }

    .nav-close {
        display: block;
        position: absolute;
        top: 1rem;
        left: 1.5rem;
        /* For LTR, but works for close button */
        font-size: 2rem;
    }

    .nav-toggle {
        display: block;
        /* Show hamburger icon */
    }

    /* Class to show the menu */
    .show-menu {
        right: 0;
    }

    /* Adjust hero section for smaller screens */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }
}