:root{
    --button_hover: #ffdce5;
    --input_backgrand: linear-gradient(to right,#ffe4e2,#ffeff3);
    --body_backgrand: linear-gradient(to bottom,#d9fff2,#eafff7);
    --box_shadows: rgba(0, 0, 0, 0.2);
    --text_shadows: rgba(0, 0, 0, 0.192);
    --div_backgrand: #7fffd4;
    --text_meneu_color: rgb(0, 8, 117);

}



body{
    background: var(--body_backgrand);
    min-height: 100vh;
    
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

*{
    direction: rtl;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    color: var(--text_meneu_color);    
}


.nav ul {
    direction: rtl;

    display: flex;
    align-items: center;
    gap: 25px;

    list-style: none;
    margin: 0;
    padding: 10px 20px;

    background-color: var(--div_backgrand);
    border-radius: 12px;
    box-shadow: 0 3px 10px var(--box_shadows);

    position: fixed;
    top: 10px;
    right: 10px;
    left: 10px;
    z-index: 1000;
}


.nav ul li {
    display: flex;
    align-items: center;
}

.nav ul li a {
    color: var(--text_meneu_color);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
    font-weight: bolder;
    font-size: larger;
    transition: all 0.3s ease;
    display: flex;

}

.nav ul li .search_box{
    width: 350px;
    height: 30px;
    border-radius: 10px;
    border-color: #00ffaad0;
    background: var(--input_backgrand);
    margin-right: 70px;
    text-align: left;
}

.nav ul li .search_box:focus{
    border-color: var(--div_backgrand);
    outline: none;
    box-shadow: 0px 0px 0px var(--box_shadows);
}


.nav ul li a:hover{
    color: black;
    background-color: var(--button_hover);
    border-radius: 10px;
    box-shadow: 5px 5px 5px var(--box_shadows);
}





.nav ul li img{
    width: 50px;
}

.nav ul li .search_box{
    direction: ltr;
}
/*------------------------------*/
/* container: دو ستون ثابت (دو تا در هر ردیف) */
.box_cards{
    margin: 150px;
    display: grid;
    grid-template-columns: repeat(2, 320px); /* دو ستون با عرض ثابت */
    gap: 100px;            /* فاصله بین ستون‌ها را اینجا تنظیم کن */
    justify-content: center; /* ستون‌ها در وسط صفحه قرار می‌گیرند */
    align-items: start;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1000px;

}

/* هر کارت */
.card {
    width: 320px;          /* عرض کارت مطابق ستون */
    height: 240px;
    perspective: 1000px;
    cursor: pointer;
    box-sizing: border-box;
}



/* داخلی کارت */
.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    transform-origin: center center;
    will-change: transform;
}

.card-inner:hover{
    transform:  scale(1.1);
    transition: all 0.5 ease;
}

/* چرخش */
.card.flip .card-inner {
    transform: rotateY(180deg);
}

/* جلو و پشت کارت */
.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    box-shadow: 5px 5px 5px var(--box_shadows);
    padding: 18px;
    box-sizing: border-box;
    text-shadow:  2px 2px 5px rgba(0, 0, 0, 0.404);
}

/* فونت بزرگ‌تر و یکنواخت */
.front p,
.back p {
    font-size: 30px;        /* اندازه فونت بزرگ‌تر */
    line-height: 1.2;
    margin: 0;
    text-align: center;
    word-break: break-word;
    font-weight: bolder;
}

/* استایل جلو و پشت */
.front {
    background: var(--div_backgrand);
    color: var(--text_meneu_color);
    box-sizing: border-box;
    text-shadow:  2px 2px 5px rgba(0, 0, 0, 0.404);
}

.back{
    background: #ffbbcb;
    color: var(--text_meneu_color);
    transform: rotateY(180deg);
    text-shadow: 2px 2px 5px var(--text_shadows);
    box-sizing: border-box;
    text-shadow:  2px 2px 5px rgba(0, 0, 0, 0.404);
}



/* ریسپانسیو: در صفحه‌های خیلی کوچک یک ستون شود */
@media (max-width: 760px) {
    .box_cards{
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 16px;
    }
    .card {
        width: 100%;
        max-width: 420px;
        height: auto;
    }
}


.box_cards div a div p{
    color: var(--text_meneu_color);
    margin: 10px;
    font-size: larger;
    box-shadow: 5px 5px 7px var(--box_shadows);
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    transition: all 0.7s ease;

}

.box_cards div a div p:hover{
    background-color: var(--button_hover);
    transform: scale(1.2);
}

.back a {
    text-decoration: none;
}

.back a p {
    text-decoration: none;
}


.back {
    position: absolute;
}


.back a {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
}


