/* ========================================
   1. GLOBAL STYLES & LAYOUT
   ======================================== */

/* Base Layout */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/* Container & Main Content */
.container {
  max-width: 1320px !important;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  margin-top: 80px;
  padding: 40px 20px;
  max-width: 1325px;
  margin-left: auto;
  margin-right: auto;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section.courses {
  flex: 1;
}

footer {
  margin-top: auto;
}

/* ========================================
   2. PROFILE HEADER SECTION
   ======================================== */

/* Profile Header Container */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  margin-bottom: 50px;
  padding: 50px 40px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8865e1, #6b46c1, #8b5cf6);
  border-radius: 20px 20px 0 0;
}

/* Profile Image Section */
.profile-image-container {
  position: relative;
  flex-shrink: 0;
}

.profile-image {
  position: relative;
  margin-bottom: 20px;
}

.profile-image img {
  width: 250px !important;
  height: 250px !important;
  border-radius: 50%;
  object-fit: cover !important;
  object-position: center !important;
  border: 4px solid #8865e1;
  display: block;
  transition: all 0.3s ease;
}

.profile-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(136, 101, 225, 0.3);
}

/* Rating Badge */
.rating-badge {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  padding: 10px 16px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(136, 101, 225, 0.2);
  backdrop-filter: blur(10px);
}

.rating-badge .star-rating {
  display: flex;
  gap: 2px;
}

.rating-badge .star-rating i {
  color: #f39c12;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rating-badge .rating-text {
  font-weight: 700;
  color: #333;
  font-size: 14px;
  margin-left: 4px;
}

.star-rating i {
  color: #f39c12;
  font-size: 14px;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Profile Information */
.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
}

.profile-main-info {
  border-bottom: 1px solid rgba(136, 101, 225, 0.15);
  padding-bottom: 25px;
  margin-right: 240px;
  /* أو حسب عرض الزر عندك */
  
}

