/* ========================================
   صفحة السيرة الذاتية - cv.html
   ======================================== */

/* المتغيرات */
:root {
  --gov-primary: #0D2D4A;
  --gov-secondary: #1A4971;
  --text-dark: #1A202C;
  --text-medium: #4A5568;
  --text-light: #FFFFFF;
  --bg-white: #FFFFFF;
  --bg-light: #F7FAFC;
  --border-light: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #1e3a5f;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gov-primary), var(--gov-secondary));
  border-radius: 10px;
  border: 2px solid #0a1929;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gov-secondary), var(--gov-primary));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--gov-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

p {
  color: var(--text-medium);
  margin-bottom: 1rem;
}

a {
  color: var(--gov-primary);
  text-decoration: none;
  transition: all 0.3s;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* شريط التنقل */
.navbar {
  background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-secondary) 100%);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand h2 {
  color: var(--text-light);
  margin: 0;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.nav-menu a:hover {
  color: var(--text-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-light);
  margin: 3px 0;
}

/* قسم السيرة الذاتية */
.cv-section {
  padding: 3rem 0;
}

/* CV Header - قسم الرأس المميز */
.cv-header {
  background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-secondary) 100%);
  color: var(--text-light);
  padding: 4rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.cv-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".1" fill="%23fff"/></svg>');
  background-size: cover;
  opacity: 0.1;
}

.cv-header-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.cv-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.cv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.cv-avatar svg {
  width: 100px;
  height: 100px;
  stroke: rgba(255,255,255,0.8);
  position: relative;
  z-index: 1;
}

.cv-avatar.has-photo svg {
  display: none;
}

.cv-header-info {
  flex: 1;
}

.cv-name {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.cv-title {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
  font-weight: 500;
}

.cv-summary {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  max-width: 700px;
}

.cv-contact-quick {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.cv-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
}

.cv-contact-item svg {
  width: 20px;
  height: 20px;
}

/* بطاقات السيرة الذاتية */
.cv-card {
  background: var(--bg-white);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.cv-card:hover {
  box-shadow: 0 8px 24px rgba(13, 45, 74, 0.1);
  transform: translateY(-2px);
}

.cv-card h2 {
  color: var(--gov-primary);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--gov-primary);
}

.cv-card h2 svg {
  stroke: var(--gov-primary);
}

.cv-card h3,
.cv-card h4 {
  color: var(--gov-primary);
}

.cv-card p {
  color: var(--text-medium);
}

.cv-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255,255,255,0.2);
}

.cv-card-header i {
  font-size: 2rem;
}

.cv-card-title {
  font-size: 1.5rem;
  margin: 0;
}

/* Timeline للخبرات */
.timeline {
  position: relative;
  padding-right: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gov-primary), var(--gov-secondary));
}

/* عناصر الخبرة */
.experience-item,
.education-item {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  border-right: 4px solid var(--gov-secondary);
  position: relative;
  transition: all 0.3s ease;
}

.experience-item::before {
  content: '';
  position: absolute;
  right: -2.75rem;
  top: 2rem;
  width: 16px;
  height: 16px;
  background: var(--gov-primary);
  border: 4px solid var(--bg-white);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--gov-secondary);
}

.experience-item:hover,
.education-item:hover {
  transform: translateX(-8px);
  box-shadow: 0 8px 24px rgba(13, 45, 74, 0.15);
  border-right-color: var(--gov-primary);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.experience-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gov-primary);
}

.experience-company {
  color: var(--gov-secondary);
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.experience-company::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gov-secondary);
  border-radius: 50%;
}

.experience-period {
  background: linear-gradient(135deg, var(--gov-primary), var(--gov-secondary));
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  white-space: nowrap;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.experience-period svg {
  width: 16px;
  height: 16px;
}

.experience-description {
  color: var(--text-medium);
  line-height: 1.8;
  font-size: 1rem;
}

.experience-description ul {
  margin: 0.5rem 0;
  padding-right: 1.5rem;
}

.experience-description li {
  margin-bottom: 0.5rem;
}

/* المهارات */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 991px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

.skill-item {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border-light);
  transition: all 0.3s;
}

