/* ==========================================================
   modules/services/services.css
   استایل‌های مشترک + فیلد تعداد محدود + نمایشگر قیمت جدید + فرم مدرسه دوستونه
   ========================================================== */

/* ---------- گرید خدمات ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 20px;
    align-items: start;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.04);
    transition: opacity 0.4s ease, max-height 0.5s ease, padding 0.4s ease, margin 0.4s ease, box-shadow 0.3s;
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 55px rgba(37, 99, 235, 0.12);
}

.service-card.collapsing {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-width: 0;
    overflow: hidden;
}

.service-card.expanded {
    grid-column: 1 / -1;
    box-shadow: 0 25px 60px rgba(37, 99, 235, 0.15);
    max-height: 2000px;
}

/* ---------- هدر کارت ---------- */
.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 28px 0;
}

.card-header .card-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    transition: transform 0.35s;
}

.service-card:hover .card-icon {
    transform: rotate(-5deg) scale(1.1);
}

.card-header h3 {
    font-family: 'Titr', 'Zar Bold', 'Nazanin', Tahoma, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

/* ---------- بدنهٔ کارت ---------- */
.card-body-wrapper {
    padding: 20px 28px 28px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.card-body-wrapper.fading {
    opacity: 0;
}

/* ---------- چیدمان داخلی در حالت گسترده ---------- */
.expanded-content {
    display: flex;
    gap: 30px;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
}

.service-card.expanded .expanded-content {
    opacity: 1;
}

.expanded-left {
    flex: 1;
    min-width: 0;
}

.expanded-right {
    flex: 1;
    min-width: 0;
    border-right: 1px solid var(--border);
    padding-right: 24px;
}

/* ---------- تب‌ها ---------- */
.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ---------- ویژگی‌ها ---------- */
.feature-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.feature-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
}

.short-desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 18px;
}

/* ---------- اطلاعات فشرده ---------- */
.compact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.compact-info .detail-item {
    flex: 1 1 120px;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: 10px;
    min-width: 100px;
}

.compact-info .detail-item h5 {
    font-size: 11px;
    margin-bottom: 2px;
}

.compact-info .detail-item p {
    font-size: 13px;
}

/* ---------- دکمه‌ها ---------- */
.btn-back {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--surface);
    color: var(--text);
}

.btn-next {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.3s;
}

.btn-next:hover {
    background: var(--primary-dark);
}

.slide-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* ---------- فرم استعلام ---------- */
.inquiry-form-inline .form-row {
    margin-bottom: 18px;
}

.inquiry-form-inline label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 14px;
}

.inquiry-form-inline input,
.inquiry-form-inline textarea,
.inquiry-form-inline select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: var(--surface);
}

/* ---------- بخش انتخاب خدمات ---------- */
.calc-student-count {
    margin-bottom: 20px;
}

.calc-student-count label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
}

/* ردیف تعداد دانش‌آموز + نمایشگر قیمت */
.student-input-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.student-input-row input {
    flex: 0 0 140px;
    min-width: 120px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: var(--surface);
}

/* نمایشگر قیمت کل */
.total-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.total-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}

.total-badge {
    font-weight: 800;
    color: var(--primary-dark);
}

/* رادیو گروپ اصلی */
.main-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.main-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.main-option:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary);
}

.main-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.main-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 4px #fff;
}

.option-text {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

/* گرید دوستونه خدمات */
.calc-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.calc-service-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border: 1px solid transparent;
}

.calc-service-card:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.2);
}

.calc-service-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.calc-service-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* کادر توضیحات */
.service-desc-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin: 15px 0;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
    min-height: 60px;
}

/* ---------- فرم اطلاعات مدرسه (دوستونه) ---------- */
#form-section .form-row-double {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}

#form-section .form-group-half {
    flex: 1;
    margin-bottom: 18px;
}

#form-section .form-group-half label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 14px;
}

#form-section .form-group-half input,
#form-section .form-group-half select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: var(--surface);
    transition: var(--transition);
}

#form-section .form-group-half input:focus,
#form-section .form-group-half select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}

/* فیلد تکی (توضیحات) */
#form-section .form-row {
    margin-bottom: 18px;
}

#form-section .form-row label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 14px;
}

#form-section .form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: var(--surface);
    transition: var(--transition);
}

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .card-header {
        padding: 20px 20px 0;
    }
    .card-body-wrapper {
        padding: 20px 20px 28px;
    }
    .expanded-content {
        flex-direction: column;
    }
    .expanded-right {
        border-right: none;
        padding-right: 0;
        border-top: 1px solid var(--border);
        padding-top: 20px;
    }

    /* تک‌ستونه شدن فرم مدرسه در موبایل */
    #form-section .form-row-double {
        flex-direction: column;
        gap: 0;
    }
}


/* ---------- استایل select (مانند input) ---------- */
#form-section select,
#form-section .form-group-half select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: var(--surface);
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
}

#form-section select:focus,
#form-section .form-group-half select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}





/* ---------- مودال موفقیت ---------- */
.success-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.success-modal-dialog {
    background: #fff;
    border-radius: 24px;
    padding: 40px 36px;
    width: min(90%, 480px);
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.35s ease;
}

.success-modal-dialog h2 {
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 16px;
}

.success-modal-dialog p {
    color: var(--text-light);
    line-height: 2;
    margin-bottom: 20px;
    font-size: 15px;
}

.success-modal-dialog .phone-number {
    direction: ltr;
    display: inline-block;
    background: var(--surface);
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
    letter-spacing: 1px;
    margin: 10px 0 20px;
}

.success-modal-dialog .btn-close-modal {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.success-modal-dialog .btn-close-modal:hover {
    background: var(--primary-dark);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}



.price-note {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #b45309;
    margin: 15px 0;
    line-height: 1.8;
}



.consult-note {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 18px;
    line-height: 1.8;
    text-align: center;
}




