/* ==================================================
   Reset
================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ==================================================
   Body
================================================== */

body {
    font-family:
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;

    background: #002333;

    color: #ffffff;

    min-height: 100vh;

    direction: rtl;
}


/* ==================================================
   Container
================================================== */

.container {
    width: 92%;

    max-width: 1050px;

    margin: 0 auto;

    padding: 40px 0;
}


/* ==================================================
   Header
================================================== */

.site-header {
    margin-bottom: 30px;
}


.logo-section {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 18px;

    width: 100%;
}


/* ==================================================
   Iran Flag
================================================== */

.iran-flag {
    width: 70px;
    height: 38px;

    object-fit: cover;

    border-radius: 8px;

    box-shadow:
        0 4px 12px
        rgba(0, 0, 0, 0.25);

    flex-shrink: 0;
}


/* ==================================================
   Site Logo
================================================== */

.site-logo {
    width: 68px;
    height: 68px;

    object-fit: contain;

    border-radius: 12px;

    flex-shrink: 0;
}


/* ==================================================
   Site Title
================================================== */

.site-title {
    text-align: center;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-width: 270px;
}


.site-title h1 {
    color: #00f5f5;

    font-size: 29px;

    font-weight: 700;

    line-height: 1.4;

    margin:
        0 0 2px;
}


.site-title p {
    color: #b9b9b9;

    font-size: 13px;

    line-height: 1.8;

    margin:
        0 0 1px;
}


.powered-by {
    display: block;

    color: #697f83;

    font-size: 9px;

    line-height: 1.5;
}


/* ==================================================
   Section Heading
================================================== */

.section-heading {
    text-align: right;

    margin-bottom: 16px;
}


.section-heading h2 {
    color: #00f5f5;

    font-size: 20px;

    margin-bottom: 5px;
}


.section-heading p {
    color: #9db1b5;

    font-size: 13px;
}


/* ==================================================
   Templates
================================================== */

.templates-section {
    margin-bottom: 30px;
}


.templates-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
}


/* ==================================================
   Template Card
================================================== */

.template-card {
    position: relative;

    display: block;

    cursor: pointer;

    background: #003d47;

    border:
        1px solid
        rgba(0, 245, 245, 0.08);

    border-radius: 16px;

    overflow: hidden;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.template-card:hover {
    transform:
        translateY(-3px);

    border-color:
        rgba(0, 245, 245, 0.35);

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, 0.25);
}


.template-card input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.template-card:has(
    input:checked
) {
    border-color:
        #00f5f5;

    box-shadow:
        0 0 0 2px
        rgba(0, 245, 245, 0.12),

        0 12px 30px
        rgba(0, 0, 0, 0.25);
}


.template-card:has(
    input:checked
)::after {

    content: "انتخاب شد";

    position: absolute;

    top: 10px;
    right: 10px;

    padding:
        5px 9px;

    background: #00ad79;

    color: #ffffff;

    font-size: 10px;

    border-radius: 7px;
}


/* ==================================================
   Template Content
================================================== */

.template-content {
    display: flex;

    flex-direction: column;
}


.template-preview {
    width: 100%;

    aspect-ratio: 3 / 4;

    background: #ffffff;

    overflow: hidden;

    display: flex;

    align-items: center;
    justify-content: center;
}


.template-preview img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    transition:
        transform 0.25s ease;
}


.template-card:hover
.template-preview img {
    transform:
        scale(1.01);
}


.template-info {
    padding:
        13px 14px 15px;

    text-align: right;
}


.template-info h3 {
    color: #ffffff;

    font-size: 14px;

    margin-bottom: 5px;
}


.template-info span {
    color: #7f9b9f;

    font-size: 11px;
}


/* ==================================================
   Main Form
================================================== */

.form-card {
    background: #003d47;

    padding: 35px;

    border-radius: 22px;

    border:
        1px solid
        rgba(0, 245, 245, 0.08);

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.35),

        0 0 25px
        rgba(0, 245, 245, 0.04);
}


/* ==================================================
   Titles
================================================== */

.form-card h2,
.about-section h2 {
    color: #00f5f5;

    font-size: 19px;

    font-weight: 700;

    line-height: 1.6;
}


.form-card h2 {
    margin-top: 8px;

    margin-bottom: 22px;
}


.section-title {
    margin-top: 30px !important;
}


