  @font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.woff2') format('woff2');
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Vazir";
    margin: 0;
    padding: 0;
    background: rgb(255, 255, 229);
    direction: rtl;
    color: #333;
}

/* ===== هدر ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header .logo img {
    height: 50px;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.5s ease;
    animation: logoGlow 2.5s infinite alternate;
}

.header .logo img:hover {
    transform: scale(1.05);
}

@keyframes logoGlow {
    0% { box-shadow: 0 0 5px rgba(56,189,248,0.3), 0 0 10px rgba(34,197,94,0.2); }
    50% { box-shadow: 0 0 15px rgba(56,189,248,0.5), 0 0 25px rgba(34,197,94,0.3); }
    100% { box-shadow: 0 0 5px rgba(56,189,248,0.3), 0 0 10px rgba(34,197,94,0.2); }
}

.logo h2 {
  font-size: 20px;
  margin: 0;
  color: #222;
  font-weight: 700;
}

.header .nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header .nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: 0.3s;
}


.header .nav a:hover { color: #38bdf8; }

.header .nav .btn-login {
    background: #38bdf8;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    transition: 0.3s;
}

.header .nav .btn-login:hover { background: #22c55e; color: #fff; }

/* ===== Filter ===== */

.grade-filter{
    width:fit-content;
    margin:12px auto 18px;

    display:flex;
    align-items:center;
    gap:10px;

    padding:8px 12px;

    background:#ffffff;
    border:1px solid #ffd54a;

    border-radius:12px;

    box-shadow:
        0 4px 12px rgba(0,0,0,.05);

    animation:fadeDown .3s ease;
}

.grade-filter label{
    font-size:16px;
    font-weight:600;
    color:#444;
}

/* ===== Select ===== */

.custom-select{
    position:relative;
    min-width:130px;
    cursor:pointer;
}

.selected{

    background:#fffdf8;
    border:1px solid #ffd54a;

    color:#444;

    padding:8px 10px;
    border-radius:10px;

    font-size:14px;
    font-weight:600;

    display:flex;
    align-items:center;
    justify-content:space-between;

    transition:.25s;
}

.selected:hover{
    border-color:#ffd54a;
}

.selected::after{
    content:"⌄";
    color:#ffd54a;
    font-size:14px;
}

/* ===== Dropdown ===== */

.options{

    position:absolute;
    top:110%;
    right:0;
    left:0;

    background:#fff;

    border-radius:10px;

    overflow:hidden;

    border:1px solid #ffd54a;

    box-shadow:
        0 10px 25px rgba(0,0,0,.08);

    opacity:0;
    pointer-events:none;

    transform:translateY(-8px);

    transition:.25s;

    z-index:999;
}

.custom-select.active .options{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
}

.options div{
    padding:10px;
    font-size:14px;
    transition:.2s;
}

.options div:hover{
    background:#ffd54a;
    color:#8a6112;
}

/* ===== Page ===== */

.page{
    max-width:1000px;
    margin:auto;
    padding:0 12px;
}

/* ===== Section ===== */

.page section{
    margin-bottom:20px;
}

.page h2{

    font-size:16px;
    font-weight:700;

    margin-bottom:10px;

    color:#3d3d3d;

    position:relative;
    padding-right:10px;
}

.page h2::before{

    content:"";

    position:absolute;

    right:0;
    top:3px;

    width:4px;
    height:15px;

    border-radius:10px;

    background:#ffd54a;
}

/* ===== Grid ===== */

.grid{
    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(180px,1fr));

    gap:16px;
}

/* ===== Card ===== */

.card{

    background:#fff;

    border-radius:14px;

    overflow:hidden;

    border:1px solid #ffd54a;

    box-shadow:
        0 4px 14px rgba(0,0,0,.05);

    transition:.25s;

    animation:fadeUp .35s ease;
}

.card:hover{

    transform:translateY(-4px);

    box-shadow:
        0 10px 20px rgba(0,0,0,.08);
}

/* ===== Image ===== */

.card img{
    width:100%;
    height:105px;
    object-fit:cover;
}

/* ===== Content ===== */

.card h3{
    font-size:14px;
    margin:8px 10px 4px;
    line-height:1.6;
}

.card p{
    font-size:12px;
    color:#777;
    margin:0 10px 8px;
}

/* ===== Button ===== */

.card button{

    font-family: "Vazir";

    width:calc(100% - 20px);

    margin:0 10px 10px;

    border:none;

    border-radius:8px;

    padding:8px;

    font-size:16px;
    font-weight:800;

    cursor:pointer;

    color: #fff;

    background: #05bd58;

    transition:.25s;
}

.card button:hover{
    transform:scale(1.02);
}

/* ===== Free Section ===== */

