:root {
  --primary-color: #a8c45b;
  --primary-dark: #84b400;
  --secondary-color: #00c4cc;
  --accent-color: #579192;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --text-color: #333;
  --text-light: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* نظام الجريد البديل عن Bootstrap */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-12,
.col-lg-5,
.col-lg-7,
.col-md-6 {
  padding: 0 15px;
}

.col-12 {
  width: 100%;
}
.col-md-6 {
  width: 50%;
}
.col-lg-5 {
  width: 41.666667%;
}
.col-lg-7 {
  width: 58.333333%;
}

@media (max-width: 768px) {
  .col-md-6,
  .col-lg-5,
  .col-lg-7 {
    width: 100%;
  }
}

/* التنبيهات */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 15px 20px;
  margin-bottom: 25px;
  box-shadow: var(--box-shadow);
  position: relative;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border-right: 4px solid #28a745;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f1b0b7);
  color: #721c24;
  border-right: 4px solid #dc3545;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1, #b8e2eb);
  color: #0c5460;
  border-right: 4px solid #17a2b8;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
  border-right: 4px solid #ffc107;
}

.alert-dismissible {
  padding-right: 3rem;
}

.btn-close {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}

.btn-close:hover {
  opacity: 1;
}

/* البطاقات */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  margin-bottom: 25px;
  background: white;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
  border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
  border: none;
  padding: 20px;
  font-weight: 600;
  color: white;
}

.bg-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  ) !important;
}

