/* === ENHANCED CSS VARIABLES SYSTEM === */
:root {
    /* === ENHANCED COLOR SYSTEM === */
    /* Primary Colors */
    --primary: #5E35B1;
    --primary-light: #9575CD;
    --primary-dark: #4527A0;
    --secondary: #3949AB;
    --secondary-light: #7986CB;
    --secondary-dark: #283593;
    --accent: #FF7043;
    --accent-light: #FFAB91;
    --accent-dark: #D84315;
    
    /* Background & Surface Colors */
    --background: #F5F5F5;
    --card-bg: #FAFAFA;
    --input-bg: #FFFFFF;
    --modal-backdrop: rgba(0, 0, 0, 0.5);
    
    /* Text Colors */
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-color: #E0E0E0;
    
    /* Status Colors */
    --success: #4CAF50;
    --success-bg: #E8F5E8;
    --success-color: #2E7D32;
    --warning: #FF9800;
    --warning-bg: #FFF3E0;
    --warning-color: #F57C00;
    --error: #F44336;
    --error-bg: #FFEBEE;
    --error-color: #C62828;
    --info: #2196F3;
    --info-bg: #E3F2FD;
    --info-color: #1565C0;
    
    /* RGB Values for rgba() usage */
    --primary-rgb: 94, 53, 177;
    --secondary-rgb: 57, 73, 171;
    --accent-rgb: 255, 112, 67;
    --success-rgb: 76, 175, 80;
    --error-rgb: 244, 67, 54;
    
    /* === SPACING SYSTEM === */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 0.75rem;   /* 12px */
    --space-base: 1rem;    /* 16px */
    --space-lg: 1.25rem;   /* 20px */
    --space-xl: 1.5rem;    /* 24px */
    --space-2xl: 2rem;     /* 32px */
    --space-3xl: 2.5rem;   /* 40px */
    --space-4xl: 3rem;     /* 48px */
    --space-5xl: 4rem;     /* 64px */
    
    /* === BORDER RADIUS SYSTEM === */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 15px;
    --radius-3xl: 20px;
    --radius-4xl: 25px;
    --radius-5xl: 30px;
    --radius-full: 50px;
    --radius-circle: 50%;
    
    /* === TYPOGRAPHY SYSTEM === */
    --font-family-base: 'Cairo', sans-serif;
    --font-family-mono: 'Courier New', monospace;
    
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */
    --font-size-6xl: 3.75rem;   /* 60px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* === SHADOW SYSTEM === */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-base: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-primary: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    --shadow-primary-lg: 0 10px 25px rgba(var(--primary-rgb), 0.2);
    
    /* === TRANSITION SYSTEM === */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-all: all 0.3s ease;
    --transition-transform: transform 0.3s ease;
    --transition-colors: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    
    /* === Z-INDEX SYSTEM === */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 1000;
    --z-modal: 1001;
    --z-popover: 1002;
    --z-tooltip: 1003;
    --z-navbar: 1050;
    --z-maximum: 9999;
    
    /* === GRADIENTS === */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-primary-light: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    --gradient-bg: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.1));
    --gradient-bg-subtle: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03), rgba(var(--secondary-rgb), 0.03));
    --gradient-bg-strong: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--secondary-rgb), 0.15));
}

[data-theme="dark"] {
    /* Dark Mode Color Overrides */
    --primary: #7E57C2;
    --primary-light: #9575CD;
    --primary-dark: #311B92;
    --secondary: #536DFE;
    --secondary-light: #7986CB;
    --secondary-dark: #1A237E;
    --accent: #FF8A65;
    --accent-light: #FFAB91;
    --accent-dark: #BF360C;
    --background: #121212;
    --card-bg: #1E1E1E;
    --input-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #FFFFFF;
    --text-secondary: #BDBDBD;
    --border-color: #424242;
    --primary-rgb: 126, 87, 194;
    --secondary-rgb: 83, 109, 254;
    --accent-rgb: 255, 138, 101;
}

/* === GLOBAL STYLES === */
body {
    font-family: var(--font-family-base);
    padding-top: 0;
    background-color: var(--background);
    color: var(--text-primary);
    transition: var(--transition-all);
    line-height: 1.6;
}

/* === LOADER STYLES === */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-maximum);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-circle);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s infinite;
}

.loader-content {
    color: white;
    font-size: var(--font-size-2xl);
    animation: bounce 1s infinite;
}

.theme-toggle {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-circle);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: var(--transition-all);
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}


.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* === HERO SECTION === */
.hero-section {
    position: relative;
    overflow: hidden;
    background: var(--gradient-bg);
    padding: 120px 0 var(--space-5xl);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: var(--radius-circle);
    filter: blur(40px);
    opacity: 0.4;
    animation: float 8s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-light);
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}
/* Hero section desktop text alignment for Arabic */
@media (min-width: 992px) {
    .hero-content {
        text-align: right; /* Right-align for Arabic */
        direction: rtl;
    }
    
    .hero-content h1,
    .hero-content p {
        text-align: right;
    }
}