#freeEducation .card{
    background:#fffef9;
    margin: 10px;
}

#freeEducation .card button{
    background: #ffd54a;
    color:#000000;
    font-family: "Vazir";
}

/* ===== Animations ===== */

@keyframes fadeUp{

    from{
        opacity:0;
        transform:translateY(10px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes fadeDown{

    from{
        opacity:0;
        transform:translateY(-10px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

    /* ===== Pre-Footer ===== */
:root {
    --color-blue: #38bdf8;
    --color-green: #22c55e;
    --color-yellow: #facc15;
    --color-bg: #0f172a;
    --color-text: #e5e7eb;
}

.pre-footer {
    background: var(--color-bg);
    color: var(--color-text);
    padding: 60px 20px;
    font-family: "Vazir", sans-serif;
    direction: rtl;
}

.pre-footer-container {
    max-width: 1300px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

/* ستون‌ها */
.pf-col h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--color-blue);
}

.pf-col ul {
    list-style: none;
    padding: 0;
}

.pf-col ul li {
    margin-bottom: 10px;
}

.pf-col ul li a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    position: relative;
}

.pf-col ul li a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--color-blue);
    transition: width .3s ease;
}

.pf-col ul li a:hover::after {
    width: 100%;
}

/* برند و لوگو */
.footer-logo {
    width: 140px;
    margin-bottom: 15px;
}

.brand-text {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
}/* آیکن‌های شبکه اجتماعی */
.social-icons a img {
    width: 24px;
    margin-left: 10px;
    transition: transform .3s ease, filter .3s ease;
}

.social-icons a img:hover {
    transform: rotate(-8deg) scale(1.15);
    filter: brightness(1.2);
}

/* ستون 4: پیام انگیزشی */
.motivation {
    background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(250,204,21,0.1));
    padding: 18px;
    border-radius: 14px;
    animation: glow 3s infinite alternate;
}

.motivation p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--color-green);
}

/* ستون 5: مجوزها */
.license-box img {
    width: 90px;
    margin: 10px 5px;
    background: #fff;
    padding: 5px;
    border-radius: 8px;
    transition: transform .3s ease, box-shadow .3s ease;
}