/* ==================================================
   Form Rows
================================================== */

.form-row {
    display: flex;

    gap: 20px;

    width: 100%;
}


.form-group {
    flex: 1;

    min-width: 0;

    margin-bottom: 20px;
}


/* ==================================================
   Labels
================================================== */

.form-group label,
.signature-section label,
.logo-upload-section label {
    display: block;

    color: #00f5f5;

    font-size: 13px;

    font-weight: 600;

    margin-bottom: 8px;
}


.optional {
    color: #7f9b9f;

    font-size: 11px;

    font-weight: normal;
}


/* ==================================================
   Inputs
================================================== */

input,
textarea {
    width: 100%;

    padding:
        13px 15px;

    border:
        1px solid #00616f;

    border-radius: 11px;

    background: #002b39;

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


input::placeholder,
textarea::placeholder {
    color: #7f9b9f;
}


input:focus,
textarea:focus {
    border-color: #00f5f5;

    background: #002936;

    box-shadow:
        0 0 0 3px
        rgba(0, 245, 245, 0.10);
}


/* ==================================================
   Textarea
================================================== */

textarea {
    min-height: 230px;

    resize: vertical;

    line-height: 2;

    text-align: right;
}


#selected-template {
    display: none;
}


/* ==================================================
   Letter Mode
================================================== */

.letter-mode {
    display: flex;

    gap: 10px;

    margin-bottom: 14px;

    flex-wrap: wrap;
}