/* Keep centered on mobile */
@media (max-width: 991px) {
    .hero-content {
        text-align: center;
    }
}


.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    line-height: 1.2;
}

.hero-title .highlight {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: var(--font-size-6xl);
    margin-bottom: var(--space-sm);
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    margin-top: var(--space-base);
    display: block;
    line-height: 1.4;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
    flex-wrap: wrap;
}

.cta-button {
    padding: var(--space-base) var(--space-2xl);
    border-radius: var(--radius-xl);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    transition: var(--transition-all);
    position: relative;
    overflow: visible;
    border: none;
    cursor: pointer;
}


.cta-button.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary-lg);
    color: white;
}

.cta-button.secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cta-button.secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}
.cta-button.tertiary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.cta-button.tertiary:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-3px);
}

.new-badge {
    position: absolute;
    top: -6px;
    left: 8px;
    background: var(--accent);
    color: white;
    font-size: var(--font-size-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-bold);
    animation: pulse 2s infinite;
    z-index: 10;
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    padding: var(--space-2xl);
}

.hero-image-container {
    position: relative;
    width: 450px;
    height: 550px;
    margin: 0 auto;
}

.hero-image-shape {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-image-clip {
    position: absolute;
    inset: 0;
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    background: var(--gradient-primary);
    padding: 5px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
}

.hero-image-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    background: var(--gradient-primary);
    opacity: 0.3;
    z-index: -1;
    /*animation: borderRotate 8s linear infinite;*/
}

.hero-image-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.decoration-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(var(--primary-rgb), 0.1);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: var(--font-size-2xl);
    animation: float 6s infinite ease-in-out;
}

.item-1 {
    top: 10%;
    right: -25px;
    animation-delay: 0s;
}

.item-2 {
    bottom: 20%;
    left: -25px;
    animation-delay: 2s;
}

.item-3 {
    top: 50%;
    right: -25px;
    animation-delay: 4s;
}

/* === SECTION STYLES === */
.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-base);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-line {
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    margin: var(--space-base) auto;
    border-radius: var(--radius-sm);
}

/* === ABOUT SECTION === */
.about-section {
    padding: var(--space-5xl) 0;
    background: var(--background);
}

.content-block {
    padding: var(--space-2xl);
}

.feature-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-base);
}

.feature-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.feature-list i {
    color: var(--primary);
    font-size: var(--font-size-lg);
}

/* Smart Card */
.smart-card-container {
    perspective: 1000px;
    padding: var(--space-2xl);
    display: flex; /* Add this */
    flex-direction: column; /* Add this */
    align-items: center; /* Add this */
}

.smart-card {
    width: 100%; /* Make it responsive */
    max-width: 350px; /* Set the maximum width */
    height: auto; /* Allow height to adjust */
    aspect-ratio: 350 / 220; /* Maintain the aspect ratio */
    margin: 0 auto;
    position: relative;
}

.smart-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.smart-card:hover .smart-card-inner,
.smart-card.flipped .smart-card-inner {
    transform: rotateY(180deg);
}

.smart-card-front,
.smart-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.smart-card-back {
    transform: rotateY(180deg);
}

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

.flip-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-base);
    border-radius: var(--radius-md);
    margin-top: var(--space-base);
    cursor: pointer;
    transition: var(--transition-all);
}

.flip-button:hover {
    background: var(--primary-dark);
}

/* Attendance Stats */
.attendance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.stat-card {
    background: var(--card-bg);
    padding: var(--space-xl);
    border-radius: var(--radius-2xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-all);
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: var(--font-size-3xl);
    color: var(--primary);
    margin-bottom: var(--space-base);
}

.stat-card h4 {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
    font-weight: var(--font-weight-semibold);
}

.stat-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* Notification Preview */
.notification-preview {
    padding: var(--space-2xl);
}

.whatsapp-message {
    background: #25D366;
    color: white;
    padding: var(--space-xl);
    border-radius: var(--radius-2xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
}

.message-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-base);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.message-content p {
    margin: var(--space-sm) 0;
    line-height: 1.6;
}

/* Books Section */
.books-section {
    padding: var(--space-4xl) 0;
}

.book-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-all);
    cursor: pointer;
    height: auto;
    min-height: 500px; 
}
.book-container img {
    width: 100%;
    height: auto; /* Ensure full image display */
    object-fit: contain; /* Changed from cover to contain */
}

.book-container:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.book-image {
    width: 100%;
    height: 100%; /* Make the image fill the container */
    object-fit: cover;
    transition: var(--transition-transform);
}

.book-container:hover .book-image {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: var(--space-xl);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-all);
}

.book-container:hover .book-overlay {
    transform: translateY(0);
    opacity: 1;
}

.book-overlay h4 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}

.book-overlay p {
    margin: 0;
    font-size: var(--font-size-sm);
}

/* === COURSES SECTION === */
.courses-section {
    padding: var(--space-5xl) 0;
    background: var(--card-bg);
}