.license-box img:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* انیمیشن ورود ستون‌ها */
.pf-col {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.pf-col:nth-child(1) { animation-delay: .1s; }
.pf-col:nth-child(2) { animation-delay: .2s; }
.pf-col:nth-child(3) { animation-delay: .3s; }
.pf-col:nth-child(4) { animation-delay: .4s; }
.pf-col:nth-child(5) { animation-delay: .5s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pf-col:hover {
    transform: translateY(-6px) scale(1.02);
    transition: all 0.35s ease;
}

/* ===== فوتر ===== */
footer {
    text-align: center;
    padding: 15px;
    background: #e02121ff;
    color: #fff;
    font-size: 14px;
    bottom: 0;
    width: 100%;
}

@media (min-width:769px) and (max-width:1024px){

/* ================= HEADER ================= */
.header{
    padding:18px 25px;
    justify-content:space-between;
}

.nav a{
    font-size:14px;
    padding:8px 14px;
}

  .grade-filter{
        width:100%;
        justify-content:space-between;
    }

    .grid{
        grid-template-columns:
            repeat(2,1fr);
    }


/* ================= FOOTER ================= */
.pre-footer-container{
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    text-align:center;
}

.social-icons{
    justify-content:flex-start;
}

footer{
    font-size:14px;
    text-align:center;
}

}

@media (min-width:487px) and (max-width:768px){

/* ================= HEADER ================= */
.header{
    padding:15px;
}


.nav{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
}

.nav a{
    font-size:13px;
    padding:8px 12px;
}

  .grade-filter{
        width:100%;
        justify-content:space-between;
    }

    .grid{
        grid-template-columns:
            repeat(2,1fr);
    }


/* ================= FOOTER ================= */
.pre-footer-container{
    grid-template-columns:1fr 1fr;
    gap:15px;
    text-align:center;
}

.social-icons{
    justify-content:center;
}

footer{
    font-size:14px;
    text-align:center;
}

   /* حذف هایلایت پیشفرض موبایل */
        * {
            -webkit-tap-highlight-color: transparent;
        }
    
        /* فوکوس حرفه‌ای */
        a,
        button,
        input,
        select,
        textarea {
            transition: all 0.2s ease;
            border-radius: 12px;
        }
    
        /* افکت لمس موبایل */
        a:active,
        button:active {
            transform: scale(0.95);
        }

}

/* ===== ریسپانسیو ===== */
@media(max-width:486px){
    .header { padding:10px 20px; }

            .header .logo img {
                height: 40px;
                /* کوچک‌تر برای موبایل */
                border-radius: 50%;
                transition: transform 0.3s ease, box-shadow 0.5s ease;
                animation: logoGlow 2.5s infinite alternate;
            }
    
            .header .logo img:hover {
                transform: scale(1.05);
            }

  .logo h2 {
display:none;
}
    
    
            .header .nav {
                padding: 10px 15px;
            }
    
            .header .nav a {
                font-size: auto;
                /* کوچک‌تر برای موبایل */
            }
    
    
            .header .nav .btn-login {
                background: #38bdf8;
                color: #fff;
                padding: 6px 10px;
                /* کوچک‌تر برای موبایل */
                border-radius: 8px;
                font-size: auto;
                transition: 0.3s;
            }
  

.grid{
        grid-template-columns:1fr;
    }
  .card img{
        height:120px;
    }

  .pre-footer-container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      /* دو ستون برای وسط */
      gap: 20px;
      padding: 0 15px;
      justify-items: center;
      text-align: center;
  }

  /* ستون 1: یک ستون کامل */
  .pf-col:nth-child(1) {
      grid-column: span 2;
  }

  /* ستون 2 و 3: کنار هم، دو ستون */
  .pf-col:nth-child(2),
  .pf-col:nth-child(3) {
      grid-column: auto;
  }

  /* ستون 4: یک ستون کامل */
  .pf-col:nth-child(4) {
      grid-column: span 2;
  }

  /* ستون 5: یک ستون کامل */
  .pf-col:nth-child(5) {
      grid-column: span 2;
  }
    .social-icons { justify-content: center; }
    .license-box img { margin: 10px auto; }
    footer { font-size:13px; padding:10px; }

        /* حذف هایلایت پیشفرض موبایل */
        * {
            -webkit-tap-highlight-color: transparent;
        }
    
        /* فوکوس حرفه‌ای */
        a,
        button,
        input,
        select,
        textarea {
            transition: all 0.2s ease;
            border-radius: 12px;
        }
    
        /* افکت لمس موبایل */
        a:active,
        button:active {
            transform: scale(0.95);
        }
        
}

@media(max-width:360px) {

 .header { padding:8px 15px; }

            .header .logo img {
                height: 40px;
                /* کوچک‌تر برای موبایل */
                border-radius: 50%;
                transition: transform 0.3s ease, box-shadow 0.5s ease;
                animation: logoGlow 2.5s infinite alternate;
            }
    
            .header .logo img:hover {
                transform: scale(1.05);
            }
    
    
            .header .nav {
                padding: 8px 12px;
            }
    
            .header .nav a {
                font-size: auto;
                /* کوچک‌تر برای موبایل */
            }
    
    
            .header .nav .btn-login {
                background: #38bdf8;
                color: #fff;
                padding: 4px 8px;
                /* کوچک‌تر برای موبایل */
                border-radius: 8px;
                font-size: auto;
                transition: 0.3s;
            }

/* ================= TITLE ================= */
.section-main-title{
    font-size:20px;
    margin:15px 0;
}

/* ================= SLIDER ================= */
.home-slider{
    padding:0 5px;
}

.slider-container{
    width:100%;
}

.slider-dots .dot{
    width:6px;
    height:6px;
}

/* ================= WHY US ================= */
.why-us-container{
    flex-direction:column;
}

.why-tabs{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:5px;
}

.why-tab{
    font-size:11px;
    padding:5px 8px;
}

.why-content{
    flex-direction:column;
    text-align:center;
}

.why-image img{
    width:90px;
}

/* ================= GAMES ================= */
.games-grid{
    grid-template-columns:1fr;
    gap:10px;
}

.game-card h3{
    font-size:14px;
}

/* ================= TESTS ================= */
.tests-grid{
    grid-template-columns:1fr;
    gap:10px;
}

/* ================= STATS ================= */
.stats-grid{
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.stat-number{
    font-size:20px;
}

/* ================= TESTIMONIALS ================= */
.testimonials-grid{
    grid-template-columns:1fr;
    gap:10px;
}

/* ================= ARTICLES ================= */
.articles-grid{
    grid-template-columns:1fr;
    gap:10px;
}

.article-content h3{
    font-size:14px;
}

/* ================= CTA ================= */
.cta-box{
    flex-direction:column;
    text-align:center;
    padding:15px;
}

.cta-content h2{
    font-size:18px;
}

.cta-buttons{
    flex-direction:column;
    gap:8px;
}

.cta-btn{
    font-size:12px;
}

/* ================= FOOTER ================= */
.pre-footer-container{
    grid-template-columns:1fr;
    text-align:center;
}

.social-icons{
    justify-content:center;
    gap:8px;
}

footer{
    font-size:12px;
    text-align:center;
    padding:10px;
}

}