.profile-name {
  font-size: 3.2rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-title {
  font-size: 1.4rem;
  color: #666;
  margin-bottom: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.profile-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777;
  font-size: 16px;
  font-weight: 500;
}

.profile-location i {
  color: #8865e1;
  font-size: 18px;
}

/* ========================================
   3. SOCIAL LINKS
   ======================================== */

.social-links {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: white;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  opacity: 0.9;
  transition: all 0.4s ease;
}

.social-link i {
  font-size: 24px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.social-link.linkedin {
  background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.social-link.facebook {
  background: linear-gradient(135deg, #1877f2 0%, #145dbf 100%);
}

.social-link.instagram {
  background: linear-gradient(135deg, #e4405f 0%, #c13584 50%, #833ab4 100%);
}

.social-link:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.social-link:hover::before {
  opacity: 1;
}

.social-link:hover i {
  transform: scale(1.1);
}

/* ========================================
   4. COMPACT CONSULTATION BUTTON
   ======================================== */

.consultation-btn-compact {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  /* أضف هذا السطر لجعل الزر لا يتداخل مع الاسم الطويل */
  max-width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-consultation-btn-small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #8865e1 0%, #6b46c1 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(136, 101, 225, 0.3);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.book-consultation-btn-small::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.book-consultation-btn-small:hover::before {
  left: 100%;
}

.book-consultation-btn-small:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 25px rgba(136, 101, 225, 0.4);
  background: linear-gradient(135deg, #9575e8 0%, #7c5dd1 100%);
}

.book-consultation-btn-small:active {
  transform: translateY(0) scale(1.01);
  box-shadow: 0 4px 15px rgba(136, 101, 225, 0.3);
}

.book-consultation-btn-small i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.book-consultation-btn-small:hover i {
  transform: scale(1.1) rotate(3deg);
}

.book-consultation-btn-small span {
  font-size: 13px;
  font-weight: 700;
}

/* ========================================
   5. SPEAKER STATS SECTION
   ======================================== */

.speaker-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  background: linear-gradient(135deg, rgba(136, 101, 225, 0.05) 0%, rgba(136, 101, 225, 0.1) 100%);
  border-radius: 16px;
  border: 1px solid rgba(136, 101, 225, 0.15);
  position: relative;
  overflow: hidden;
}

.speaker-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8865e1, #6b46c1);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #8865e1;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(136, 101, 225, 0.1);
}

.stat-label {
  font-size: 11px;
  color: #666;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(136, 101, 225, 0.3), transparent);
  margin: 0 15px;
}

/* ========================================
   6. CONTENT SECTIONS
   ======================================== */

/* Two Column Layout */
.two-column-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.about-text {
  color: #666;
  line-height: 1.7;
  font-size: 16px;
}

/* Help Section */
.help-section {
  margin-bottom: 40px;
}

.help-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(136, 101, 225, 0.05) 0%, rgba(136, 101, 225, 0.1) 100%);
  border-radius: 16px;
  border: 1px solid rgba(136, 101, 225, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.help-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #8865e1, #6b46c1);
  border-radius: 0 4px 4px 0;
}

.help-item:hover {
  transform: translateX(8px);
  background: linear-gradient(135deg, rgba(136, 101, 225, 0.1) 0%, rgba(136, 101, 225, 0.15) 100%);
  box-shadow: 0 8px 24px rgba(136, 101, 225, 0.2);
}

.help-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  letter-spacing: -0.01em;
}

/* Professional Experience */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.experience-item {
  display: flex;
  gap: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e0e0e0;
  align-items: flex-start;
}

.experience-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.experience-period {
  flex-shrink: 0;
  font-weight: 600;
  color: #8865e1;
  font-size: 14px;
  min-width: 120px;
  width: 120px;
}

.experience-details {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.experience-details h4 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  word-wrap: break-word;
  line-height: 1.4;
}

.experience-details p {
  color: #666;
  margin-bottom: 5px;
  font-size: 14px;
  word-wrap: break-word;
  line-height: 1.5;
}

/* ========================================
   7. TABS NAVIGATION
   ======================================== */

.content-tabs {
  margin: 40px;
}

.tab-buttons {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 30px;
}

.tab-button {
  background: none;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab-button.active {
  color: #8865e1;
  border-bottom-color: #8865e1;
}

.tab-button:hover {
  color: #8865e1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========================================
   8. EVENTS & COURSES CARDS
   ======================================== */

.content-box {
  background: rgba(249, 249, 249, 0.9);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Events Item */
.events_item {
  background: rgba(249, 249, 249, 0.9);
  margin-bottom: 30px;
  position: relative;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.events_item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(136, 101, 225, 0.2);
}

.events_item .thumb {
  position: relative;
  overflow: hidden;
}

.events_item .thumb img {
  height: 200px;
  object-fit: cover;
  margin-bottom: -5px;
}

.events_item .thumb span.category {
  position: absolute;
  left: 30px;
  top: 30px;
  font-size: 14px;
  text-transform: uppercase;
  color: #8865e1;
  background-color: rgba(250, 250, 250, 0.95);
  padding: 8px 20px;
  font-weight: 500;
  display: inline-block;
}

.events_item .thumb span.price {
  position: absolute;
  right: -30px;
  top: -50px;
  background-color: rgba(122, 106, 216, 0.95);
  width: 130px;
  height: 130px;
  display: inline-block;
  transition: all .3s;
  z-index: 3;
}

.events_item .thumb span.price h6 {
  margin-top: 72px;
  margin-left: 22px;
  font-size: 28px;
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
}

.events_item .thumb span.price em {
  font-size: 18px;
  font-weight: 500;
  font-style: normal;
  vertical-align: top;
}

.events_item:hover .thumb span.price {
  transform: scale(1.2);
}

/* Course Content */
.events_item .down-content {
  padding: 15px 25px 20px 25px;
}

.events_item .down-content h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.events_item:hover .down-content h4 {
  color: #8865e1;
}

/* Course Description */
.course-description {
  height: 60px;
  margin-bottom: 15px;
}

.course-description p {
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  margin: 0;
  height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Course Meta */
.course-meta {
  margin-bottom: 15px;
  padding: 12px 0;
  border-top: 1px solid rgba(136, 101, 225, 0.15);
  border-bottom: none !important;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.meta-item i {
  font-size: 20px;
  color: #8865e1;
}

.meta-item.voxels {
  color: #f39c12;
}

.meta-item.voxels i {
  color: #f39c12;
}

.meta-item.likes-count {
  color: #e74c3c;
}

.meta-item.likes-count i {
  color: #e74c3c;
  font-size: 20px;
}

/* Like Button */
.like-btn {
  width: 35px;
  height: 35px;
  background: rgba(136, 101, 225, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.like-btn i {
  font-size: 20px;
  color: #8865e1;
  transition: all 0.3s ease;
}

.like-btn:hover {
  background: #8865e1;
  transform: scale(1.1);
  border-color: #8865e1;
}

.like-btn:hover i {
  color: white;
}

.like-btn.liked {
  background: #e74c3c;
  border-color: #e74c3c;
}

.like-btn.liked i {
  color: white;
}

.like-btn.liked:hover {
  background: #c0392b;
  border-color: #c0392b;
}

/* Seats Warning */
.seats-warning {
  position: absolute;
  bottom: 15px;
  left: 20px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  animation: pulse 2s infinite;
  z-index: 5;
}

.seats-warning i {
  font-size: 14px;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }
}

/* ========================================
   9. ADDITIONAL COMPONENTS
   ======================================== */

/* Course Title Section */
.course-title-section {
  text-align: center;
  margin-bottom: 50px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.course-title-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.course-title-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 40px;
}

/* Courses Section */
.courses {
  margin-top: 160px;
}

.event_filter {
  text-align: center;
  background-color: #e9e1fe;
  padding: 15px 40px;
  list-style: none;
  margin: 0 auto 70px;
  max-width: max-content;
}

.event_filter li {
  display: inline-block;
  margin: 0px 20px;
}

.event_filter li a {
  font-size: 14px;
  font-weight: 500;
  color: #1e1e1e;
  transition: all .3s;
}

.event_filter li a.is_active,
.event_filter li a:hover {
  color: #8865e1;
}

/* Event Cards */
.event-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.event-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.event-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(136, 101, 225, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  transition: all 0.3s ease;
}

.play-button:hover {
  background: rgba(136, 101, 225, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

.event-info {
  padding: 20px;
}

.event-info h4 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.event-price {
  font-size: 20px;
  font-weight: 700;
  color: #8865e1;
  margin: 0;
}

/* ========================================
   10. RESPONSIVE DESIGN
   ======================================== */

/* Tablet Styles */
@media (max-width: 992px) {
  .header-area {
    padding: 15px 0;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 30px 20px;
    text-align: center;
  }

  .profile-main-info {
    margin-right: 0 !important;
  }

  .profile-image img {
    width: 200px !important;
    height: 200px !important;
  }

  .profile-name {
    font-size: 2.2rem;
  }

  .profile-title {
    font-size: 1.1rem;
  }

  .consultation-btn-compact {
    position: static;
    max-width: 100%;
    display: flex;
    justify-content: center;
  }

  .book-consultation-btn-small {
    padding: 14px 24px;
    font-size: 15px;
  }

  .speaker-stats {
    padding: 20px 25px;
  }

  .stat-number {
    font-size: 24px;
  }

  .stat-divider {
    height: 35px;
    margin: 0 10px;
  }

  .two-column-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .event-cards {
    grid-template-columns: 1fr;
  }

  .experience-item {
    flex-direction: column;
    gap: 10px;
  }

  .experience-period {
    min-width: auto;
    width: auto;
  }

  .experience-details {
    min-width: auto;
  }

  .rank-stats {
    flex-direction: column;
    gap: 20px;
  }

  .events_item .thumb img {
    height: 180px;
  }

  .meta-row {
    flex-direction: column;
    gap: 8px;
  }

  .meta-item {
    font-size: 12px;
  }

  .like-btn {
    width: 32px;
    height: 32px;
  }

  .like-btn i {
    font-size: 14px;
  }

  .events_item .down-content h4 {
    font-size: 18px;
  }

  .seats-warning {
    font-size: 11px;
    padding: 5px 10px;
    bottom: 10px;
    left: 15px;
  }

  .events_item .thumb span.price {
    width: 110px;
    height: 110px;
    right: -25px;
    top: -45px;
  }

  .events_item .thumb span.price h6 {
    margin-top: 62px;
    margin-left: 18px;
    font-size: 24px;
  }

  .speaker-avatar {
    width: 30px !important;
    height: 30px !important;
  }

  .course-title-section h1 {
    font-size: 2rem;
  }

  .content-box {
    padding: 20px;
  }
  .social-links {
    justify-content: center !important;
    text-align: center;
  }
}

/* Mobile Styles */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .main-nav {
    padding: 10px 15px;
  }

  .profile-header {
    padding: 25px 15px;
    gap: 25px;
  }

  .profile-image img {
    width: 150px !important;
    height: 150px !important;
  }

  .profile-name {
    font-size: 1.8rem;
  }

  .profile-title {
    font-size: 1rem;
  }

  .consultation-btn-compact {
    position: static;
    display: flex;
    justify-content: center;
  }

  .book-consultation-btn-small {
    padding: 10px 18px;
    font-size: 12px;
  }

  .book-consultation-btn-small i {
    font-size: 14px;
  }

  .book-consultation-btn-small span {
    font-size: 11px;
  }

  .speaker-stats {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
    margin: 0;
  }

  .tab-button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .events_item .thumb img {
    height: 160px;
  }

  .events_item .down-content {
    padding: 12px 20px 15px 20px;
  }

  .course-meta {
    padding: 10px 0;
  }

  .meta-item {
    font-size: 11px;
  }

  .meta-item i {
    font-size: 14px;
  }

  .like-btn {
    width: 30px;
    height: 30px;
  }

  .like-btn i {
    font-size: 13px;
  }

  .events_item .down-content h4 {
    font-size: 16px;
  }

  .speaker-info {
    gap: 8px;
  }

  .speaker-avatar {
    width: 28px !important;
    height: 28px !important;
  }

  .events_item .down-content span.author {
    font-size: 12px;
  }

  .course-title-section h1 {
    font-size: 1.5rem;
  }

  .course-title-section {
    padding: 20px;
  }
}