.bg-success {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.card-title {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.card-body {
  padding: 25px;
}

/* بطاقات الحجوزات */
.appointment-card {
  border-radius: var(--border-radius);
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: white;
  box-shadow: var(--box-shadow);
}

.appointment-card::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 4px;
  height: 100%;
  transition: var(--transition);
}

.inside-clinic::before {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
}

.outside-clinic::before {
  background: linear-gradient(135deg, #007bff, #0056b3);
}

.appointment-card:hover {
  transform: translateX(-5px);
}

.appointment-card:hover::before {
  width: 6px;
}

/* البادجات */
.badge {
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: inline-block;
}

.bg-light {
  background-color: #f8f9fa !important;
}
.text-primary {
  color: var(--primary-color) !important;
}
.bg-success {
  background-color: #28a745 !important;
}
.bg-danger {
  background-color: #dc3545 !important;
}
.bg-warning {
  background-color: #ffc107 !important;
}
.bg-info {
  background-color: #17a2b8 !important;
}

.service-badge {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.appointment-status {
  font-size: 0.75rem;
}

/* النموذج */
.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
  display: block;
}

.form-control,
.form-select {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 12px 15px;
  transition: var(--transition);
  font-size: 1rem;
  width: 100%;
  background: white;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(168, 196, 91, 0.25);
  outline: none;
}

/* مجموعة الإدخال - بديل input-group */
.input-group {
  display: flex;
  width: 100%;
}

.input-group-text {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  border: 2px solid #e9ecef;
  border-right: none;
  padding: 0 10px;
  font-weight: 600;
  border-top-left-radius: var(--border-radius) !important;
  border-bottom-left-radius: var(--border-radius) !important;
  display: flex;
  align-items: center;
}

.input-group input {
  border-top-right-radius: var(--border-radius) !important;
  border-bottom-right-radius: var(--border-radius) !important;
  border-left: none;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.form-text {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 5px;
  display: block;
}

/* أزرار الراديو */
.form-check {
  display: inline-block;
  margin-bottom: 0;
}

.form-check-inline {
  margin-left: 15px;
}

.form-check-input {
  margin-left: 8px;
  border: 1px solid black;
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
}

.form-check-input:checked {
  background-color: var(--primary-color) !important;
}

.form-check-label {
  cursor: pointer;
  font-weight: 500;
  vertical-align: middle;
}

/* فترات الوقت */
.time-period {
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: var(--border-radius);
  border: 1px solid #e9ecef;
}

.time-period-title {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
  font-size: 1.1rem;
}

/* خانات الوقت */
.time-slot {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 12px 20px;
  margin: 5px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  text-align: center;
  min-width: 120px;
  flex: 1;
  max-width: 120px;
}

.time-slot.available {
  background: white;
  color: var(--dark-color);
  border-color: #dee2e6;
}

.time-slot.available:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 196, 91, 0.3);
}

.time-slot.selected {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(132, 180, 0, 0.4);
}

/* الأزرار */
.btn {
  border-radius: var(--border-radius);
  padding: 12px 30px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 1rem;
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838, #1e9e8a);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.1rem;
}

.btn-close:focus {
  box-shadow: none;
}

/* spinner التحميل */
.spinner-border {
  width: 2rem;
  height: 2rem;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
  display: inline-block;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* النص */
.text-muted {
  color: var(--text-light) !important;
}

.text-sm {
  font-size: 0.9rem;
}

.text-white {
  color: white !important;
}
.text-primary {
  color: var(--primary-color) !important;
}

/* العنوان في الحجز */
.appointment-address {
  color: var(--text-light);
  line-height: 1.4;
}

/* المرونة */
.d-flex {
  display: flex;
}
.flex-wrap {
  flex-wrap: wrap;
}
.justify-content-between {
  justify-content: space-between;
}
.justify-content-end {
  justify-content: flex-end;
}
.align-items-center {
  align-items: center;
}
.align-items-start {
  align-items: flex-start;
}

/* المسافات */
.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.me-1 {
  margin-left: 0.25rem !important;
}
.me-2 {
  margin-left: 0.5rem !important;
}
.ms-2 {
  margin-right: 0.5rem !important;
}

/* الحشو */
.p-3 {
  padding: 1rem !important;
}

/* الظلال */
.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* النص المركزي */
.text-center {
  text-align: center !important;
}
.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* دمج العناصر */
.d-grid {
  display: grid;
}

/* التجاوب */
@media (max-width: 768px) {
  .clinic-header {
    padding: 40px 0;
  }

  .clinic-header h1 {
    font-size: 2.2rem;
  }

  .clinic-header .lead {
    font-size: 1.1rem;
  }

  .time-slot {
    min-width: 80px;
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .card-header {
    padding: 15px;
  }

  .form-control,
  .form-select {
    padding: 10px 12px;
  }

  .btn {
    padding: 10px 25px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .clinic-header h1 {
    font-size: 1.8rem;
  }

  .time-period {
    padding: 15px;
  }

  .time-slot {
    min-width: 70px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .appointment-card .card-body {
    padding: 15px !important;
  }
}

/* تحسينات إضافية */
.form-check-inline {
  margin-left: 15px;
}

.d-flex.flex-wrap {
  gap: 8px;
}

.text-center.py-3 {
  padding: 30px 0;
}

/* تأثيرات التركيز للوصول */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.time-slot:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* تحسينات للقراءة */
.lead {
  line-height: 1.6;
  font-size: 1.1rem;
}

.form-text {
  line-height: 1.4;
}

/* إزالة السهم الافتراضي من حقل الاختيار */
.form-select {
  background-image: none !important;
  padding-right: 0.75rem !important;
}

/* إذا كنت عايز تزيل السهم من كل حقل اختيار في الصفحة */
select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* إذا لسه ظاهر في بعض المتصفحات */
select::-ms-expand {
  display: none !important;
}

/* تنسيق الـ Hero Section الجديد */
.clinic-hero {
  background: linear-gradient(135deg, #a8c45b 0%, #579192 100%);
  color: white;
  padding: 50px 0 60px;
  position: relative;
  overflow: hidden;
  margin-bottom: 50px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text {
  z-index: 2;
}

.hero-title {
  margin-bottom: 25px;
}

.title-main {
  display: block;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.title-sub {
  display: block;
  font-size: 1.8rem;
  font-weight: 400;
  opacity: 0.9;
  color: #e8f4ff;
}

.hero-description {
  font-size: 1.3rem;
  line-height: 1.7;
  margin-bottom: 35px;
  opacity: 0.95;
  max-width: 90%;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.1rem;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(10px);
}

.feature-item i {
  font-size: 1.4rem;
  width: 30px;
  text-align: center;
  color: #fff;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.image-placeholder {
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.image-placeholder:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.5);
}

.image-placeholder i {
  font-size: 4rem;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.image-placeholder span {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}

.hero-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.hero-waves svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

.hero-waves .shape-fill {
  fill: #ffffff;
}

/* تحسينات التجاوب */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-description {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .title-main {
    font-size: 3rem;
  }

  .title-sub {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .clinic-hero {
    padding: 60px 0 100px;
  }

  .title-main {
    font-size: 2.5rem;
  }

  .title-sub {
    font-size: 1.3rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .image-placeholder {
    width: 250px;
    height: 250px;
  }

  .feature-item {
    font-size: 1rem;
    padding: 10px 15px;
  }
}

@media (max-width: 480px) {
  .clinic-hero {
    padding: 40px 0 80px;
  }

  .title-main {
    font-size: 2rem;
  }

  .title-sub {
    font-size: 1.1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .image-placeholder {
    width: 200px;
    height: 200px;
  }

  .image-placeholder i {
    font-size: 3rem;
  }

  .feature-item {
    font-size: 0.9rem;
  }
}
