/* =========================================================
   کارت دوره
   ========================================================= */

.course-card-custom-v3 {
    background-color: #28303F;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    max-width: 600px;
    min-height: 150px;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.course-card-custom-v3:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.course-card-custom-v3::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    opacity: 0.1;
    border-radius: 12px;
    pointer-events: none;
}

/* تصویر دوره */
.course-img-custom-v3 {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* ستون اصلی اطلاعات */
.course-info-custom-v3 {
    min-width: 0;
    flex-grow: 1;
    height: 120px;

    display: grid;
    grid-template-rows: 1fr auto;

    text-align: right;
    position: relative;
    z-index: 1;
}

/* باکس عنوان اصلی و زیرعنوان */
.course-heading-custom-v3 {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    overflow: hidden;
    padding-bottom: 7px;
}

/* عنوان اصلی دوره */
.course-title-custom-v3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    margin: 0;
    color: #ffffff !important;
    text-decoration: none;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;

    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
}

.course-title-custom-v3:hover {
    color: #42a5f5 !important;
}

/* زیرعنوان دوره */
.course-subtitle-custom-v3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;

    margin-top: 3px;
    color: #aeb9c8 !important;
    text-decoration: none;

    font-size: 11px;
    font-weight: 400;
    line-height: 1.8;

    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
}

.course-subtitle-custom-v3:hover {
    color: #d5e8f8 !important;
}

/* نوار اطلاعات پایین کارت */
.course-meta-custom-v3 {
    width: 100%;
    min-height: 25px;

    list-style: none;
    margin: 0;
    padding: 7px 0 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;

    border-top: 1px solid rgba(255, 255, 255, 0.09);

    direction: rtl;
    white-space: nowrap;
}

/* هر آیتم اطلاعات */
.course-meta-custom-v3 li {
    min-width: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    color: #aeb9c8;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    direction: rtl;
}

/* متن اطلاعات */
.course-meta-custom-v3 li span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* آیکن‌های اطلاعات */
.course-meta-custom-v3 li i {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}


/* =========================================================
   کارت Fixed
   عنوان: دقیقاً ۱ خط
   زیرعنوان: حداکثر ۳ خط
   نوار آمار: ثابت در پایین کارت
   ========================================================= */

.course-card-custom-v3.course-card-fixed-meta
.course-heading-custom-v3 {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding-bottom: 7px;

    display: grid;
    grid-template-columns: minmax(0, 1fr);

    /*
       ردیف اول: عنوان یک‌خطی
       ردیف دوم: فضای ثابت برای حداکثر سه خط زیرعنوان
    */
    grid-template-rows: calc(15px * 1.7) calc(11px * 1.8 * 3);
    gap: 3px;

    justify-content: stretch;
    align-content: flex-start;

    direction: rtl;
    text-align: right;
}

/* عنوان: فقط یک خط */
.course-card-custom-v3.course-card-fixed-meta
.course-title-custom-v3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;

    width: 100%;
    min-width: 0;
    justify-self: stretch;
    align-self: start;

    margin: 0;
    max-height: calc(15px * 1.7);

    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;

    direction: rtl;
    text-align: right;
    unicode-bidi: isolate;
}

/* زیرعنوان: حداکثر سه خط */
.course-card-custom-v3.course-card-fixed-meta
.course-subtitle-custom-v3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;

    width: 100%;
    min-width: 0;
    justify-self: stretch;

    /*
       در حالت یک‌خطی، متن در فضای رزروشده برای ۳ خط
       وسط قرار می‌گیرد تا فضای خالی زیر آن متعادل باشد.
    */
    align-self: center;

    margin: 0;
    max-height: calc(11px * 1.8 * 3);

    color: #aeb9c8 !important;
    text-decoration: none;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.8;

    direction: rtl;
    text-align: right;
    unicode-bidi: isolate;
}

/* آمار همیشه در پایین کارت بماند */
.course-card-custom-v3.course-card-fixed-meta
.course-meta-custom-v3 {
    min-height: 22px;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    direction: ltr;
    flex-shrink: 0;
}


