:root {
    --br: rgb(30, 97, 136);
    --text: #E8F4FF;
    --accent: #FFD700;
    --header-bg1: #0F4C81;
    --header-bg2: #3F51B5;
    --header-br: #3949AB;
    --gradiant: none;
    --shadow: rgba(0, 0, 0, 0.548);
    --btnbr:#df832d;
    --btncl:linear-gradient(to right, #ce8a4b,50%,#df832d);
    --btntext:#eee3e3;
    --border: solid 3.2px #231f20;
    --stroke: #231f20;
    --textt:#000;
    --texttt:#df832d;
    --ulbg:#ffffff;
}

body.dark-mode {
    --br: rgb(17, 91, 134);
    --text: #e6edf3;
    --accent: #5f5f5f;
    --header-bg1: #0f3369;
    --header-bg2: #123c80;
    --header-br: #1d4b96;
    --gradiant: radial-gradient(circle at center right, rgba(10, 15, 41, 0.664), 20%, var(--header-bg1));
    --shadow: rgb(0, 0, 0);
    --btnbr: rgb(17, 74, 107);
    --btntext:#ffffff;
    --btncl:linear-gradient(to right, rgb(17, 91, 134),50%, rgb(17, 74, 107));
    --stroke: #cf7d30;
    --textt:#ffffff;
    --ulbg:#231f20;
}

.rotate180{
    transform: rotate(180deg);
}

.hover:hover{
    color: var(--accent);
}

/* هدر */
header {
    display: flex;
    min-height: 100%;
    flex-direction: column;
}

/* هدر 1 */
.header1 {
    background: linear-gradient(to top, var(--header-bg1), 80%, var(--header-bg2));
    border: 2px solid var(--br);
    display: grid;
    align-items: center;
    margin: 0 auto;
    border-radius: 0 0 26px 26px;
    position: relative;
    width: 99%;
    height: 60px;
    grid-template-columns: repeat(50, 1fr);
    grid-template-rows: auto;
    box-shadow: 0 7px 30px 10px var(--shadow);
}

.fa,
[class^="fa-"],
[class*=" fa-"] {
    vertical-align: -0.15em !important;
    /* برای بعضی آیکون‌ها مثل sun, moon, globe */
}

/* دکمه سوییچ به انگلیسی */
.english {
    text-decoration: none;
    color: var(--text);
    grid-column: 3 / 14;
    grid-row: 1;
    font-size: medium;
}

.english i {
    margin-right: 5px;
    position: absolute;
    top: 50%;
}

#darklight {
    position: relative;
    grid-row: 1;
    grid-column: 16 / 20;
}

/* دکمه تم */
#dropdowndlbtn {
    color: var(--text);
    cursor: pointer;
    position: absolute;
    top: 50%;
    font-size: 10px;
}

#dlbox {
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--gradiant);
    width: 24px;
    height: 24px;
}

#dlbtn {
    color: var(--text);
    cursor: pointer;
}

#dlmeno {
    display: none;
    width: 150px;
    margin-top: 12px;
    border-radius: 14px;
}

#dlmeno.active {
    display: inline-block;
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    background: radial-gradient(circle at top center, var(--header-bg1), 90%, var(--header-bg2));
    z-index: 3;
}

#dlmeno div {
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 8px;
}

#dlmeno div input {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
}

/* منو */

.ul2{
    display: block;
    width: 100%;
    height: 0;
    background-color: var(--ulbg);
    z-index: 3;
    position: absolute;
    overflow: hidden;
    transition: height 1.5s ease;
}

.ul2.active{
    height: 100vh;
    height: 100dvh;
}

.ul2 li:first-child{
    margin-top: 40px;
}

.ul2>li:first-child{
    margin-top: 70px;
}

.ul2 li{
    margin-bottom: 3vh;
    margin-right: 4%;
}

.ul2 a{
    z-index: 4;
    color: var(--texttt);
    font-size: larger;
}

.ul2 a:hover{
    color: var(--accent);
}

.ul2 .fa-solid{
    color: var(--btntext);
    background-color: var(--stroke);
    border-radius: 50%;
    width: 13px;
    height: 13px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 3%;
}

.ul2>li>ul {
    display: none;
}

.ul2>li.active ul{
    display: block;
}

.ul2>li>ul a{
    color: var(--textt);
    font-size: 16px;
}

.ul2>li:last-child a{
    color: var(--header-bg1);
}

