/* ===== Profile header name/title fix ===== */
/* Center profile header content */
.profile-page .profile-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.profile-page .profile-card__main {
    width: 100%;
    text-align: center !important;
}

.profile-page .profile-card__name,
.profile-page .profile-card__title,
.profile-page .profile-card__badge {
    text-align: center !important;
}

.profile-page .profile-card__avatar,
.profile-page .profile-image {
    margin-left: auto;
    margin-right: auto;
}

/* لا تخلي RTL/LTR يرجع الاسم يمين أو يسار */
html[dir="rtl"] .profile-page .profile-card__main,
html[dir="ltr"] .profile-page .profile-card__main,
html[dir="rtl"] .profile-page .profile-card__name,
html[dir="ltr"] .profile-page .profile-card__name,
html[dir="rtl"] .profile-page .profile-card__title,
html[dir="ltr"] .profile-page .profile-card__title {
    text-align: center !important;
}
.profile-card__header {
    align-items: center;
}

.profile-card__name {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 900;
    color: #1d3557;
    line-height: 1.25;
}

.profile-card__title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #475467;
    line-height: 1.7;
}

.profile-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #eaf6ff;
    color: #1570a6;
    font-size: 14px;
    font-weight: 800;
}

.profile-card__avatar {
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    border-radius: 24px;
    overflow: hidden;
    background: #eef6fc;
    border: 1px solid #d8edf8;
}

.profile-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* RTL / LTR */
html[dir="rtl"] .profile-card__main {
    text-align: right;
}

html[dir="ltr"] .profile-card__main {
    text-align: left;
}

@media (max-width: 768px) {
    .profile-card__header {
        align-items: stretch;
    }

    .profile-card__avatar {
        width: 120px;
        height: 120px;
        flex-basis: 120px;
        margin-bottom: 14px;
    }

    .profile-card__name {
        font-size: 26px;
    }

    .profile-card__title {
        font-size: 16px;
    }
}


.subscription-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.subscription-card {
    background: #fff;
    border: 1px solid #ececf3;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.subscription-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #1d3557;
}

.subscription-price {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
    color: #1d3557;
}

.subscription-features {
    margin: 0;
    padding: 0 18px 0 0;
    list-style: disc;
    color: #344054;
    line-height: 1.9;
}

.subscription-features li {
    margin-bottom: 6px;
}

.subscription-card.is-highlighted {
    border-color: #1d3557;
    box-shadow: 0 10px 28px rgba(29, 53, 87, 0.12);
}

@media (max-width: 992px) {
    .subscription-grid {
        grid-template-columns: 1fr;
    }
}

/* صورة البروفايل داخل الكارد */
.profile-card img,
.provider-media-preview img,
.profile-image img {
    width: 100%;
    height: 220px; /* 👈 تحكم بالحجم */
    object-fit: cover; /* 👈 أهم سطر */
    border-radius: 16px;
    display: block;
}

/* لو الصورة داخل box كبير */
.profile-image {
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    border-radius: 16px;
}


.availability-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.availability-row {
    display: grid;
    grid-template-columns: 140px 160px 1fr 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #ececf3;
    border-radius: 16px;
    background: #fff;
}

.availability-day {
    font-weight: 700;
    color: #1d3557;
}

.availability-time label {
    display: block;
    margin: 0;
}

.availability-time label span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #667085;
}

.availability-time input[type="time"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d9dee8;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}

.availability-toggle {
    justify-content: center;
    min-height: 46px;
}