.mode-option {
    position: relative;

    cursor: pointer;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 145px;

    padding:
        10px 15px;

    border:
        1px solid #00616f;

    border-radius: 10px;

    background: #002b39;

    color: #b9d0d3;

    font-size: 12px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.mode-option:hover {
    border-color: #00f5f5;

    transform:
        translateY(-1px);
}


.mode-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.mode-option:has(
    input:checked
) {
    border-color: #00f5f5;

    background:
        rgba(0, 245, 245, 0.08);

    color: #00f5f5;

    box-shadow:
        0 0 0 2px
        rgba(0, 245, 245, 0.06);
}


/* ==================================================
   Ready Letters
================================================== */

.ready-letters {
    margin-top: 15px;

    padding: 18px;

    background: #002b39;

    border:
        1px solid
        rgba(0, 245, 245, 0.10);

    border-radius: 14px;
}


.ready-letters > p {
    color: #9db1b5;

    font-size: 12px;

    margin-bottom: 14px;

    text-align: right;
}


.ready-letter-options {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 10px;
}


.ready-letter-card {
    border:
        1px solid #00616f;

    border-radius: 11px;

    padding:
        14px 9px;

    background: #00333e;

    color: #ffffff;

    cursor: pointer;

    font-family: inherit;

    text-align: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.ready-letter-card:hover {
    transform:
        translateY(-2px);

    border-color:
        #00f5f5;

    background:
        #003e49;

    box-shadow:
        0 7px 18px
        rgba(0, 0, 0, 0.20);
}


.ready-letter-card strong {
    display: block;

    color: #00f5f5;

    font-size: 13px;

    margin-bottom: 5px;
}


.ready-letter-card small {
    display: block;

    color: #7f9b9f;

    font-size: 9px;

    line-height: 1.6;
}


/* ==================================================
   Font Section
================================================== */

.font-section {
    margin-top: 30px;

    margin-bottom: 25px;

    padding: 18px;

    background: #002b39;

    border:
        1px solid
        rgba(0, 245, 245, 0.08);

    border-radius: 15px;
}


.font-section-header {
    margin-bottom: 15px;
}


.font-section-header h2 {
    color: #00f5f5;

    font-size: 16px;

    margin:
        0 0 4px;
}


.font-section-header p {
    color: #7f9b9f;

    font-size: 11px;
}


.font-options {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}


.font-card {
    position: relative;

    display: block;

    cursor: pointer;
}


.font-card input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.font-card-content {
    position: relative;

    min-height: 105px;

    padding: 17px;

    border:
        1px solid #00616f;

    border-radius: 13px;

    background: #00333e;

    text-align: center;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.font-card:hover
.font-card-content {
    border-color: #00f5f5;

    transform:
        translateY(-2px);
}


.font-card input:checked
+ .font-card-content {
    border-color:
        #00f5f5;

    background:
        #003d47;

    box-shadow:
        0 0 0 2px
        rgba(0, 245, 245, 0.08),

        0 8px 20px
        rgba(0, 0, 0, 0.20);
}


.font-check {
    position: absolute;

    top: 9px;
    left: 9px;

    width: 21px;
    height: 21px;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid #00616f;

    border-radius: 50%;

    color: transparent;

    font-size: 12px;
}


.font-card input:checked
+ .font-card-content
.font-check {
    background: #00ad79;

    border-color:
        #00ad79;

    color: #ffffff;
}


.font-preview {
    margin-bottom: 8px;

    color: #ffffff;
}


.vazirmatn-preview {
    font-family:
        "Vazirmatn",
        "Segoe UI",
        sans-serif;

    font-size: 22px;
}


.nazanin-preview {
    font-family:
        "B Nazanin",
        Tahoma,
        sans-serif;

    font-size: 22px;
}


.font-name {
    color: #00f5f5;

    font-size: 13px;

    font-weight: 700;

    margin-bottom: 3px;
}


.font-description {
    color: #7f9b9f;

    font-size: 10px;
}


/* ==================================================
   Upload
================================================== */

.logo-upload-section,
.signature-section {
    width: 100%;
}


.logo-upload-section {
    margin-top: 10px;

    margin-bottom: 25px;
}


.signature-section {
    margin-top: 10px;

    margin-bottom: 25px;
}


.logo-upload-box,
.upload-box {
    width: 100%;

    border:
        2px dashed #00ad79;

    border-radius: 14px;

    padding:
        28px 20px;

    text-align: center;

    background:
        rgba(0, 173, 121, 0.035);
}


.logo-upload-box p,
.upload-box p {
    color: #d6d6d6;

    font-size: 13px;

    line-height: 1.8;

    margin-bottom: 15px;
}


.logo-upload-box input,
.upload-box input {
    width: auto;

    max-width: 100%;

    border: none;

    padding: 0;

    background: transparent;
}


/* ==================================================
   Create Button
================================================== */

.create-button {
    width: 100%;

    padding:
        15px 20px;

    border: none;

    border-radius: 12px;

    background: #00ad79;

    color: #ffffff;

    font-family: inherit;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.create-button:hover {
    background: #00c98d;

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 22px
        rgba(0, 173, 121, 0.25);
}


/* ==================================================
   Download Buttons
================================================== */

.download-section {
    display: flex;

    gap: 12px;

    margin-top: 18px;
}


.download-section a {
    flex: 1;

    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 50px;

    border-radius: 11px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;
}


.download-pdf {
    background: #00ad79;

    color: #ffffff;
}


.download-word {
    background: #00616f;

    color: #ffffff;
}


/* ==================================================
   About
================================================== */

.about-section {
    margin-top: 30px;

    padding:
        27px 30px;

    background: #003d47;

    border-radius: 18px;

    border:
        1px solid
        rgba(0, 245, 245, 0.08);

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.25);
}


.about-header {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}


.about-header span {
    color: #7f9b9f;

    font-size: 11px;
}


.about-section p {
    color: #d6d6d6;

    font-size: 13px;

    line-height: 2;
}


.about-features {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;

    margin-top: 25px;
}


.about-feature {
    display: flex;

    gap: 12px;
}


.about-feature h3 {
    color: #00f5f5;

    font-size: 14px;

    margin-bottom: 5px;
}


.about-feature p {
    font-size: 12px;

    line-height: 1.9;
}


.about-future {
    margin-top: 25px;

    padding: 18px;

    border-radius: 12px;

    background: #002b39;
}


.future-title {
    color: #00f5f5;

    font-size: 14px;

    font-weight: 700;

    margin-bottom: 8px;
}


/* ==================================================
   Footer
================================================== */

.site-footer {
    text-align: center;

    padding:
        23px 0 5px;

    color: #7f9b9f;

    font-size: 11px;
}


/* ==================================================
   Date Picker
================================================== */

.date-picker-wrapper {
    position: relative;

    width: 100%;
}


.date-input-row {
    display: flex;

    gap: 7px;

    width: 100%;
}


.date-input-row input {
    flex: 1;

    min-width: 0;
}


.date-action-btn {
    border:
        1px solid #00616f;

    border-radius: 10px;

    padding:
        0 13px;

    background: #002b39;

    color: #00f5f5;

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.date-action-btn:hover {
    border-color:
        #00f5f5;

    background:
        #00333e;

    transform:
        translateY(-1px);
}


.today-btn {
    color: #00ad79;
}


.calendar-btn {
    color: #00f5f5;
}


.jalali-calendar {
    position: absolute;

    top:
        calc(100% + 9px);

    right: 0;

    width: 330px;

    padding: 16px;

    background: #003d47;

    border:
        1px solid
        rgba(0, 245, 245, 0.18);

    border-radius: 17px;

    box-shadow:
        0 18px 45px
        rgba(0, 0, 0, 0.40);

    z-index: 1000;

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(-8px)
        scale(0.98);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}


.jalali-calendar.show {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


.calendar-header {
    display: grid;

    grid-template-columns:
        42px 1fr 42px;

    align-items: center;

    gap: 8px;

    margin-bottom: 14px;
}


.calendar-title {
    text-align: center;

    color: #00f5f5;

    font-size: 14px;

    font-weight: 700;
}


.calendar-nav {
    width: 38px;

    height: 38px;

    border:
        1px solid #00616f;

    border-radius: 10px;

    background: #002b39;

    color: #ffffff;

    font-family: inherit;

    font-size: 23px;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}


.calendar-nav:hover {
    border-color:
        #00f5f5;

    background:
        #00333e;
}


.calendar-weekdays,
.calendar-days {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 5px;
}


.calendar-weekdays {
    margin-bottom: 6px;
}


.calendar-weekdays div {
    text-align: center;

    color: #7f9b9f;

    font-size: 10px;

    font-weight: 700;

    padding:
        5px 0;
}


.calendar-day {
    width: 100%;

    aspect-ratio: 1 / 1;

    border:
        1px solid transparent;

    border-radius: 9px;

    background:
        #002b39;

    color: #ffffff;

    font-family: inherit;

    font-size: 11px;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}


.calendar-day:hover {
    border-color:
        #00f5f5;

    background:
        #003e49;
}


.calendar-day.empty {
    background:
        transparent;

    cursor: default;
}


.calendar-day.today {
    border-color:
        #00ad79;

    color:
        #00ad79;

    font-weight: 700;
}


.calendar-day.selected {
    background:
        #00ad79;

    border-color:
        #00ad79;

    color: #ffffff;

    font-weight: 700;
}


.calendar-footer {
    margin-top: 13px;

    padding-top: 12px;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.06);

    text-align: center;
}


#calendar-today-btn {
    border: none;

    padding:
        8px 18px;

    border-radius: 9px;

    background: #00ad79;

    color: #ffffff;

    font-family: inherit;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;
}


#calendar-today-btn:hover {
    background:
        #00c98d;
}


/* ==================================================
   Attachment
================================================== */

.attachment-options {
    width: 100%;

    height: 48px;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 6px;

    padding: 4px;

    background: #002936;

    border:
        1px solid #00616f;

    border-radius: 13px;

    box-shadow:
        inset 0 1px 2px
        rgba(0, 0, 0, 0.18);
}


/* ==================================================
   Radio
================================================== */

.attachment-options input[type="radio"] {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}


/* ==================================================
   Attachment Option
================================================== */

.attachment-option {
    width: 100%;

    height: 100%;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    margin: 0 !important;

    padding: 0 !important;

    background: #00333e;

    border:
        1px solid transparent;

    border-radius: 9px;

    color: #9db1b5;

    font-family: inherit;

    font-size: 13px;

    font-weight: 600;

    line-height: 1 !important;

    text-align: center;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* ==================================================
   Attachment Hover
================================================== */

.attachment-option:hover {
    background:
        #003e49;

    color:
        #d9ffff;

    border-color:
        #00616f;
}


/* ==================================================
   Attachment Selected
================================================== */

#attachment-yes:checked
+ .attachment-option,

#attachment-no:checked
+ .attachment-option {

    background:
        #00ad79;

    border-color:
        #00ad79;

    color:
        #ffffff;

    font-weight:
        700;

    box-shadow:
        0 3px 10px
        rgba(0, 173, 121, 0.20);
}


/* ==================================================
   جلوگیری قطعی از اثر Label عمومی
================================================== */

.form-group .attachment-option {

    width: 100%;

    height: 100%;

    margin-top: 0 !important;

    margin-right: 0 !important;

    margin-bottom: 0 !important;

    margin-left: 0 !important;

    padding-top: 0 !important;

    padding-right: 0 !important;

    padding-bottom: 0 !important;

    padding-left: 0 !important;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    line-height: 1 !important;
}


/* ==================================================
   Tablet
================================================== */

@media (max-width: 900px) {

    .templates-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }


    .container {
        width: 94%;
    }


    .ready-letter-options {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

}


/* ==================================================
   Mobile
================================================== */

@media (max-width: 650px) {

    body {
        overflow-x: hidden;
    }


    .container {
        width: 100%;

        max-width: 100%;

        padding:
            18px 12px 30px;
    }


    /* Header */

    .site-header {
        margin-bottom: 24px;
    }


    .logo-section {
        width: 100%;

        display: flex;

        align-items: center;

        justify-content: center;

        gap: 10px;

        flex-wrap: nowrap;
    }


    .iran-flag {
        width: 42px;
        height: 26px;

        flex-shrink: 0;

        border-radius: 6px;
    }


    .site-logo {
        width: 48px;
        height: 48px;

        flex-shrink: 0;

        border-radius: 10px;
    }


    .site-title {
        min-width: 0;

        flex: 1;

        width: auto;

        text-align: center;
    }


    .site-title h1 {
        font-size: 22px;

        line-height: 1.4;
    }


    .site-title p {
        font-size: 10px;

        line-height: 1.7;

        white-space: normal;
    }


    .powered-by {
        font-size: 7px;

        line-height: 1.4;
    }


    /* Section */

    .section-heading {
        margin-bottom: 14px;
    }


    .section-heading h2 {
        font-size: 18px;
    }


    .section-heading p {
        font-size: 12px;
    }


    /* Templates */

    .templates-grid {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 10px;

        width: 100%;
    }


    .template-card {
        min-width: 0;

        width: 100%;

        border-radius: 13px;
    }


    .template-preview {
        aspect-ratio: 3 / 4;
    }


    .template-info {
        padding:
            10px 10px 11px;
    }


    .template-info h3 {
        font-size: 12px;

        margin-bottom: 3px;
    }


    .template-info span {
        font-size: 9px;
    }


    .template-card:has(
        input:checked
    )::after {

        top: 7px;

        right: 7px;

        padding:
            4px 6px;

        font-size: 8px;
    }


    /* Main Form */

    .form-card {
        width: 100%;

        padding:
            20px 14px;

        border-radius: 17px;
    }


    .form-card h2,
    .about-section h2 {
        font-size: 18px;
    }


    .form-card h2 {
        margin-top: 4px;

        margin-bottom: 18px;
    }


    /* Form Rows */

    .form-row {
        display: flex;

        flex-direction: column;

        gap: 0;

        width: 100%;
    }


    .form-group {
        width: 100%;

        min-width: 0;

        margin-bottom: 16px;
    }


    /* Inputs */

    input,
    textarea {
        width: 100%;

        max-width: 100%;

        padding:
            12px;

        font-size: 14px;

        border-radius:
            10px;
    }


    textarea {
        min-height: 210px;

        line-height: 1.9;
    }


    /* Letter Mode */

    .letter-mode {
        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 8px;

        width: 100%;
    }


    .mode-option {
        width: 100%;

        min-width: 0;

        padding:
            10px 6px;

        font-size: 11px;
    }


    /* Ready Letters */

    .ready-letters {
        padding:
            13px;

        border-radius:
            12px;
    }


    .ready-letter-options {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 8px;
    }


    .ready-letter-card {
        width: 100%;

        padding:
            12px 6px;

        border-radius:
            10px;
    }


    .ready-letter-card strong {
        font-size: 12px;
    }


    .ready-letter-card small {
        font-size: 8px;

        line-height: 1.5;
    }


    /* Font */

    .font-section {
        margin-top: 25px;

        padding:
            14px;

        border-radius:
            13px;
    }


    .font-section-header h2 {
        font-size: 15px;
    }


    .font-section-header p {
        font-size: 10px;

        line-height: 1.8;
    }


    .font-options {
        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 8px;
    }


    .font-card-content {
        min-height: 100px;

        padding:
            13px 8px;

        border-radius:
            11px;
    }


    .font-preview {
        margin-bottom: 7px;
    }


    .vazirmatn-preview,
    .nazanin-preview {
        font-size: 19px;
    }


    .font-name {
        font-size: 12px;
    }


    .font-description {
        font-size: 9px;
    }


    /* Upload */

    .logo-upload-section,
    .signature-section {
        width: 100%;
    }


    .logo-upload-box,
    .upload-box {
        width: 100%;

        padding:
            22px 12px;

        border-radius:
            12px;
    }


    .logo-upload-box p,
    .upload-box p {
        font-size: 11px;

        line-height: 1.8;
    }


    .logo-upload-box input,
    .upload-box input {
        width: 100%;

        font-size: 11px;
    }


    /* Create */

    .create-button {
        width: 100%;

        padding:
            14px;

        font-size: 14px;

        border-radius:
            11px;
    }


    /* Download */

    .download-section {
        flex-direction: column;

        gap: 8px;
    }


    .download-section a {
        width: 100%;

        min-height: 48px;
    }


    /* About */

    .about-section {
        width: 100%;

        margin-top: 22px;

        padding:
            20px 15px;

        border-radius:
            15px;
    }


    .about-header {
        gap: 9px;

        margin-bottom: 17px;
    }


    .about-section p {
        font-size: 12px;

        line-height: 2;
    }


    .about-header span {
        font-size: 9px;
    }


    .about-features {
        display: grid;

        grid-template-columns:
            1fr;

        gap: 18px;

        margin-top: 20px;
    }


    .about-feature {
        gap: 10px;
    }


    .about-feature h3 {
        font-size: 13px;
    }


    .about-feature p {
        font-size: 11px;

        line-height: 1.9;
    }


    .about-future {
        margin-top: 20px;

        padding:
            14px;
    }


    .future-title {
        font-size: 13px;
    }


    /* Footer */

    .site-footer {
        padding-top: 20px;

        font-size: 9px;
    }


    /* ==================================================
       Date Picker Mobile
    ================================================== */

    .date-input-row {
        display: grid;

        grid-template-columns:
            1fr 70px 70px;

        gap: 6px;
    }


    .date-action-btn {
        padding:
            0 5px;

        font-size: 10px;
    }


    .jalali-calendar {
        right: 0;

        width:
            min(
                330px,
                calc(100vw - 35px)
            );

        padding:
            13px;
    }


    /* ==================================================
       Attachment Mobile
    ================================================== */

    .attachment-options {
        width: 100%;

        height: 44px;

        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 5px;

        padding: 4px;

        border-radius:
            12px;
    }


    .attachment-option {
        width: 100% !important;

        height: 100% !important;

        display: flex !important;

        align-items: center !important;

        justify-content: center !important;

        margin: 0 !important;

        padding: 0 !important;

        font-size: 12px;

        line-height: 1 !important;

        text-align: center;
    }

}


/* ==================================================
   Very Small Phones
================================================== */

@media (max-width: 380px) {

    .container {
        padding-left: 9px;

        padding-right: 9px;
    }


    .logo-section {
        gap: 7px;
    }


    .iran-flag {
        width: 35px;

        height: 22px;
    }


    .site-logo {
        width: 42px;

        height: 42px;
    }


    .site-title h1 {
        font-size: 20px;
    }


    .site-title p {
        font-size: 9px;
    }


    .powered-by {
        font-size: 6px;
    }


    .templates-grid {
        gap: 8px;
    }


    .template-info {
        padding:
            9px 8px 10px;
    }


    .template-info h3 {
        font-size: 11px;
    }


    .template-info span {
        font-size: 8px;
    }


    .form-card {
        padding:
            18px 11px;
    }


    .font-options {
        grid-template-columns:
            1fr;
    }


    .letter-mode {
        grid-template-columns:
            1fr;
    }


    .ready-letter-options {
        grid-template-columns:
            1fr 1fr;
    }


    .date-input-row {
        grid-template-columns:
            1fr 62px 62px;
    }


    .jalali-calendar {
        width:
            calc(100vw - 28px);
    }


    /* Attachment */

    .attachment-options {
        width: 100%;

        height: 42px;

        gap: 4px;

        padding: 3px;
    }


    .attachment-option {
        width: 100% !important;

        height: 100% !important;

        margin: 0 !important;

        padding: 0 !important;

        font-size: 11px;

        line-height: 1 !important;
    }

}