/* ==========================================================================
   Shift Academy - Main Stylesheet
   ========================================================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #1e3a5f;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: color 0.3s;
}

.user-avatar:hover {
    color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.user-menu:hover .user-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background: #152a45;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-text {
    background: none;
    color: var(--primary-color);
    padding: 0.5rem 0;
}

.btn-text:hover {
    transform: translateX(5px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2c5f8d 100%);
    color: #fff;
    padding: 6rem 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    font-size: 1rem;
    opacity: 0.8;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.floating-card {
    background: #fff;
    color: var(--secondary-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.floating-card:nth-child(2) {
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.categories,
.featured-courses,
.about,
.contact {
    padding: 6rem 0;
}

/* ==========================================================================
   Category Cards
   ========================================================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
}

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

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #ff8c66);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Course Grid
   ========================================================================== */

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
}

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

.course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.course-content {
    padding: 1.5rem;
}

.course-category {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.course-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.course-meta span {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Loading Skeleton */
.course-skeleton {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.skeleton-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
    padding: 1.5rem;
}

.skeleton-text {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-text.short {
    width: 60%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--secondary-color);
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 120px;
    width: auto;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.page-header {
    background: linear-gradient(135deg, var(--secondary-color), #2c5f8d);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft {
    background: #e2e8f0;
    color: #4a5568;
}

.status-pending_review,
.status-pending_approval {
    background: #fef3c7;
    color: #92400e;
}

.status-published,
.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected,
.status-declined {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

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

.text-success {
    color: var(--success);
}

.text-muted {
    color: var(--text-light);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-toggle {
        display: block;
    }

    .auth-buttons,
    .user-menu {
        display: none;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .category-grid,
    .course-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ============================================================
   RTL SUPPORT (Arabic)
   ============================================================ */
[dir="rtl"] {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: right;
}

[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
    margin-left: 0;
    margin-right: 2rem;
}

[dir="rtl"] .nav-link {
    margin-left: 0;
    margin-right: 1.5rem;
}

[dir="rtl"] .user-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .dropdown-item i {
    margin-right: 0;
    margin-left: 0.75rem;
}

[dir="rtl"] .hero-content {
    text-align: right;
}

[dir="rtl"] .hero-title {
    margin-left: auto;
    margin-right: 0;
}

[dir="rtl"] .hero-subtitle {
    margin-left: auto;
    margin-right: 0;
}

[dir="rtl"] .hero-actions {
    justify-content: flex-start;
}

[dir="rtl"] .footer-grid {
    text-align: right;
}

[dir="rtl"] .footer-links {
    padding: 0;
}

[dir="rtl"] .footer-bottom {
    flex-direction: row-reverse;
}

/* Icons that need flipping */
[dir="rtl"] .fa-arrow-right::before {
    content: "\f060";
    /* arrow-left */
}

[dir="rtl"] .fa-arrow-left::before {
    content: "\f061";
    /* arrow-right */
}

[dir="rtl"] .stat-card {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .badge-card {
    text-align: right;
}

[dir="rtl"] .certificate-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .cert-info {
    flex-direction: row-reverse;
}

/* Language Switcher Styles */
.lang-switcher {
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

[dir="rtl"] .lang-switcher {
    margin-right: 0;
    margin-left: 1rem;
}

.lang-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}

[dir="rtl"] .lang-btn {
    flex-direction: row-reverse;
}