/* =========================================================
   Modal
   ========================================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 15px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    height: 700px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

.modal-title {
    text-align: center;
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 700;
}

.modal #description {
    width: 100%;
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}
/* =========================================================
   فرم مشاوره
   ========================================================= */

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #2d3748;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #42a5f5;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.3);
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 15px;
    background-color: #42a5f5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

.submit-button:hover {
    background-color: #1e88e5;
    transform: translateY(-2px);
}

.consultation-button {
    background-color: #38a169;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.3);
    margin-top: 20px;
}

.consultation-button:hover {
    background-color: #2f855a;
    transform: translateY(-2px);
}


/* =========================================================
   تصاویر بخش راهکارها
   ========================================================= */

#section-solution-individual img,
#section-solution-organizational img {
    opacity: 0.5;
}


/* =========================================================
   تولتیپ اختصاصی (Tooltip)
   ========================================================= */

.has-tooltip {
    position: relative;
    cursor: pointer;
}

/* ساختار جعبه تولتیپ */
.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    background-color: #1e2530;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-family: inherit;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

/* فلش کوچک زیر تولتیپ */
.has-tooltip::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    border-width: 5px;
    border-style: solid;
    border-color: #1e2530 transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 10;
}

/* افکت نمایش هنگام hover */
.has-tooltip:hover::after,
.has-tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}


    .footer-social-column {
        text-align: center;
    }

    /* لوگوی اصلی */
    .footer-social-column .logo-footer {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .footer-social-column .logo-footer img {
        display: block;
        width: auto;
        height: 36px;
    }

    /* متن زیر لوگو */
    .footer-social-column .footer-description {
        margin: 24px 0 0;
        text-align: center;
    }

    /* بخش آیکون‌های شبکه اجتماعی */
    .footer-social-column .foot-social-icon {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 14px;
        margin: 24px 0 0 !important;
        padding: 0;
        list-style: none;
    }

    .footer-social-column .foot-social-icon .list-inline-item {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin: 0 !important;
        padding: 0;
    }

    .footer-social-column .foot-social-icon .list-inline-item a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid #263746;
        border-radius: 6px !important;
        color: #263746;
        background-color: transparent;
        text-decoration: none;
        transition:
            color 0.2s ease,
            border-color 0.2s ease,
            background-color 0.2s ease;
    }

    .footer-social-column .foot-social-icon .list-inline-item a:hover {
        color: #ffffff;
        border-color: #263746;
        background-color: #263746;
    }

    .footer-social-column .foot-social-icon svg,
    .footer-social-column .foot-social-icon i {
        display: block;
        flex: 0 0 19px;
        width: 19px;
        height: 19px;
        margin: 0;
    }

    .footer-social-column .foot-social-icon svg path {
        fill: none;
        stroke: currentColor;
    }

    /* لوگوی آپارات باید توپر نمایش داده شود */
    .footer-social-column .foot-social-icon .feather-aparat path {
        fill: currentColor;
        stroke: currentColor;
    }

    /* نماد ساماندهی و اینماد */
    .footer-social-column .footer-trust-logos {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 24px;
        width: 100%;
        margin-top: 22px;
    }

    .footer-social-column .footer-trust-logos img {
        display: block;
        width: auto;
        max-width: 90px;
        height: 75px;
        padding: 0;
        object-fit: contain;
    }

    @media (max-width: 575.98px) {
        .footer-social-column .foot-social-icon {
            gap: 10px;
        }

        .footer-social-column .foot-social-icon .list-inline-item,
        .footer-social-column .foot-social-icon .list-inline-item a {
            width: 40px;
            height: 40px;
        }

        .footer-social-column .footer-trust-logos {
            gap: 18px;
        }
    }

.consulting-error {
    display: block;
    min-height: 20px;
    margin-top: 5px;
    color: #d93025;
    font-size: 13px;
}

.consulting-input-error {
    border-color: #d93025 !important;
    background-color: #fff5f5 !important;
}

.consulting-counter {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 12px;
}

.consulting-counter-error {
    color: #d93025 !important;
    font-weight: bold;
}

.consulting-message {
    display: none;
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    line-height: 1.8;
}

.consulting-success,
.consulting-danger {
    display: block;
}

.consulting-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.consulting-danger {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

#consultationSubmitButton:disabled {
    cursor: wait;
    opacity: .7;
}