﻿/*==================================================
                HOME PAGE
==================================================*/

/*************** Variables ***************/

:root {
    --primary: #f7b500;
    --primary-dark: #d79b00;
    --secondary: #222;
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #555;
    --title: #222;
    --radius: 18px;
    --shadow: 0 10px 35px rgba(0,0,0,.08);
    --transition: .35s;
}

.article-card {
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #eeeeee;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    direction: rtl;
}

    .article-card:hover {
        transform: translateY(-7px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.11);
    }


/* =========================
   Image
========================= */

.article-image {
    width: 100%;
    height: 210px;
    overflow: hidden;
    position: relative;
}

    .article-image img {
        padding:0px;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.5s ease;
    }

.article-card:hover .article-image img {
    transform: scale(1.06);
}


/* =========================
   Content
========================= */

.article-content {
    padding: 20px;
}

.article-title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.8;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 65px;
}

.course-image {
    position: relative;
    height: 190px;
    overflow: hidden;
}

    .course-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: .45s;
    }

.course-card:hover .course-image img {
    transform: scale(1.08);
}

/* =========================
   Link
========================= */

.article-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 15px;
    border-radius: 11px;
    background: #f5f7ff;
    color: #4f46e5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

    .article-link i {
        font-size: 13px;
        transition: transform 0.3s ease;
    }

    .article-link:hover {
        background: #4f46e5;
        color: #ffffff;
    }

        .article-link:hover i {
            transform: translateX(-5px);
        }


/* =========================
   Responsive
========================= */

@media (max-width: 768px) {

    .article-image {
        height: 190px;
    }

    .article-content {
        padding: 17px;
    }

    .article-title {
        font-size: 16px;
    }
}

/*************** General ***************/

section {
    padding: 90px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

    .section-title small {
        color: var(--primary);
        font-size: 14px;
        letter-spacing: 3px;
        font-weight: bold;
    }

    .section-title h2 {
        font-size: 42px;
        font-weight: 800;
        color: var(--title);
        margin-top: 10px;
    }

    .section-title p {
        color: #888;
        margin-top: 15px;
    }

.btn-yellow {
    text-decoration: none;
    background: var(--primary);
    color: #111;
    padding: 15px 34px;
    border-radius: 14px;
    font-weight: 700;
    display: inline-block;
    transition: var(--transition);
}

    .btn-yellow:hover {
        text-decoration: none;
        background: var(--primary-dark);
        transform: translateY(-4px);
        color: #111;
    }

.btn-outline-yellow {
    text-decoration: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 15px 34px;
    border-radius: 14px;
    display: inline-block;
    transition: var(--transition);
}

    .btn-outline-yellow:hover {
        text-decoration: none;
        background: var(--primary);
        color: #111;
    }

.btn-all {
    display: inline-block;
    margin-top: 25px;
    background: #222;
    color: white;
    padding: 14px 30px;
    border-radius: 12px;
    transition: .3s;
}

    .btn-all:hover {
        background: var(--primary);
        color: #111;
    }

.hero {
    background: linear-gradient( rgba(20,20,20,.88), rgba(20,20,20,.88) ), url("../images/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    min-height: 720px;
    display: flex;
    align-items: center;
    color: white;
}

.hero-sub {
    color: var(--primary);
    font-weight: bold;
    letter-spacing: 3px;
}

.hero h1 {
    font-size: 60px;
    font-weight: 900;
    line-height: 82px;
    margin: 25px 0;
}

.hero p {
    color: #cfcfcf;
    font-size: 18px;
    line-height: 36px;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 18px;
    margin-top: 40px;
}

.hero-image {
    width: 100%;
    max-width: 620px;
    animation: heroFloat 5s ease-in-out infinite;
}

@keyframes heroFloat {

    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }

    100% {
        transform: translateY(0);
    }
}

.search-section {
    margin-top: -60px;
    position: relative;
    z-index: 5;
}

.search-box {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
}

    .search-box input {
        flex: 1;
        border: none;
        padding: 22px;
        outline: none;
        font-size: 16px;
    }

    .search-box button {
        width: 80px;
        border: none;
        background: var(--primary);
        color: #111;
        font-size: 22px;
    }

.category-section {
    padding-top: 70px;
}

.category-card {
    background: white;
    border-radius: 18px;
    padding: 40px 25px;
    text-align: center;
    transition: .35s;
    box-shadow: var(--shadow);
    height: 100%;
}

    .category-card:hover {
        transform: translateY(-10px);
    }

    .category-card i {
        font-size: 52px;
        color: var(--primary);
    }

    .category-card h4 {
        margin: 20px 0;
        font-size: 22px;
        font-weight: 700;
    }

    .category-card p {
        color: #888;
    }

/*==================================================
                COURSES
==================================================*/

.course-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transition: .35s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .course-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,.15);
    }

