* {
    box-sizing: border-box;
    font-family: 'vazir', Arial, sans-serif;
}

@font-face {
    font-family: vazir;
    font-style: normal;
    font-weight: 100;
    src: url("./fonts/Vazir-Thin.eot");
    src: url("./fonts/Vazir-Thin.woff") format("woff"), url("~/css/fonts/Vazir-Thin.ttf") format("ttf"), url("~/css/fonts/Vazir-Thin.woff2") format("woff2");
}

@font-face {
    font-family: vazir;
    font-style: normal;
    font-weight: 300;
    src: url("./fonts/Vazir-Light.eot");
    src: url("./fonts/Vazir-Light.woff") format("woff"), url("./fonts/Vazir-Light.ttf") format("ttf"), url("./fonts/Vazir-Light.woff2") format("woff2");
}

@font-face {
    font-family: vazir;
    font-style: normal;
    font-weight: bold;
    src: url("./fonts/Vazir-Bold.eot");
    src: url("./fonts/Vazir-Bold.woff") format("woff"), url("./fonts/Vazir-Bold.ttf") format("ttf"), url("./fonts/Vazir-Bold.woff2") format("woff2");
}

@font-face {
    font-family: vazir;
    font-style: normal;
    font-weight: bold;
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.eot");
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.woff") format("woff"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.ttf") format("ttf"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.woff2") format("woff2");
}
@font-face {
    font-family: vazir;
    font-style: normal;
    font-weight: 700;
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.eot");
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.woff") format("woff"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.ttf") format("ttf"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-Bold-FD-WOL.woff2") format("woff2");
}
@font-face {
    font-family: vazir;
    font-style: normal;
    font-weight: normal;
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.eot");
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.woff") format("woff"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.ttf") format("ttf"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.woff2") format("woff2");
}
@font-face {
    font-family: vazir;
    font-style: normal;
    font-weight: normal;
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.eot");
    src: url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.woff") format("woff"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.ttf") format("ttf"), url("./fonts/Farsi-Digits-Without-Latin/Vazir-FD-WOL.woff2") format("woff2");
}


@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    height: 100vh;
    overflow: hidden;
}

body {
    background-color: rgb(16, 24, 40);
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

header {
    background-color: #000;
    font-size: 16px;
    /*height:7vh;*/
}

.cover-container {
    max-width: 1200px;
}

.hero-badge {
    display: inline-block;
    padding: .5rem 1rem;
    border-radius: 50px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
}

/* Centering helper for the hero section on the home page */
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 1rem;
}

main {
    width: 100vw;
    height: 78vh;
    height: calc(100vh - 154px);
    overflow-y: auto;
    overflow-x: hidden;
}

.card-body {
    border-radius: 5px;
}

.hero {
    padding: 1rem 0 4rem;
    position: relative;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.hero-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    text-align: center;
}

.btn-primary-custom {
    background: rgb(79, 57, 246);
    border: none;
    padding: .9rem 2rem;
    font-weight: 700;
    border-radius: 50px;
    transition: .2s ease-in;
    font-size: 14px;
}

    .btn-primary-custom:hover {
        transform: translateY(-3px) scale(1.1) !important;
    }

btn:hover {
    background-color: red !important;
}

.btn-outline-custom {
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50px;
    padding: .9rem 2rem;
}


.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 1rem;
    height: 15vh;
}

.social-icon svg {
    width: 28px;
    height: 28px;
    transition: .3s;
}

.social-icon:hover svg {
    transform: translateY(-3px) scale(1.1);
}

.dropdown-menu {
    min-width: 250px;
    padding: .75rem;
    backdrop-filter: blur(10px);
}

.dropdown-item {
    border-radius: 8px;
    padding: .75rem 1rem;
    transition: all .2s ease;
}

    .dropdown-item:hover {
        transform: translateX(-4px);
    }

.sidebar-fixed {
    position: fixed;
    right: 0;
    top: 90.19px;
    width: 280px;
    height: calc(100vh - 88.19px - 61px);
    overflow-y: auto;
    padding: 0;
}
/* Mobile */
@media (max-width: 575.98px) {

    .content {
        margin-left: 0;
    }
}

/* Mobile */
@media (max-width: 1920px) {
    .offcanvas-header .btn-close {
        display: block;
    }

    .content {
        margin-left: 0;
    }
}

/* Desktop */
@media (min-width: 1300px) {
    .offcanvas-header .btn-close {
        display: none;
    }

    #offcanvasScrolling {
        transform: none !important;
        visibility: visible !important;
        border-right: 1px solid #dee2e6;
        width: 300px;
    }

    .offcanvas-backdrop {
        display: none;
    }

    .content-layout .navbar, .content-layout .content {
        margin-right: 300px;
    }

    #sidebar-toggler {
        display: none;
    }
}


