/* ===== CSS Variables ===== */
:root {
    /* Modern Vibrant Color Palette */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    --success-gradient: linear-gradient(135deg, #84cc16 0%, #65a30d 50%, #4d7c0f 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --sunset-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%);
    --ocean-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    --forest-gradient: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    --royal-gradient: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    --cosmic-gradient: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Fonts */
    --font-arabic: 'Cairo', 'Tajawal', 'Arial', sans-serif;
    --font-english: 'Poppins', 'Inter', 'Arial', sans-serif;
    
    /* Spacing */
    --container-padding: 1rem;
    --border-radius: 12px;
    --border-radius-large: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #475569;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-arabic);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-medium), color var(--transition-medium);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== Loading Animation ===== */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-medium);
}

.loading-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-family: var(--font-arabic);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 25%, #ec4899 50%, #f59e0b 75%, #10b981 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 0.8rem 0;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 100;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header-content {
    text-align: center;
    margin-bottom: 0.8rem;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.title-image {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform var(--transition-fast);
}

.title-image:hover {
    transform: scale(1.1);
}

.main-title {
    font-family: var(--font-arabic);
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    margin: 0;
}

.slogan {
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 0.4rem;
    font-style: italic;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

.subtitle {
    font-family: var(--font-english);
    font-size: 0.85rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 0.8px;
}


.search-container {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background: var(--secondary-gradient);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.search-btn:hover {
    transform: translateY(-2px);
}


/* ===== Main Content ===== */
.main-content {
    flex: 1;
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.section-title {
    font-family: var(--font-arabic);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* ===== Units Grid ===== */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.unit-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)), var(--unit-gradient, var(--primary-gradient));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--unit-gradient, var(--primary-gradient));
    transform: scaleX(0);
    transition: all var(--transition-medium);
}

.unit-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.unit-card:hover::before {
    transform: scaleX(1);
    height: 8px;
}

.unit-icon {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    background: var(--unit-gradient, var(--primary-gradient));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all var(--transition-fast);
}

.unit-card:hover .unit-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.unit-number {
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--unit-gradient, var(--secondary-gradient));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.3;
    transition: all var(--transition-fast);
}

.unit-card:hover .unit-number {
    transform: scale(1.05);
}

.unit-titles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.unit-title-arabic {
    font-family: var(--font-arabic);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.unit-title-english {
    font-family: var(--font-english);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unit-lessons-count {
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 500;
}

.unit-lessons-count i {
    color: var(--accent-gradient);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Promotional Banner ===== */
.promotional-banner {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 25%, #dc2626 50%, #7c3aed 75%, #8b5cf6 100%);
    background-size: 300% 300%;
    animation: bannerGlow 3s ease-in-out infinite alternate, gradientFlow 6s ease infinite;
    border-radius: var(--border-radius-large);
    margin: 3rem 0;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.3);
    position: relative;
    overflow: hidden;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.promotional-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: bannerShine 4s ease-in-out infinite;
}

.banner-content {
    position: relative;
    z-index: 2;
    color: white;
}

.banner-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
}

.banner-icon {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

.banner-title {
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    animation: slideInLeft 1s ease-out;
}

.banner-benefits {
    margin-bottom: 2rem;
}

.benefits-title {
    font-family: var(--font-arabic);
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-medium);
    animation: fadeInUp 0.8s ease-out;
}

.benefit-item:nth-child(1) { animation-delay: 0.1s; }
.benefit-item:nth-child(2) { animation-delay: 0.2s; }
.benefit-item:nth-child(3) { animation-delay: 0.3s; }
.benefit-item:nth-child(4) { animation-delay: 0.4s; }
.benefit-item:nth-child(5) { animation-delay: 0.5s; }

.benefit-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.benefit-number {
    font-size: 1.5rem;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.benefit-text {
    font-family: var(--font-arabic);
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
}

.banner-price {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: priceGlow 2s ease-in-out infinite alternate;
}

.price-tag {
    margin-bottom: 0.5rem;
}

.price-amount {
    font-family: var(--font-arabic);
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
    animation: pricePulse 1.5s ease-in-out infinite;
}

.price-period {
    font-family: var(--font-arabic);
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

.price-duration {
    font-family: var(--font-arabic);
    font-size: 1rem;
    opacity: 0.8;
    font-style: italic;
}

/* Banner Animations */
@keyframes bannerGlow {
    0% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.5); }
    100% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.8); }
}

