:root {
  --bg: #0b1020;
  --card: #121835;
  --muted: #8ea0c9;
  --text: #eef3ff;
  --acc: #4f7cff;
  --acc2: #22c55e;
  --acc3: #ff6b4f;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Tajawal", system-ui;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* أنماط إضافية للنماذج */
.contact-form {
    margin-top: 40px;
    padding: 24px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--acc);
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #31447f;
    border-radius: 8px;
    background: #0f1530;
    color: var(--text);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--acc);
    box-shadow: 0 0 0 2px rgba(79, 124, 255, 0.2);
}

/* أنماط للرسائل الناجحة والخطأ */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

/* تحسينات للاستجابة */
@media (max-width: 768px) {
    .contact-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
}

/* Header Styles */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.8s ease forwards;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--acc), #7aa5ff);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.logo:hover {
  transform: rotate(15deg);
}

.logo i {
  font-size: 22px;
  color: #fff;
}

.brand h1 {
  font-size: 20px;
  margin: 0;
}

.brand small {
  color: var(--muted);
}

nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.8s ease 0.2s forwards;
}

nav a {
  padding: 10px 14px;
  background: #0f1530;
  border-radius: 12px;
  color: #cfe0ff;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79, 124, 255, 0.2), transparent);
  transition: left 0.5s;
}

nav a:hover::before {
  left: 100%;
}

nav a:hover {
  background: #1a2340;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 60px 0;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.4s forwards;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 124, 255, 0.1) 0%, transparent 70%);
  z-index: -1;
}

.hero h2 {
  font-size: 42px;
  margin: 0 0 10px;
  background: linear-gradient(to right, #eef3ff, #7aa5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: #c7d6ff;
  font-size: 18px;
  margin: 0 0 18px;
  max-width: 600px;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(79, 124, 255, 0.1);
  border-radius: 12px;
  transition: var(--transition);
}

.contact-item:hover {
  background: rgba(79, 124, 255, 0.2);
  transform: translateY(-3px);
}

.contact-item i {
  color: var(--acc);
  font-size: 20px;
}

.btn {
  padding: 12px 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: none;
  font-family: inherit;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.btn:hover::before {
  transform: translateY(0);
}

.btn.primary {
  background: var(--acc);
  color: #fff;
  box-shadow: 0 4px 15px rgba(79, 124, 255, 0.3);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 124, 255, 0.4);
}

.btn.secondary {
  background: #101738;
  color: #d7e6ff;
}

.btn.secondary:hover {
  background: #1a2340;
  transform: translateY(-3px);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin: 30px 0;
  border-radius: 16px;
  background: #0f1530;
  padding: 8px;
  max-width: max-content;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
}

.tab-btn.active {
  background: var(--acc);
  color: white;
  box-shadow: 0 4px 10px rgba(79, 124, 255, 0.3);
}

/* Programs */
.programs {
  margin: 40px 0;
}

.program {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.program.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.program-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1e2a52;
}

.program-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: var(--shadow);
}

.poscof .program-icon {
  background: linear-gradient(135deg, var(--acc), #7aa5ff);
}

.posshop .program-icon {
  background: linear-gradient(135deg, var(--acc3), #ff9e8d);
}

/* Grid & Cards */
.grid {
  display: grid;
  gap: 18px;
}

.pricing {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.05) 0%, transparent 100%);
  z-index: -1;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: #bcd1ff;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.price {
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(to right, #eef3ff, #7aa5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.unit {
  font-size: 14px;
  color: #a6b9f3;
}

.tag {
  background: #123b22;
  color: #a7f3c0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  align-self: flex-start;
}

.plan ul {
  list-style: none;
  padding: 0;
  flex-grow: 1;
}

.plan ul li {
  padding: 8px 0;
  position: relative;
  padding-right: 25px;
}

.plan ul li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--acc2);
  font-weight: bold;
}

.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* Contact Section */
.contact {
  margin-top: 40px;
  padding: 24px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(30px);
}

.contact h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

/* Footer */
.footer {
  margin-top: 60px;
  padding: 18px 0;
  color: #9fb3e9;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px dashed #31447f;
  opacity: 0;
  transform: translateY(20px);
}

/* Legal Section */
.legal {
  margin-top: 40px;
  padding: 24px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(30px);
}

.legal h3 {
  color: var(--acc);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal h3 i {
  color: var(--acc2);
}

.legal-content {
  color: #bcd1ff;
  line-height: 1.8;
}

.legal-content p {
  margin-bottom: 15px;
}

.legal-list {
  list-style-type: none;
  padding: 0;
  margin: 15px 0;
}

.legal-list li {
  padding: 8px 0;
  position: relative;
  padding-right: 25px;
}

.legal-list li::before {
  content: '•';
  position: absolute;
  right: 0;
  color: var(--acc);
  font-size: 20px;
  line-height: 1;
}

.copyright-badge {
  background: rgba(79, 124, 255, 0.1);
  padding: 12px 18px;
  border-radius: 12px;
  margin-top: 20px;
  border-left: 4px solid var(--acc);
  display: flex;
  align-items: center;
  gap: 10px;
}

.copyright-badge i {
  color: var(--acc2);
  font-size: 20px;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* أنماط قسم الفيديوهات التعليمية */
.tutorials-section {
    margin: 60px 0;
    padding: 30px 0;
}

.tutorials-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--acc);
}

.tutorials-section > p {
    color: var(--muted);
    margin-bottom: 30px;
    font-size: 18px;
    max-width: 800px;
}

.videos-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--card);
    border: 1px solid #31447f;
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 14px;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--acc);
    border-color: var(--acc);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: calc(var(--delay) * 0.1s);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(79, 124, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.play-btn:hover {
    background: var(--acc);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-btn i {
    color: white;
    font-size: 20px;
    margin-left: 3px;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--text);
}

.video-info p {
    color: var(--muted);
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.video-program {
    display: inline-block;
    background: rgba(79, 124, 255, 0.1);
    color: var(--acc);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.no-videos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.no-videos i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #4f7cff;
}

/* نافذة عرض الفيديو */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: var(--card);
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: none;
    border: none;
}

.close:hover {
    color: white;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-top: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* تحسينات للاستجابة على الأجهزة المحمولة */
@media (max-width: 980px) {
    .pricing {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .contact-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .videos-filter {
        justify-content: center;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .tabs {
        flex-direction: column;
        width: 100%;
    }
    
    .contact-info {
        flex-direction: column;
    }
    
    .legal-content {
        font-size: 14px;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .video-thumbnail {
        height: 160px;
    }
}