.skill-item:hover {
  border-color: var(--gov-primary);
  box-shadow: 0 8px 24px rgba(13, 45, 74, 0.1);
  transform: translateY(-4px);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.skill-name {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--gov-primary);
}

.skill-level {
  font-size: 0.875rem;
  color: var(--gov-secondary);
  font-weight: 600;
}

.skill-progress {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
}

.skill-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gov-primary), var(--gov-secondary));
  border-radius: 1rem;
  transition: width 1s ease;
  position: relative;
}

.skill-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* الشارات */
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--gov-primary), var(--gov-secondary));
  color: var(--text-light);
  border-radius: 2rem;
  font-size: 0.875rem;
  margin: 0.25rem;
  font-weight: 600;
  transition: all 0.3s;
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 45, 74, 0.3);
}

/* Personal Info Grid */
.personal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 991px) {
  .personal-info-grid {
    grid-template-columns: 1fr;
  }
}

.info-card {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 1rem;
  border-right: 4px solid var(--gov-secondary);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateX(-5px);
  box-shadow: 0 8px 20px rgba(13, 45, 74, 0.12);
  border-right-color: var(--gov-primary);
}

.info-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gov-primary), var(--gov-secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 45, 74, 0.2);
}

.info-icon svg {
  stroke: white;
}

.info-content {
  flex: 1;
}

.info-content strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-medium);
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-content span {
  font-size: 1.125rem;
  color: var(--text-dark);
  font-weight: 600;
}

/* Bio Section */
.bio-section {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 1rem;
  border-right: 4px solid var(--gov-primary);
}

.bio-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bio-header svg {
  stroke: var(--gov-primary);
}

.bio-header h3 {
  color: var(--gov-primary);
  margin: 0;
}

.bio-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-medium);
}

/* Education Grid */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 991px) {
  .education-grid {
    grid-template-columns: 1fr;
  }
}

/* التذييل */
.footer {
  background: linear-gradient(135deg, var(--gov-primary) 0%, #0a1f33 100%);
  color: var(--text-light);
  padding: 3rem 0 1rem;
  margin-top: auto;
}

.footer h1, .footer h2, .footer h3, .footer h4 {
  color: var(--text-light);
}

.footer p, .footer a {
  color: rgba(255,255,255,0.9);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

/* استجابة الموبايل */
@media (max-width: 767px) {
  .nav-menu {
    position: fixed;
    right: -100%;
    top: 60px;
    flex-direction: column;
    background: var(--gov-primary);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem 0;
    z-index: 999;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .cv-header-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .cv-avatar {
    width: 150px;
    height: 150px;
  }
  
  .cv-name {
    font-size: 2rem;
  }
  
  .cv-title {
    font-size: 1.25rem;
  }
  
  .cv-contact-quick {
    justify-content: center;
  }
  
  .cv-card {
    padding: 1.5rem;
  }
  
  .timeline {
    padding-right: 1.5rem;
  }
  
  .timeline::before {
    width: 2px;
  }
  
  .experience-item::before {
    right: -2.25rem;
    width: 12px;
    height: 12px;
  }
  
  .experience-header {
    flex-direction: column;
  }
  
  .experience-period {
    margin-top: 0.5rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .info-content span {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* للأجهزة الصغيرة جداً */
@media (max-width: 480px) {
  .info-content span {
    font-size: 0.8rem;
  }
  
  .info-card {
    padding: 0.75rem;
  }
  
  .info-icon {
    width: 35px;
    height: 35px;
    min-width: 35px;
  }
  
  .info-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* للأجهزة الصغيرة للغاية */
@media (max-width: 360px) {
  .info-content span {
    font-size: 0.75rem;
  }
  
  .info-content strong {
    font-size: 0.7rem;
  }
  
  .info-card {
    padding: 0.6rem;
    gap: 0.5rem;
  }
  
  .info-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  
  .info-icon svg {
    width: 14px;
    height: 14px;
  }
}
