﻿
/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif,'IRANSansWeb';
    background: #fff;
    color: #222;
    line-height: 1.6;
}


a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid #ddd;
    height: 50px;
    display: flex;
    /*justify-content: space-between;*/
    align-items: center;
    justify-content: center; /* ← این رو اضافه کن برای وسط چین کردن محتوا */
    padding: 0 2rem;
    z-index: 1000;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    order: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    order: 0;
    margin-left: auto; /* ← این خط را اضافه کن */
}
/* ساختار کلی */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 34rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* دکمه‌های آیکونی */
.btn-icon {
    font-size: 1.1rem;
    color: #00a6ff;
    padding: 4px;
    transition: color 0.3s;
}

    .btn-icon:hover {
        color: #007acc;
    }

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* فرم جستجو */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.search-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .search-form input[type="search"] {
        padding: 5px 10px;
        border: 1.5px solid #ccc;
        border-radius: 20px;
        outline: none;
        font-size: 0.9rem;
        width: 150px;
        transition: border-color 0.3s ease;
    }

        .search-form input[type="search"]:focus {
            border-color: #00a6ff;
        }

    .search-form button {
        background: transparent;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        color: #00a6ff;
        padding: 0 6px;
    }

        .search-form button:hover {
            color: #007acc;
        }

/* دکمه های ثبت نام و ورود مشابه ramzit.ir */
.btn-auth {
    font-weight: 600;
    border-radius: 22px;
    padding: 6px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid #00a6ff;
    background: transparent;
    color: #00a6ff;
    font-family: Vazirmatn, sans-serif;
}

    .btn-auth:hover {
        background-color: #00a6ff;
        color: white;
    }

.btn-login {
    background-color: #00a6ff;
    color: white;
    border-color: #00a6ff;
}

    .btn-login:hover {
        background-color: #007acc;
        border-color: #007acc;
    }



.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: #00a6ff;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: relative;
}

    nav a {
        color: #444;
        transition: color 0.3s;
        padding: 6px 0;
        display: inline-block;
    }

        nav a:hover {
            color: #00a6ff;
            border-bottom: 2px solid #00a6ff;
        }



/* برای ظرف dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

/* استایل دکمه آبشاری */
.dropbtn {
    cursor: pointer;
    color: #444;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    /*font-weight: 600;*/
}

    /* آیکون فلش کوچک */
    .dropbtn i {
        font-size: 0.7rem;
    }

/* محتوای زیرمنو، ابتدا مخفی */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 6px;
    right: 0; /* چون راست‌چین */
    top: 100%;
    z-index: 1000;
    flex-direction: column;
}

    /* هر لینک زیرمنو */
    .dropdown-content a {
        color: #444;
        padding: 8px 16px;
        text-decoration: none;
        display: block;
        border-bottom: 1px solid #eee;
        transition: background-color 0.3s ease;
        width: max-content
    }

        .dropdown-content a:last-child {
            border-bottom: none;
        }

        /* هاور روی زیرمنو */
        .dropdown-content a:hover {
            background-color: #f0f8ff;
        }

/* نمایش زیرمنو وقتی هاور روی دکمه */
.dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
}

/* وقتی موس روی خود آیتم دکمه است هم نمایش بده */
.dropdown:hover .dropbtn {
    color: #00a6ff;
    border-bottom: 2px solid #00a6ff;
}

/* Hero Section */
.hero {
    padding: 120px 2rem 60px;
    background: #f5faff;
    text-align: center;
 
}

    .hero h1 {
        font-size: 2.8rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color:#fff /*#00a6ff*/;
    }

    .hero p {
        font-size: 1.2rem;
        color:#fff /*#555*/;
        margin-bottom: 2.5rem;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero a.btn {
        display: inline-block;
        background-color: #00a6ff;
        color: white;
        font-weight: 600;
        padding: 12px 30px;
        border-radius: 6px;
        box-shadow: 0 4px 8px rgb(0 166 255 / 0.3);
        transition: background-color 0.3s ease;
        font-size: 1.1rem;
    }

        .hero a.btn:hover {
            background-color: #007acc;
            box-shadow: 0 6px 12px rgb(0 122 204 / 0.5);
        }

/* Courses Section */
.courses {
    padding: 3rem 2rem;
    max-width: auto/*1100px*/;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.course-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

    .course-card:hover {
        box-shadow: 0 8px 20px rgb(0 0 0 / 0.15);
    }

.course-icon {
    font-size: 3.5rem;
    color: #00a6ff;
    margin-bottom: 1rem;
}

.course-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    color: #222;
}

.course-desc {
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1;
}

/* Blog Section */
.blog {
    background: #f6f9fa /*#f5faff*/;
    padding: 3rem 2rem;
    max-width:auto /*1100px*/;
    margin: 0 auto 3rem;
}

    .blog h2 {
        text-align: center;
        color: #00a6ff;
        margin-bottom: 2rem;
        font-weight: 700;
        font-size: 1.8rem;
    }

.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

.post {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.3rem;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
    transition: box-shadow 0.3s ease;
    
}

    .post:hover {
        box-shadow: 0 8px 20px rgb(0 0 0 / 0.15);
    }

.post-img-icon {
    font-size: 3.5rem;
    color: #00a6ff;
    margin-bottom: 1rem;
}
.post-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    color: #222;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.8rem;
}

.post a.read-more {
    font-weight: 600;
    color: #00a6ff;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

    .post a.read-more:hover {
        color: #007acc;
    }

/* Footer */
footer {
    background: #eee;
    text-align: center;
    padding: 1.5rem 2rem;
    color:#fff /*#666*/;
    font-size: 0.9rem;
}

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #00a6ff;
}
/* Responsive */

@media(min-width: 1000px) {

    .hero {
        min-height: 635px;
        max-height: 635px;
    }}

@media (max-width: 1000px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: inherit;
    }

    .header-left {
        justify-content: space-between;
        width: 100%;
    }

    .header-right {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        margin-top: 0.5rem;
    }
    /*
            .header-left,
            .header-right {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
                width: 100%;
            }*/

    .menu-toggle {
        display: block;
    }



    nav {
        /*flex-direction: column;
                width: 100%;
                gap: 0.5rem;*/

        display: none;
        flex-direction: column;
        width: 100%;
    }

        nav a {
            padding: 8px 0;
            border-bottom: 1px solid #eee;
            width: 100%;
        }

        nav.active {
            display: flex;
        }



    .search-form {
        flex: 1;
    }

        .search-form input[type="search"] {
            width: 100%;
        }


    .dropdown-content {
        position: relative;
        box-shadow: none;
        border-radius: 0;
        background-color: transparent;
        display: none;
        padding-right: 1rem;
    }

    .dropdown.active .dropdown-content {
        display: flex;
    }

    .dropdown .dropbtn {
        justify-content: space-between;
    }

    .auth-buttons {
        flex-shrink: 0;
    }

    .btn-auth {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero a.btn {
        width: 100%;
        padding: 10px 0;
    }

    .courses,
    .blog-posts {
        grid-template-columns: 1fr;
    }
}