@keyframes bannerShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes slideInLeft {
    0% { transform: translateX(-100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes priceGlow {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); }
}

@keyframes pricePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== Lessons Grid ===== */
.lessons-view {
    animation: fadeInUp var(--transition-medium);
}

.lessons-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-btn {
    background: var(--secondary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.lesson-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)), var(--accent-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all var(--transition-medium);
}

.lesson-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.2);
}

.lesson-title-container {
    padding: 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    text-align: center;
}

.lesson-title-arabic {
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lesson-title-english {
    font-family: var(--font-english);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.3;
    font-style: italic;
    letter-spacing: 0.5px;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #000;
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
    transition: transform var(--transition-fast);
}

.video-container iframe:hover {
    transform: scale(1.02);
}

/* Loading state for videos */
.video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.video-container.loading::before {
    opacity: 1;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Teacher Profile Section */
.teacher-profile {
    background: var(--bg-card);
    border-radius: var(--border-radius-large);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.teacher-avatar {
    flex-shrink: 0;
}

.avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.teacher-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-medium);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
}

.teacher-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-large);
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    position: absolute;
    top: 0;
    left: 0;
}

.avatar-text {
    font-family: var(--font-arabic);
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.teacher-details {
    flex: 1;
}

.teacher-name {
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.teacher-title {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.teacher-description {
    margin-bottom: 2rem;
}

.teacher-description p {
    font-family: var(--font-arabic);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    text-align: justify;
}

.teacher-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.stat-number {
    font-family: var(--font-english);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gradient);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Social Media Section ===== */
.social-section {
    margin: 2rem 0;
    text-align: center;
}

.social-title {
    font-family: var(--font-arabic);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-small);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.social-icon:hover::before {
    left: 100%;
}

.social-icon i {
    font-size: 1.3rem;
    color: white;
    z-index: 1;
}

/* Social Icon Colors */
.social-icon.facebook {
    background: linear-gradient(135deg, #1877f2, #0d47a1);
}

.social-icon.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #e4405f, #833ab4, #fd1d1d);
}

.social-icon.email {
    background: linear-gradient(135deg, #ea4335, #d93025);
}

.social-icon.phone {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.social-icon.tiktok {
    background: linear-gradient(135deg, #000000, #ff0050);
}

/* Hover Effects */
.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-large);
}

.social-icon.facebook:hover {
    background: linear-gradient(135deg, #0d47a1, #1877f2);
}

.social-icon.youtube:hover {
    background: linear-gradient(135deg, #cc0000, #ff0000);
}

.social-icon.instagram:hover {
    background: linear-gradient(135deg, #833ab4, #e4405f);
}

.social-icon.email:hover {
    background: linear-gradient(135deg, #d93025, #ea4335);
}

.social-icon.phone:hover {
    background: linear-gradient(135deg, #128c7e, #25d366);
}

.social-icon.tiktok:hover {
    background: linear-gradient(135deg, #ff0050, #000000);
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    font-family: var(--font-english);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* ===== Floating WhatsApp Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all var(--transition-medium);
    z-index: 1000;
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-float i {
    font-size: 1.8rem;
    color: white;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    background: #128C7E;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    pointer-events: none;
    z-index: 1001;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* WhatsApp Button Animation */
@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.8), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn var(--transition-medium);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive Design ===== */

/* Large screens */
@media (min-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .units-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
    .lessons-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Tablets */
@media (max-width: 768px) {
    .title-container {
        gap: 0.5rem;
    }
    
    .title-image {
        width: 30px;
        height: 30px;
    }
    
    .main-title {
        font-size: 1.3rem;
    }
    
    .slogan {
        font-size: 0.9rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .units-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .unit-card {
        padding: 1.8rem;
        gap: 0.9rem;
    }
    
    .unit-icon {
        font-size: 3rem;
    }
    
    .unit-number {
        font-size: 1.6rem;
    }
    
    .unit-title-arabic {
        font-size: 1.2rem;
        font-weight: 700;
    }
    
    .unit-title-english {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .lessons-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .back-btn {
        align-self: flex-start;
    }
    
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 1rem;
        left: 1rem;
    }
    
    .whatsapp-float i {
        font-size: 1.6rem;
    }
    
    .whatsapp-tooltip {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Teacher Profile Tablet */
    .teacher-profile {
        padding: 2rem;
    }
    
    /* Promotional Banner Tablet */
    .promotional-banner {
        margin: 2rem 0;
        padding: 1.5rem;
    }
    
    .banner-title {
        font-size: 1.5rem;
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .benefit-item {
        padding: 0.8rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .teacher-info {
        gap: 1rem;
    }
    
    .avatar-container {
        width: 70px;
        height: 70px;
    }
    
    .teacher-image {
        width: 70px;
        height: 70px;
    }
    
    .avatar-placeholder {
        width: 70px;
        height: 70px;
    }
    
    .avatar-text {
        font-size: 1.8rem;
    }
    
    .teacher-name {
        font-size: 1.6rem;
    }
    
    .teacher-description p {
        font-size: 0.95rem;
    }
    
    .teacher-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    /* Social Media Tablet */
    .social-section {
        margin: 1.5rem 0;
    }
    
    .social-title {
        font-size: 1.2rem;
    }
    
    .social-icons {
        gap: 1.2rem;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
    }
    
    .social-icon i {
        font-size: 1.2rem;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .title-container {
        gap: 0.4rem;
        flex-direction: column;
    }
    
    .title-image {
        width: 28px;
        height: 28px;
    }
    
    .main-title {
        font-size: 1.1rem;
        line-height: 1.2;
    }
    
    .slogan {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .header {
        padding: 0.8rem 0;
    }
    
    .header-content {
        margin-bottom: 0.8rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-input {
        border-radius: var(--border-radius);
    }
    
    .search-btn {
        border-radius: var(--border-radius);
        padding: 0.75rem;
    }
    
    .units-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .unit-card {
        padding: 1.5rem;
        gap: 0.8rem;
    }
    
    .unit-icon {
        font-size: 2.8rem;
    }
    
    .unit-number {
        font-size: 1.4rem;
    }
    
    .unit-title-arabic {
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    .unit-title-english {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .lessons-grid {
        gap: 1rem;
    }
    
    .lesson-title-container {
        padding: 1.5rem;
        gap: 0.6rem;
    }
    
    .lesson-title-arabic {
        font-size: 1.5rem;
        font-weight: 800;
    }
    
    .lesson-title-english {
        font-size: 1.2rem;
        font-weight: 700;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    /* Teacher Profile Mobile */
    .teacher-profile {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .teacher-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .avatar-container {
        width: 60px;
        height: 60px;
    }
    
    .teacher-image {
        width: 60px;
        height: 60px;
    }
    
    .avatar-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .avatar-text {
        font-size: 1.5rem;
    }
    
    .teacher-name {
        font-size: 1.5rem;
    }
    
    .teacher-title {
        font-size: 1rem;
    }
    
    .teacher-description p {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .teacher-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Promotional Banner Mobile */
    .promotional-banner {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    .banner-header {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .banner-icon {
        font-size: 2rem;
    }
    
    .banner-title {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .benefits-title {
        font-size: 1.2rem;
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .benefit-item {
        padding: 0.6rem;
        flex-direction: column;
        text-align: center;
        gap: 0.4rem;
    }
    
    .benefit-number {
        font-size: 1.2rem;
    }
    
    .benefit-text {
        font-size: 0.9rem;
    }
    
    .banner-price {
        padding: 1rem;
    }
    
    .price-amount {
        font-size: 1.8rem;
    }
    
    .price-period {
        font-size: 1rem;
    }
    
    .price-duration {
        font-size: 0.9rem;
    }
    
    /* Social Media Mobile */
    .social-section {
        margin: 1.2rem 0;
    }
    
    .social-title {
        font-size: 1.1rem;
    }
    
    .social-icons {
        gap: 1rem;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
    }
    
    .social-icon i {
        font-size: 1.1rem;
    }
    
    /* WhatsApp Button Mobile */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        left: 1rem;
    }
    
    .whatsapp-float i {
        font-size: 1.4rem;
    }
    
    .whatsapp-tooltip {
        display: none; /* Hide tooltip on very small screens */
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1.2rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .main-title {
        font-size: 1.4rem;
    }
    
    .slogan {
        font-size: 0.9rem;
    }
    
    .unit-card {
        padding: 1rem;
    }
    
    .lesson-title-container {
        padding: 1.2rem;
        gap: 0.5rem;
    }
    
    .lesson-title-arabic {
        font-size: 1.3rem;
        font-weight: 800;
    }
    
    .lesson-title-english {
        font-size: 1rem;
        font-weight: 700;
    }
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .footer,
    .theme-toggle,
    .whatsapp-float,
    .back-btn,
    .search-container {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .unit-card,
    .lesson-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