@media (max-width: 900px) {
    .availability-row {
        grid-template-columns: 1fr 1fr;
    }

    .availability-day {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .availability-row {
        grid-template-columns: 1fr;
    }
}



/* Provider pages */
.provider-profile-page .form-container-wide {
    max-width: 920px;
    margin: 0 auto;
}

.provider-profile-page .page-title,
.provider-profile-page .page-desc {
    text-align: center;
}

.provider-form {
    background: #fff;
    border: 1px solid #ececf3;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.provider-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.provider-form .form-note {
    margin: 8px 0 18px;
    color: #667085;
}

.provider-form .provider-check {
    min-height: 46px;
}

.provider-form .provider-actions {
    margin-top: 20px;
}

.provider-form .is-near-limit {
    border-color: #d97706;
    background: #fffaf0;
}

.provider-form .is-filled {
    border-color: #1d3557;
}

.form-divider {
    margin: 16px 0 20px;
    padding-top: 10px;
    border-top: 1px solid #ececf3;
}

.form-divider span {
    display: inline-block;
    font-weight: 700;
    color: #1d3557;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.alert-error {
    background: #fff1f1;
    border: 1px solid #f0c5c5;
    color: #9b1c1c;
}

.alert-success {
    background: #eefaf0;
    border: 1px solid #bee3c3;
    color: #176b2c;
}

.profile-top-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px;
    background: #fff;
    border: 1px solid #ececf3;
    border-radius: 18px;
}

.profile-top-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #f7f8fc;
    color: #1d3557;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
}

.profile-top-menu a:hover {
    background: #eef2ff;
}

.profile-top-menu a.is-active {
    background: #1d3557;
    color: #fff;
}

.provider-form .form-group {
    margin-bottom: 18px;
}

.provider-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1d3557;
}

.provider-form input[type="text"],
.provider-form input[type="number"],
.provider-form input[type="email"],
.provider-form input[type="url"],
.provider-form textarea,
.provider-form select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d9dee8;
    border-radius: 14px;
    background: #fff;
    box-sizing: border-box;
    font-size: 15px;
}

.provider-form textarea {
    min-height: 120px;
    resize: vertical;
}

.provider-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #d9dee8;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

.provider-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.provider-check span {
    font-weight: 600;
    color: #1f2937;
}

.provider-actions {
    margin-top: 22px;
}

.provider-actions .btn,
.provider-actions button {
    min-height: 46px;
    padding: 12px 22px;
    border: 0;
    border-radius: 14px;
    background: #1d3557;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.provider-actions .btn:hover,
.provider-actions button:hover {
    opacity: .95;
}

@media (max-width: 768px) {
    .provider-form .form-grid {
        grid-template-columns: 1fr;
    }

    .profile-top-menu a {
        flex: 1 1 calc(50% - 12px);
    }
}

.profile-page {
  padding: 30px 0 50px;
}

.profile-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.profile-card__header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  background: #f8fbff;
  border-bottom: 1px solid #e8edf3;
}

.profile-card__name {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.2;
}

.profile-card__title {
  font-size: 18px;
  color: #4b5563;
  margin-bottom: 10px;
}

.profile-card__badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 14px;
}

.profile-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
}

.profile-btn--call {
  background: #2563eb;
}

.profile-btn--whatsapp {
  background: #16a34a;
}

.profile-btn--email {
  background: #374151;
}

.profile-login-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 600;
}

.profile-card__body {
  padding: 24px;
}

.profile-section + .profile-section {
  margin-top: 28px;
}

.profile-section__title {
  margin: 0 0 14px;
  font-size: 22px;
}

.profile-section__content {
  color: #374151;
  line-height: 1.9;
}

.dynamic-fields-grid,
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.profile-info-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.profile-info-label {
  font-weight: 700;
  margin-bottom: 6px;
  color: #111827;
}

.profile-info-value {
  color: #4b5563;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .profile-card__header {
    flex-direction: column;
  }

  .dynamic-fields-grid,
  .profile-info-grid {
    grid-template-columns: 1fr;
  }

  .profile-card__name {
    font-size: 26px;
  }
}

.profile-login-link {
  color: #d62828;
  font-weight: 800;
  text-decoration: none;
}

.profile-login-link:hover {
  color: #b71c1c;
  text-decoration: underline;
}