.course-card {
    background: var(--background);
    border-radius: var(--radius-3xl);
    padding: var(--space-2xl);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition-all);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-badge {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-xl);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.course-content {
    position: relative;
    z-index: 1;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    padding: var(--space-base);
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--radius-lg);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.stat-item i {
    color: var(--primary);
    font-size: var(--font-size-lg);
}

.stat-item span {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.course-topics {
    margin-bottom: var(--space-xl);
}

.topics-title {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-base);
    font-weight: var(--font-weight-semibold);
}

.topics-list {
    list-style: none;
    padding: 0;
}

.topics-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.topics-list i {
    color: var(--success);
    font-size: var(--font-size-sm);
}

.course-features {
    margin-bottom: var(--space-xl);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.feature-item i {
    color: var(--primary);
    font-size: var(--font-size-base);
}

.course-progress {
    margin-bottom: var(--space-xl);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.progress-value {
    font-weight: var(--font-weight-semibold);
    color: var(--primary);
}

.progress {
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.course-action {
    text-align: center;
}

.btn-course {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-base) var(--space-2xl);
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition-all);
}

.btn-course:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    color: white;
}

/* === CONTACT SECTION === */
.contact-section {
    padding: var(--space-5xl) 0;
    background: var(--gradient-bg);
}

.contact-card {
    background: var(--card-bg);
    border-radius: var(--radius-3xl);
    padding: var(--space-3xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.contact-item {
    background: var(--background);
    padding: var(--space-2xl);
    border-radius: var(--radius-2xl);
    text-decoration: none;
    transition: var(--transition-all);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: block;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-item.whatsapp:hover {
    border-color: #25D366;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.contact-item.facebook:hover {
    border-color: #1877F2;
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.3);
}

.contact-item.youtube:hover {
    border-color: #FF0000;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.contact-item.telegram:hover {
    border-color: #0088CC;
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3);
}

.item-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-base);
    transition: var(--transition-all);
}

.contact-item.whatsapp .item-icon {
    background: #25D366;
    color: white;
}

.contact-item.facebook .item-icon {
    background: #1877F2;
    color: white;
}

.contact-item.youtube .item-icon {
    background: #FF0000;
    color: white;
}

.contact-item.telegram .item-icon {
    background: #0088CC;
    color: white;
}

.item-icon i {
    font-size: var(--font-size-2xl);
}

.item-title {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
    font-weight: var(--font-weight-semibold);
}

.item-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-base);
    font-size: var(--font-size-sm);
}

.item-arrow {
    color: var(--primary);
    font-size: var(--font-size-lg);
    position: absolute;
    bottom: var(--space-base);
    left: var(--space-base);
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    padding: var(--space-xl);
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--radius-2xl);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.info-item i {
    color: var(--primary);
    font-size: var(--font-size-lg);
}

.info-text {
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
}

.contact-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.decoration-shape {
    position: absolute;
    border-radius: var(--radius-circle);
    background: var(--gradient-primary);
    opacity: 0.1;
    animation: float 6s infinite ease-in-out;
}

.decoration-shape.shape-1 {
    width: 100px;
    height: 100px;
    top: 20px;
    right: 20px;
}

.decoration-shape.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 20px;
    left: 20px;
    animation-delay: 3s;
}

/* === FOOTER === */
.footer {
    background: var(--card-bg);
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: var(--space-sm) 0;
    color: var(--text-secondary);
}

.developer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-colors);
}

.developer-link:hover {
    color: var(--primary-dark);
}

.copyright {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* === SHARED ANIMATIONS === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from { 
        transform: translateY(-10px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from { transform: scale(0); }
    70% { transform: scale(1.2); }
    to { transform: scale(1); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 30px rgba(var(--primary-rgb), 0.4);
        transform: scale(1.02);
    }
}

@keyframes borderRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    :root {
        --font-size-6xl: 3rem;
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.5rem;
    }

    .hero-section {
        padding: 100px 0 var(--space-4xl);
        min-height: auto;
    }

    .hero-content {
        text-align: center;
        padding: var(--space-base);
    }

    .hero-title .highlight {
        font-size: var(--font-size-5xl);
        white-space: normal;
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
        flex-direction: column;
        gap: var(--space-base);
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .hero-image-container {
        width: 280px;
        height: 350px;
    }

    .decoration-item {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-xl);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: column;
        gap: var(--space-base);
    }

    .course-stats {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .attendance-stats {
        grid-template-columns: 1fr;
    }
    .smart-card-container {
        margin-left: auto;
        margin-right: auto;
    }

}

@media (max-width: 480px) {
    .hero-content {
        padding: var(--space-sm);
    }

    .hero-image-container {
        width: 240px;
        height: 300px;
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .course-card,
    .contact-card {
        padding: var(--space-xl);
    }
}

/* === DARK MODE ADJUSTMENTS === */
[data-theme="dark"] .course-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .contact-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
