﻿@font-face {
    font-family: "pinar";
    src: url("./Fonts/pinar/Pinar-Regular.woff2") format("woff2"), url("./Fonts/pinar/Pinar-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "pinar";
    src: url("./Fonts/pinar/Pinar-Bold.woff2") format("woff2"), url("./Fonts/pinar/Pinar-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: "iranyekan";
    font-weight: normal;
    font-display: swap;
    src: url("./Fonts/iranyekan/ttf/iranyekanwebregular.ttf") format("truetype"), url("./Fonts/iranyekan/ttf/iranyekanwebbold.ttf") format("woff");
}

@font-face {
    font-family: "iranyekan";
    font-weight: bold;
    font-display: swap;
    src: url("./Fonts/iranyekan/woff/iranyekanwebregular.woff") format("truetype"), url("./Fonts/iranyekan/woff/iranyekanwebbold.woff") format("woff");
}

.submenuItems {
    display: none;
}


:root,
:host {
    --font-pinar: "pinar","iranyekan", sans-serif;
    --font-iranyekan: "iranyekan","pinar", sans-serif;
    --theme-primary: #EC2828;
    --font-weight-bold: bold;
    --spacing: 0.25rem;
    --editor-hover-a: #0c09a1;
    --editor-a-color: #0d6efd;
    --editor-h2-color: #ec2828;
    --editor-h3-color: #b22222;
    --editor-h2-size: 1.125rem;
    --editoe-h2-lin-height: 1.625;
    --editor-h3-size: 1.125rem;
    --editoe-h3-lin-height: 1.625;
    --editor-p-size: 1em;
    --editoe-p-lin-height: 1.9em;
    --editor-p-color: #343434;
    --editor-blockquote-border-color: #68be63;
    --editor-blockquote-bg: #fef3fd;
    --editor-blockquote-hover-bg: #fff3e0;
    --editor-blockquote-a-color: #0d6efd;
    --form-alert-star: #ff0000;
    --form-submit-button: #0fa357;
    --form-file-bg: #1c3faa;
    --pagination-active-bg: #121212;
    --faq-body-bg: #ffffff;
    --faq-header-title-size: 1.25rem;
    --faq-header-title-leading: 1.4;
    --faq-answer-title-size: 0.875rem;
    --pagination-active-color: #ffffff;
    --pagination-hover-bg: #121212;
    --pagination-hover-color: #ffffff;
    --faq-border-design-header: #121212;
    --faq-answer-title-color: #484d57;
    --color-white: #ffffff;
}

/* Responsive media sizing */
.hform img,
.hform video,
.editor img,
.editor video {
    max-width: 100%;
    height: auto;
}

.hform input[type="checkbox"],
.hform input[type="radio"] {
    cursor: pointer;
}

.editor {
    font-size: 16px;
    line-height: 1.6;
}

/* .hform styles */

.hform .hfile {
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    cursor: pointer;

    &::file-selector-button {
        background-color: var(--form-file-bg);
    }

    &::file-selector-button {
        --tw-border-style: none;
        border-style: none;
    }

    &::file-selector-button {
        cursor: pointer;
    }

    &::file-selector-button {
        padding-inline: calc(var(--spacing) * 4);
    }

    &::file-selector-button {
        padding-block: calc(var(--spacing) * 2);
    }

    &::file-selector-button {
        font-size: var(--text-base);
        line-height: var(--tw-leading, var(--text-base--line-height));
    }

    &::file-selector-button {
        color: var(--color-white);
    }
}

.hform .red-star {
    color: var(--form-alert-star);
}

.hform .hp-2 {
    padding: calc(var(--spacing) * 2);
}

.hform .hflex {
    display: flex;
}

.hform .hjustify-end {
    justify-content: flex-end;
}


.hform .hgrid {
    display: grid;
}

.hform .hgrid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.hform .hgap-x-3 {
    column-gap: calc(var(--spacing) * 3);
}

.hform .hgap-y-5 {
    row-gap: calc(var(--spacing) * 5);
}

/* Input styles */
.hform .hinput {
    padding: 0.5rem;
    border-radius: 0.25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: #eeeeee;
}

    .hform .hinput:focus {
        outline: none;
        background-color: #ffffff;
        box-shadow: 0 0 0 2px rgba(1, 104, 27, 0.3);
    }

/* Button styles */
.hform .hbutton {
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--form-submit-button);
    position: relative;
    color: white;
    min-width: 7rem;
}

/* Direction LTR */
.hform .direction-ltr {
    direction: ltr;
}

/* Margin utility */
.hform .hm-2 {
    margin: calc(var(--spacing) * 2);
}

/* Media queries for .md:hgrid-cols-3 and col-span inside .hform */
@media (max-width: 48rem /* 768px */ ) {
    .editor table {
        text-wrap: nowrap;
        display: block;
        overflow-x: auto;
    }

        .editor table thead,
        .editor table tbody {
            display: inline-table;
            width: 100%;
        }
}

@media (min-width : 48rem /* 768px */ ) {
    .hform .md\:hgrid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hform .md\:hcol-span-1 {
        grid-column: span 1 / span 1;
    }

    .hform .md\:hcol-span-2 {
        grid-column: span 2 / span 2;
    }

    .hform .md\:hcol-span-3 {
        grid-column: span 3 / span 3;
    }
}

@media screen and (min-width: 640px) {
    .editor .htopic ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Editor text styles */
.editor a {
    color: var(--editor-a-color);
    display: inline-block;
    font-family: var(--font-iranyekan);
}

    .editor a:not([href]) {
        color: inherit;
        font-family: inherit;
        cursor: pointer;
    }

.editor strong {
    color: inherit;
    font-family: var(--font-pinar);
}

.editor h2 {
    color: var(--editor-h2-color);
    font-size: var(--editor-h2-size);
    line-height: var(--editoe-h2-lin-height);
    font-family: var(--font-pinar);
    font-weight: var(--font-weight-bold);
}

.editor h3 {
    font-family: var(--font-pinar);
    color: var(--editor-h3-color);
    font-size: var(--editor-h3-size);
    line-height: var(--editoe-h3-lin-height);
    font-weight: var(--font-weight-bold);
}

.editor p {
    color: var(--editor-p-color);
    text-align: justify;
    font-size: var(--editor-p-size);
    line-height: var(--editoe-p-lin-height);
    font-family: var(--font-iranyekan);
}

/* Editor spacing for child elements */

/* Editor ul styles */

.editor .htopic {
    padding: 0.75rem;
    background-color: rgb(243 244 246);
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

    .editor .htopic ul {
        display: grid;
        list-style-position: inside;
        list-style-type: disc;
        gap: 0.75rem;
    }

    .editor .htopic > ul li {
        padding: 0.2rem;
    }

        .editor .htopic > ul li *:first-child {
            display: inline;
        }

        .editor .htopic > ul li a:hover {
            color: var(--editor-hover-a);
        }

.editor .hbook {
    background-color: #f1f1f1;
    border-radius: 0.375rem;
    border: 2px solid #9da5ae;
}

    .editor .hbook .header {
        border-bottom: 2px solid #9da5ae;
        padding: 0.75rem;
        font-size: 1.4em;
        font-weight: var(--font-weight-bold);
    }

    .editor .hbook ul,
    .editor .hbook ol {
        padding: 0 1rem;
        list-style-position: inside;
        list-style-type: disc;
    }

    .editor .hbook > ul,
    .editor .hbook > ol {
        min-height: 10rem;
        max-height: 40rem;
        overflow-y: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .editor .hbook ul a,
    .editor .hbook a {
        font-size: 1em;
        display: inline-block;
        /* font-weight: var(--font-weight-bold); */
        color: var(--theme-primary);
    }

    .editor .hbook > ul li a:hover {
        color: var(--editor-hover-a);
        text-decoration: underline;
    }

    .editor .hbook ol > *:not(:last-child),
    .editor .hbook ul > *:not(:last-child) {
        margin-bottom: calc(var(--spacing, 0.25rem) * 3);
    }


/* Table styles */

.editor table {
    width: 100% !important;
    border: 1px solid #cad5e2;
    /*text-wrap: nowrap;*/
}

    .editor table tr {
        border-bottom: 1px solid #cad5e2;
    }

    .editor table td,
    .editor table th {
        padding: 0.5rem;
    }

    /* Table first row backgrounds */
    .editor table:has(> tbody:first-child) > tbody:first-child > tr:first-child {
        background-color: #f3f4f6;
        text-wrap: nowrap;
    }

    .editor table:has(> thead:first-child) > thead:first-child > tr:first-child {
        background-color: #f3f4f6;
        text-wrap: nowrap;
    }



/* Editor image */
.editor img {
    margin: 0 auto;
    max-height: 40rem;
    object-fit: contain;
}

/* Pagination styles */
.page-number li {
    margin: 0 0.25rem;
    border: 1px solid #a7b3ae;
    border-radius: 0.25rem;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform-origin: center;
}

    .page-number li a {
        display: block;
        min-width: 2rem;
        height: 2rem;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.5rem;
    }

    .page-number li.activepage {
        background-color: var(--pagination-active-bg);
        color: var(--pagination-active-color);
        transform: scale(1.15);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }

    .page-number li:hover {
        background-color: var(--pagination-hover-bg);
        color: var(--pagination-hover-color);
        transform: scale(1.15);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }


.h_faq .accordion-menu .h_faq_question_body .faq_minuse_pluse {
    position: relative;
    margin-inline-start: 0.5rem;
}

    .h_faq .accordion-menu .h_faq_question_body .faq_minuse_pluse::after {
        display: block;
        content: '+';
        position: absolute;
        top: 50%;
        transform: translate(-50%,-50%) rotate(0);
        transition: transform 300ms ease-in;
        inset-inline-end: 50%;
        font-size: 2rem;
    }

.h_faq
.accordion-menu
.open
.h_faq_question_body
.faq_minuse_pluse::after {
    content: '-';
    transform: translate(-50%,-50%) rotate(-180deg);
    transition: transform 300ms ease-in;
}

.h_faq .h_faq_question_body {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
}


/* Blockquote */
.editor blockquote {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: var(--editor-blockquote-bg);
    border-top: 3px solid var(--editor-blockquote-border-color);
    padding: 0.75rem;
    transition: all 0.2s ease;
}

    .editor blockquote:hover {
        background-color: var(--editor-blockquote-hover-bg);
    }

    .editor blockquote a {
        color: var(--editor-blockquote-a-color);
    }

        .editor blockquote a:hover {
            color: var(--editor-hover-a);
            text-decoration: underline;
        }

    .editor blockquote::before {
        content: "بیشتر بخوانید :";
        margin-left: 0.5rem;
        white-space: nowrap;
        font-family: var(--font-pinar);
    }

    .editor blockquote p {
        margin: 0;
    }


/* HCTA */
.editor .hcta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: var(--editor-blockquote-bg);
    border-top: 3px solid var(--editor-blockquote-border-color);
    padding: 0.75rem;
    transition: all 0.2s ease;
}

    .editor .hcta:hover {
        background-color: var(--editor-blockquote-hover-bg);
    }

    .editor .hcta a {
        color: var(--editor-blockquote-a-color);
    }

        .editor .hcta a:hover {
            color: var(--editor-hover-a);
            text-decoration: underline;
        }

    .editor .hcta p {
        margin: 0;
    }

.hspace-y-1 > *:not(:last-child) {
    margin-bottom: calc(var(--spacing, 0.25rem) * 1);
}

.hspace-y-2 > *:not(:last-child) {
    margin-bottom: calc(var(--spacing, 0.25rem) * 2);
}

.editor > *:not(:last-child) {
    margin-bottom: calc(var(--spacing, 0.25rem) * 3);
}

.editor > editor > *:not(:last-child) {
    margin-bottom: calc(var(--spacing, 0.25rem) * 3);
}

.editor > .hform > *:not(:last-child) {
    margin-bottom: calc(var(--spacing, 0.25rem) * 3);
}
