@font-face {
    font-family: 'hesab';
    src: url(../fonts/W_hesab.ttf);
}

@font-face {
    font-family: 'Pinar';
    src: url('../fonts/Pinar-ExtraBold.woff2') format('woff2'),
        url('../font/Pinar-ExtraBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../fonts/Pinar-Bold.woff2') format('woff2'),
        url('..font/Pinar-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../fonts/Pinar-Light.woff2') format('woff2'),
        url('../fonts/Pinar-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../fonts/Pinar-Medium.woff2') format('woff2'),
        url('../fonts/Pinar-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../fonts/Pinar-Regular.woff2') format('woff2'),
        url('../fonts/Pinar-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../fonts/Pinar-SemiBold.woff2') format('woff2'),
        url('../fonts/Pinar-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}



body {
    background: #0f172a;
    color: white;
    margin: 0;
}


/* ===== HEADER ===== */

.header {
    font-family: 'Pinar';
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 70px;
    border-radius: 20px;
    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    backdrop-filter: blur(15px);
    background: rgba(0, 18, 39, 0.39);
    border: 1px solid rgba(255, 255, 255, 0.2);

    z-index: 1000;
}

.logo {
    font-weight: bold;
    font-size: 18px;
}

/* ===== NAV ===== */

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-size: 15px;
    padding: 5px 0;
    transition: 0.3s;
}

.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
}

/* خط زیر از راست */
.nav a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0%;
    height: 2px;
    background: #00e0ff;
    transition: width 0.9s ease;
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: #00e0ff;
}

.nav a.active {
    color: #00e0ff;
}

.nav a.active::after {
    width: 100%;
}


/* ============================= */
/*         STUDENTS PAGE         */
/* ============================= */

.students {
    font-family: 'Pinar';
    min-height: 100vh;
    padding: 120px 8% 80px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}

/* ===== HERO ===== */

.students-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 70px;
}

.students-hero h1 {
    font-size: 40px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.students-hero h1::after {
    content: "";
    display: block;
    width: 60%;
    height: 4px;
    margin: 12px auto 0;
    border-radius: 10px;
    background: linear-gradient(to left, #38bdf8, #6366f1);
}

.students-hero p {
    text-align: justify;
    line-height: 2;
    opacity: 0.85;
}

/* ===== GRID ===== */

.students-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* ===== CARD ===== */

.student-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    cursor: pointer;
}

.student-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: 0.5s ease;
}


/* زوم ملایم */
.student-card:hover img {
    transform: scale(1.08);
}

/* ===== OVERLAY ===== */

.student-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 20px;

    transform: translateY(100%);
    transition: 0.4s ease;
}

.student-card:hover .student-overlay {
    transform: translateY(0);
}

.student-overlay h3 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 700;
}

.student-overlay p {
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.8;
    opacity: 0.9;
}

.student-skills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.student-skills span {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
    background: linear-gradient(to left, #38bdf8, #6366f1);
}




/* ===== FOOTER ===== */

.footer {
    font-family: 'Pinar';
    font-size: 15px;
    font-weight: small;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 18, 39, 0.39);
    backdrop-filter: blur(20px);
    z-index: 10;
}

.loader-wrapper {
    position: fixed;
    inset: 0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;

    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader-wrapper.hide {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* لوگو وسط */
.loader img {
    border-radius: 5px;
    width: 60px;
    z-index: 2;
}

/* حلقه دور */
.spinner {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #38bdf8;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

a {
    text-decoration: none;
    color: white;
}

.mobile-menu {
    display: none;
}

.logo-mobile {
    display: none;
}

.footer-mobile {
    display: none;
}





@media (max-width: 1000px) {

    /* تیتر بره سمت راست کامل */


    .header {
        padding: 0 20px;

    }

    .logo {
        display: none;
    }

    .logo-mobile {
        display: flex;
        font-weight: bold;
        font-size: 20px;
        order: 1;
    }

    .footer {
        display: none;
    }

    .footer-mobile {
        font-family: 'Pinar';
        font-size: 15px;
        font-weight: small;
        position: fixed;
        bottom: 0;
        width: 100%;
        height: 60px;

        display: flex;
        align-items: center;
        justify-content: center;

        background: rgba(255, 255, 255, 0.048);
        backdrop-filter: blur(20px);
        z-index: 10;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .nav {
        display: none;
    }

    .mobile-menu {
        font-family: 'Pinar';
        position: fixed;
        top: 0;
        left: 0;
        width: 100dvw;
        height: 100dvh;
        overflow-y: auto;
        /* این مهمه */

        background: #0b1a35;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        transform: translateX(100%);
        transition: 0.4s ease;
        z-index: 99999;
    }

    .mobile-menu.active {
        transform: translateX(0);
        color: #00e0ff;
    }

    /* آیتم‌ها */
    .menu-items {
        width: 80%;
        max-width: 400px;
    }

    .menu-items a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        /* 👈 فاصله آیکن و متن */

        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        padding: 15px;
        margin: 15px 0;

        text-decoration: none;
        color: white;
        font-size: 18px;

        transition: 0.3s;
    }



    /* دکمه بستن */
    .close-menu {
        gap: 8px;
        font-family: 'Pinar';
        margin-top: 40px;
        padding: 12px 30px;
        background: #38bdf8;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
    }

    .students-grid {
        grid-template-columns: 1fr;
    }

    .student-card img {
        height: 320px;
    }

    /* هاور حذف */
    .student-card:hover img {
        transform: none;
    }

    /* overlay همیشه نمایش داده شود */
    .student-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    }
}