/* 
 * main.css - أويا أكاديمي
 * ملف التنسيق الرئيسي للموقع
 */

:root {
    /* الألوان الأساسية */
    --primary-color: #8E1751;
    --primary-color-rgb: 142, 23, 81;
    --primary-light: #BD3A77;
    --primary-dark: #5D0F35;
    --primary-gradient: linear-gradient(to left, var(--primary-color), var(--primary-dark));
    --secondary-color: #BD3A77;
    --accent-color: #FFCC70;
    --accent-light: #FFE7A0;
    --light-color: #f8f9fa;
    --dark-color: #5D0F35;
    --text-color: #8E1751;
    --light-text: #777;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --card-shadow: 0 3px 15px rgba(142, 23, 81, 0.1);
    --hover-shadow: 0 8px 25px rgba(142, 23, 81, 0.15);
    --font-family-sans-serif: 'Tajawal', sans-serif;
    --body-bg: #FCFEFF;
    --body-color: var(--text-color);
    --header-height: 80px;
    /* ألوان الإعلانات */
    --ad-primary-color: #8E1751;
    --ad-accent-color: #FFD166;
    --ad-secondary-color: #06D6A0;
    /* المسافات */
    --section-padding: 4rem 0;
    --card-padding: 1.5rem;
}

/* تنسيقات عامة */
body {
    font-family: 'Tajawal', sans-serif !important;
    background-color: #f8f9fa;
    padding-top: var(--header-height);
    direction: rtl;
    text-align: right;
    color: #333;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* تنسيق رأس الصفحة */
.section-banner {
    background: linear-gradient(to left, var(--primary-color), var(--primary-dark));
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    color: white;
}

.section-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(rgba(255, 255, 255, 0.1), transparent 70%);
    z-index: 1;
}

.section-banner-content {
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
}

.section-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* تنسيق البريدكرامب */
.section-breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.breadcrumb-item a:hover {
    color: white;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
    content: "/";
    float: right;
    padding: 0 8px;
}

/* تنسيق الحاوية الرئيسية */
.main-container {
    background: white;
    border-radius: 20px;
    margin: 20px auto;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
}

/* تنسيق الأزرار */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #8F164F, #a50079);
    color: white;
    box-shadow: 0 4px 15px rgba(142, 23, 81, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a50079, #8F164F);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(143, 22, 79, 0.3);
    color: white;
}

.btn-secondary {
    background: rgba(142, 23, 81, 0.1);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: #856404;
    box-shadow: 0 4px 15px rgba(255, 204, 112, 0.3);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 204, 112, 0.4);
    color: #856404;
}

/* تنسيق التنبيهات */
.alert {
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-right: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-right: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
    border-right: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-right: 4px solid #17a2b8;
}

/* تنسيق النماذج */
.form-group {
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-actions { animation-delay: 0.6s; }

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--primary-color);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: 'Tajawal', sans-serif;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(142, 23, 81, 0.25);
    background: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f1f3f4;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* تنسيق الصور والأيقونات */
.user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 1rem;
}

/* تنسيق Footer */
.footer-section {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    background: white;
}

.back-to-top {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(142, 23, 81, 0.2);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(142, 23, 81, 0.3);
    color: white;
    text-decoration: none;
}

/* تأثيرات الحركة */
.animated {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        padding: 20px;
    }

    .section-banner {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .user-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

/* أنماط حاويات الإعلانات */
.ad-section {
  position: relative;
  overflow: hidden;
  margin: 50px 0;
}

.ad-section.bg-light {
  background-color: #f8f9fa;
  border-top: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 40px 0;
}

.ad-container {
  position: relative;
  width: 100%;
}

.ad-container-full {
  width: 100%;
  max-width: 100%;
}

/* تحسين ظهور الإعلانات */
.ad-section .ad-banner {
  transform: translateY(0);
  transition: all 0.5s ease;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  margin: 0;
  min-height: 250px;
}

.ad-section .ad-banner:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* تحسين ظهور الإعلانات في الموبايل */
@media (max-width: 768px) {
  .ad-container .ad-content {
    flex-direction: column;
    text-align: center;
    padding: 30px 15px;
  }
  
  .ad-container .ad-image {
    margin-left: 0;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    min-height: 180px;
  }
  
  .ad-section .ad-banner {
    margin: 0;
    min-height: 200px;
  }
}