.course-image {
    position: relative;
    overflow: hidden;
    height: 230px;
}

    .course-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: .5s;
    }

.course-card:hover img {
    transform: scale(1.08);
}

.course-body {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

    .course-body h4 {
        font-size: 19px;
        font-weight: 600;
        line-height: 34px;
        color: #222;
        min-height: 70px;
    }

.course-info {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 14px;
    margin-bottom: 5px;
}

    .course-info span {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .course-info i {
        color: var(--primary);
    }

.course-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

    .course-footer strong {
        color: #222;
        font-size: 19px;
        font-weight: 700;
    }

    .course-footer .free {
        color: #2ecc71;
    }

    .course-footer a {
        background: var(--primary);
        color: #111;
        padding: 10px 18px;
        border-radius: 10px;
        font-weight: 700;
        transition: .3s;
    }

        .course-footer a:hover {
            background: #111;
            color: white;
        }

    .article-content a {
        background: var(--primary);
        color: #111;
        padding: 10px 18px;
        border-radius: 10px;
        font-weight: 700;
        transition: .3s;
    }

        .article-content a:hover {
            background: #111;
            color: white;
        }

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: #111;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: bold;
}

/*==================================================
            CTA BANNER
==================================================*/

.middle-banner {
    background: linear-gradient(135deg,#1f1f1f,#303030);
    color: white;
    border-radius: 25px;
    margin: 90px auto;
    overflow: hidden;
}

    .middle-banner .container {
        padding: 60px;
    }

    .middle-banner h2 {
        font-size: 42px;
        font-weight: 800;
    }

    .middle-banner p {
        color: #ccc;
        margin-top: 15px;
        font-size: 18px;
    }

    .middle-banner .btn-yellow {
        font-size: 18px;
        padding: 18px 35px;
    }

.course-card {
    animation: fadeUp .7s ease;
}

@keyframes fadeUp {

    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media(max-width:992px) {

    .course-image {
        height: 200px;
    }

    .course-body h4 {
        font-size: 18px;
        min-height: auto;
    }

    .middle-banner {
        text-align: center;
    }

        .middle-banner .container {
            padding: 45px 25px;
        }

        .middle-banner h2 {
            font-size: 32px;
        }
}

@media(max-width:576px) {

    .course-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .course-image {
        height: 180px;
    }

    .middle-banner h2 {
        font-size: 26px;
    }

    .middle-banner p {
        font-size: 15px;
    }
}

/*==================================================
                ARTICLES
==================================================*/




.article-card {
    padding:0;
    width: 340px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(15,23,42,.08);
    transition: .35s;
    border: 1px solid #edf2f7;
}

    .article-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 45px rgba(15,23,42,.15);
    }

.article-picture {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.article-content {
    padding: 15px;
}

.article-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 18px;
    min-height: 50px;
    /* حداکثر دو خط */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 13px;
}

    .article-meta span {
        display: flex;
        align-items: center;
        gap: 8px;
    }

.article-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #edf2f7;
    padding-top: 2px;
}

    .article-price small {
        background: #e0f2fe;
        color: #0284c7;
        padding: 8px 14px;
        border-radius: 10px;
        font-weight: 700;
    }

    .article-price form {
        margin: 0;
    }



    .article-content h4 {
        height: 65px;
        font-size: 22px;
        font-weight: 700;
        line-height: 34px;
        margin-bottom: 20px;
        color: #222;
    }

    .article-content a {
        color: #111;
        font-weight: bold;
        transition: .3s;
    }

/*==================================================
                FILES
==================================================*/


.file-box {
    display: flex;
    align-items: center;
    gap: 25px;
    background: white;
    border-radius: 22px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: .35s;
    height: 100%;
}

    .file-box:hover {
        transform: translateY(-8px);
    }

    .file-box img {
        width: 150px;
        border-radius: 15px;
    }

    .file-box h3 {
        color: #222;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .file-box p {
        color: #888;
        margin: 0;
    }

/*==================================================
                FILES
==================================================*/


.file-box {
    display: flex;
    align-items: center;
    gap: 25px;
    background: white;
    border-radius: 22px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: .35s;
    height: 100%;
}

    .file-box:hover {
        transform: translateY(-8px);
    }

    .file-box img {
        width: 150px;
        border-radius: 15px;
    }

    .file-box h3 {
        color: #222;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .file-box p {
        color: #888;
        margin: 0;
    }

/*==================================================
                CTA
==================================================*/

.cta {
    background: linear-gradient(135deg,#181818,#2a2a2a);
    color: white;
}

    .cta h2 {
        font-size: 48px;
        font-weight: 800;
    }

    .cta p {
        margin-top: 15px;
        color: #d7d7d7;
        font-size: 18px;
    }

/*==================================================
                ABOUT
==================================================*/


    .about-home img {
        border-radius: 25px;
        box-shadow: 0 15px 35px rgba(0,0,0,.15);
    }

    .about-home h2 {
        font-size: 42px;
        font-weight: 800;
        color: #222;
        margin-bottom: 25px;
    }

    .about-home p {
        line-height: 36px;
        color: #666;
        margin-bottom: 30px;
    }

    .about-home ul {
        padding: 0;
        margin-bottom: 35px;
    }

    .about-home li {
        list-style: none;
        margin-bottom: 18px;
        font-size: 18px;
    }

        .about-home li i {
            color: var(--primary);
            margin-left: 10px;
        }

/*==================================================
                ANIMATION
==================================================*/

.course-card {
    width: 292px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0,0,0,.07);
    transition: .35s;
    cursor: pointer;
    padding:0;
}

    .course-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 55px rgba(0,0,0,.12);
    }