.content {
    padding: 10px;
}

.sidebar {
    border: 1px solid #fff;
}

#sidebar-toggler {
    position: absolute;
    left: 5px;
    margin-top: 5px;
    margin-left: 15px;
    animation: pulse 1.5s infinite;
}

    #sidebar-toggler:hover {
        color: #fff !important;
    }

.sidebar-item {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}

.sidebar .accordion-button::after {
    position: absolute;
    left: 0;
    margin-left: 2px;
}

.article-container {
    padding: 1rem 0;
    max-width: 900px;
    margin: auto;
}

    .article-container p {
        line-height: 2;
        text-align: justify;
    }

    .article-container h2 {
        margin-bottom: 1rem;
    }

    .article-container pre {
        direction: ltr;
    }


.accordion-item, .accordion-button {
    border-radius: 0px !important;
}

    .accordion-item:last-of-type > .accordion-collapse {
        border-bottom-left-radius: 0px !important;
        border-bottom-right-radius: 0px !important;
    }

header .user.dropdown-menu {
    min-width: 150px;
}

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

a {
    color: #0077cc;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
}

.text-danger {
    font-size: 12px;
}

label.required::before {
    content: "* ";
    color: red;
}

/* Modal sliding animation */
.modal-content-wrapper {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

#userModalContent {
    position: relative;
    width: 100%;
}

.user-modal-panel {
    position: relative;
    width: 100%;
}

    .user-modal-panel.slide-enter {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        transform: translateX(100%);
        opacity: 0;
    }

    .user-modal-panel.slide-enter-active {
        transform: translateX(0);
        opacity: 1;
        transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s;
    }

    .user-modal-panel.slide-exit-active {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        opacity: 0;
        transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s;
    }

/* ensure modal-dialog has enough width */
.modal-dialog {
    max-width: 420px;
}

.sweet-alert .lead {
    padding: 5px;
}

#lastArticles {
    height: 40vh;
}

/* Submenu styles for dropdown */
.dropend {
    position: relative;
}

    .dropend .dropdown-menu {
        position: absolute;
        top: 0;
        right: 100%;
        margin-right: .125rem;
        display: none;
        min-width: 220px;
    }

    .dropend:hover > .dropdown-menu,
    .dropend > .dropdown-menu.show {
        display: block;
        /*    margin-right:8px;
*/
    }

    .dropend > .dropdown-toggle::after {
        display: none;
    }

    .dropend > .dropdown-toggle::after {
        content: '';
        display: inline-block;
        margin-right: .255em;
        vertical-align: .255em;
        border-top: .3em solid transparent;
        border-right: .3em solid;
        border-bottom: .3em solid transparent;
        position: absolute;
        left: 10px;
        top: 50%;
    }


pre {
    background-color: #000;
    border-radius: 5.25px;
    color: rgb(248,249,250);
    padding: 14px;
}

.carousel-indicators {
    position: relative;
    bottom: -5px;
}

    .carousel-indicators .active {
        background-color: #0d6efd;
    }


    .carousel-indicators [data-bs-target] {
        position: relative;
        width: 10px;
        height: 10px;
        border: 1px solid #000;
        border-radius: 50%;
    }

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}
/* ======================================================================
   Code Block — Visual Studio Dark syntax highlighting (Prism.js)
   Shared across both themes: code blocks always render with a
   black background regardless of site light/dark mode.
   ====================================================================== */

.code-panel {
    background: #000000;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    direction: ltr;
    text-align: left;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: auto;
}

    .code-panel code {
        background: transparent;
        color: #D4D4D4;
        font-family: 'JetBrains Mono', Consolas, monospace;
        padding: 0;
        border-radius: 0;
        font-size: inherit;
    }

/* Prism.js token colors — mapped to the classic Visual Studio Dark palette */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6A9955;
}

.token.punctuation {
    color: #D4D4D4;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
    color: #B5CEA8;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
    color: #CE9178;
}

.token.operator,
.token.entity,
.token.url {
    color: #D4D4D4;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #569CD6;
}

.token.function {
    color: #DCDCAA;
}

.token.class-name {
    color: #4EC9B0;
}

.token.variable {
    color: #9CDCFE;
}

.token.regex,
.token.important {
    color: #D16969;
}

.article-card-image {
    position:relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width:30%;
}

    .article-card-image img {
        max-width: 100%;
        min-width: 100%;
        height:100%;
        position: absolute;
        right: 0;
        bottom: 0;
    }
