/* Alexandria Energia - Custom Styles */

:root {
    --primary-color: #FF6B00;
    --secondary-color: #FFFFFF;
    --text-color: #333333;
    --light-bg: #F9F9F9;
    --dark-bg: #1A1A1A;
    --footer-bg: #111111;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dark mode overrides */
.dark .sidebar-link {
    color: #e5e5e5;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e55f00;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Progress bar */
.progress-bar {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #ff8533);
    transition: width 0.3s ease;
}

/* Button styles */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #e55f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--dark-bg);
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-hidden {
    transform: translateX(-100%);
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-link.active {
    background-color: rgba(255, 107, 0, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-link.relative {
    padding-right: 2.2rem;
}



/* Main content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background-color: var(--light-bg);
    transition: margin-left 0.3s ease;
}

.main-content.full-width {
    margin-left: 0;
}

/* Course card */
.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.course-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Video player */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Lesson item */
.lesson-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.lesson-item:hover {
    background-color: #f8f8f8;
    border-color: var(--primary-color);
}

.lesson-item.active {
    background-color: rgba(255, 107, 0, 0.1);
    border-color: var(--primary-color);
}

.lesson-item.completed {
    opacity: 0.7;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #10b981;
    color: white;
}

.badge-warning {
    background-color: #f59e0b;
    color: white;
}

.badge-info {
    background-color: #3b82f6;
    color: white;
}

/* New Courses Notification Badge */
.new-course-badge {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: #10b981;
    font-size: 9px;
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
}

.dark .new-course-badge {
    color: #10b981;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    50% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1.2);
    }
}


/* Mobile responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .course-thumbnail {
        height: 150px;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}