.menubtn{
    box-shadow: var(--shadow);
    cursor: pointer;
    border: var(--border);
    border-color: var(--stroke);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    grid-column: 23 / 27;
    grid-row: 1;
    width: 50%;
}

.header1 .ul1 li ul {
    display: none;
}

.header1 .ul1 {
    display: flex;
    display: none; /* در حالت موبایل مخفی است */
}

.header1 .ul1 li {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header1 .ul1 li a {
    color: var(--text);
}

.header1 .ul1 li a:hover {
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
}

.header1 .ul1 .li {
    position: relative;
    display: flex;
}

.header1 .ul1 .li:hover ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    width: 100%;
    border: 2px solid var(--br);
    border-top: none;
}

.header1 .ul1 .li ul {
    background: radial-gradient(circle at top center, var(--header-bg1), 90%, var(--header-bg2));
    border-bottom: solid 1px var(--header-br);
}

.header1 .ul1 .li ul * {
    min-width: 100%;
    width: auto;
}

/* هدر 2 */
.header2 {
    margin: 0 auto;
    display: grid;
    align-items: center;
    grid-template-columns: repeat(50, 1fr);
    grid-template-rows: auto;
    margin-top: 10px;
    width: 100%;
}

/* سرچ بار */

#searchbar {
    cursor: text;
    text-align: start;
    background-color: var(--input-bg);
    border: none;
    border: 1px solid var(--accent);
    grid-column: 29 / 48;
    grid-row: 1;
    height: 30px;
    border-radius: 10px;
    padding: 0 8px;
}

#searchbar span {
    color: #888;
    position: relative;
}

#searchbar span i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 64px;
}

#searchbar input {
    display: none;
    color: #0F4C81;
}

#searchbar.active {}

#searchbar span.active {
    display: none;
}

#searchbar input.active {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    background-color: var(--input-bg);
}

#searchbar input.active:focus {
    border: none;
    outline: none;
}

/* دکمه لاگین ساینگ اوت */
.lsbtn {
    box-shadow: 0 4px 6px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--btncl);
    border: 2px solid var(--btnbr);
    cursor: pointer;
    z-index: 3;
    display: none; /* در حالت موبایل مخفی است */
}

.lsbtn a {
    color: var(--btntext);
}

.header-parent-svg{
    width: 10%;
    height: 100px;
    background-image: url(../assest/header-parent.svg);
    background-repeat: repeat;
    background-size: 16px 90px;
}

@media (min-width: 600px) {

    /* sm */

    .english {
        grid-column: 3 / 10;
        font-size: larger;
    }

    #darklight {
        grid-column: 10 / 13;
    }

    #dropdowndlbtn {
        font-size: 7px;
    }

    #dlmeno div {
        padding: 14px 8px;
    }

    #dlmeno div input {
        width: 18px;
        height: 18px;
    }

    #searchbar {
        grid-column: 38 / 48;
    }
}

@media (min-width: 900px) {

    /* md */

    .header1 {
        width: 88%;
        height: 100px;
    }

    #darklight {
        grid-column: 9 / 11;
    }

    .ul2{
        display: none;
    }

    .menubtn{
        display: none;
    }

    .header1>.ul1 {
        grid-row: 1;
        grid-column: 13 / 37;
        display: flex;
        justify-self: center;
    }

    .header1 .ul1, .header1 .ul1 ul {
        gap: 15px;
    }

    .header1>.ul1 a {
        padding: 3px 12px;
        font-size: 17px;
    }

    .header1 .ul1  .li ul {
        padding: 40px;
        border-radius: 0 0 14px 14px;
        z-index: 3;
    }

    .header2 {
        width: 88%;
    }

    .lsbtn {
        grid-column: 42 / 48;
        height: 45px;
        border-radius: 11px;
        display: flex;
    }
}

@media (min-width: 1200px) {

    /* lg */

    .header1 {
        width: 87%;
    }

    #darklight {
        grid-column: 8 / 10;
    }

    .header1>.ul1 a {
        padding: 3px 12px;
    }

    .lsbtn {
        grid-column: 42 / 46;
    }

    .lsbtn a {
        font-size: 16px;
    }
}

@media (min-width: 1536px) {

    /* xl */

    .header1 {
        width: 80%;
    }

    .english {
        grid-column: 2 / 6;
    }

    #darklight {
        grid-column: 6 / 8;
    }

    .header1>.ul1 a {
        font-size: 21px;
    }

    .header2 {
        width: 80%;
    }

    .lsbtn a {
        font-size: large;
    }

    #searchbar {
        grid-column: 40 / 48;
    }
}