.file-box {
    padding: 0;
    margin: 10px;
    width: 400px;
    opacity: 0;
    animation: fadeUp .7s ease forwards;
}


.category-card {
    margin: 10px;
    width: 320px;
    height: 300px;
    opacity: 0;
    animation: fadeUp .7s ease forwards;
    padding: 63px;
}

    .article-card:nth-child(2) {
        animation-delay: .1s;
    }

    .article-card:nth-child(3) {
        animation-delay: .2s;
    }

/*==================================================
                RESPONSIVE
==================================================*/

@media(max-width:992px) {

    .hero {
        text-align: center;
        min-height: auto;
        padding: 100px 0;
    }

        .hero h1 {
            font-size: 42px;
            line-height: 60px;
        }

        .hero p {
            margin: auto;
        }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        margin-top: 50px;
        max-width: 420px;
    }

    .section-title h2 {
        font-size: 34px;
    }

    .file-box {
        flex-direction: column;
        text-align: center;
    }

    .about-home {
        text-align: center;
    }

        .about-home img {
            margin-bottom: 40px;
        }
}

@media(max-width:576px) {

    section {
        padding: 65px 0;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 46px;
    }

    .hero p {
        font-size: 15px;
        line-height: 30px;
    }

    .hero-buttons {
        flex-direction: column;
    }

        .hero-buttons a {
            width: 100%;
            text-align: center;
        }

    .search-box {
        flex-direction: column;
    }

        .search-box button {
            width: 100%;
            height: 60px;
        }

    .section-title h2 {
        font-size: 28px;
    }

    .article-card img {
        height: 200px;
    }

    .file-box img {
        width: 120px;
    }

    .cta h2 {
        font-size: 30px;
    }

    .about-home h2 {
        font-size: 30px;
    }
}

.disabled-section {
    position: relative;
    pointer-events: none;
    filter: grayscale(100%);
}

    .disabled-section::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(120, 120, 120, 0.65);
        z-index: 2;
    }

.coming-soon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 15px 40px;
    border-radius: 15px;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

.course-sec {
    margin: 38px;
    display: flex;
    justify-content: space-evenly;
}
