@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --background: 0 0% 100%;
    --foreground: 220 20% 15%;

    --card: 0 0% 100%;
    --card-foreground: 220 20% 15%;

    --popover: 0 0% 100%;
    --popover-foreground: 220 20% 15%;

    --primary: 213 100% 50%;
    --primary-foreground: 0 0% 100%;

    --secondary: 220 14% 96%;
    --secondary-foreground: 220 20% 15%;

    --muted: 220 14% 96%;
    --muted-foreground: 220 10% 46%;

    --accent: 220 14% 96%;
    --accent-foreground: 220 20% 15%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 213 100% 50%;

    --radius: 0.75rem;

    /* Unstop Brand Colors */
    --unstop-blue: 213 100% 50%;
    --unstop-dark-blue: 220 60% 20%;
    --unstop-light-blue: 213 100% 96%;
    --unstop-green: 142 76% 36%;
    --unstop-green-light: 142 76% 94%;
    --unstop-yellow: 45 100% 51%;
    --unstop-yellow-light: 45 100% 94%;
    --unstop-orange: 24 95% 53%;
    --unstop-orange-light: 24 95% 94%;
    --unstop-purple: 262 83% 58%;
    --unstop-purple-light: 262 83% 95%;
    --unstop-red: 0 84% 60%;
    --unstop-red-light: 0 84% 95%;
    --unstop-gray: 220 10% 60%;
    --unstop-light-gray: 220 14% 97%;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, hsl(213 100% 50%) 0%, hsl(262 83% 58%) 100%);
    --gradient-card: linear-gradient(180deg, hsl(0 0% 100%) 0%, hsl(220 14% 98%) 100%);
    --gradient-cta: linear-gradient(135deg, hsl(213 100% 50%) 0%, hsl(213 100% 40%) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 hsl(220 20% 15% / 0.05);
    --shadow-md: 0 4px 6px -1px hsl(220 20% 15% / 0.1), 0 2px 4px -2px hsl(220 20% 15% / 0.1);
    --shadow-lg: 0 10px 15px -3px hsl(220 20% 15% / 0.1), 0 4px 6px -4px hsl(220 20% 15% / 0.1);
    --shadow-xl: 0 20px 25px -5px hsl(220 20% 15% / 0.1), 0 8px 10px -6px hsl(220 20% 15% / 0.1);
    --shadow-card: 0 2px 8px hsl(220 20% 15% / 0.08);
    --shadow-card-hover: 0 8px 25px hsl(220 20% 15% / 0.15);

    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
}

.dark {
    --background: 220 20% 10%;
    --foreground: 0 0% 98%;

    --card: 220 20% 13%;
    --card-foreground: 0 0% 98%;

    --popover: 220 20% 13%;
    --popover-foreground: 0 0% 98%;

    --primary: 213 100% 55%;
    --primary-foreground: 0 0% 100%;

    --secondary: 220 20% 18%;
    --secondary-foreground: 0 0% 98%;

    --muted: 220 20% 18%;
    --muted-foreground: 220 10% 60%;

    --accent: 220 20% 18%;
    --accent-foreground: 0 0% 98%;

    --destructive: 0 62% 30%;
    --destructive-foreground: 0 0% 98%;

    --border: 220 20% 20%;
    --input: 220 20% 20%;
    --ring: 213 100% 55%;

    --sidebar-background: 220 20% 10%;
    --sidebar-foreground: 0 0% 98%;
    --sidebar-primary: 213 100% 55%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 220 20% 15%;
    --sidebar-accent-foreground: 0 0% 98%;
    --sidebar-border: 220 20% 20%;
    --sidebar-ring: 213 100% 55%;
}

* {
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    /* tracking-tight */
}

/* Utilities */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: var(--gradient-hero);
}

.card-shadow {
    box-shadow: var(--shadow-card);
}

.card-shadow-hover {
    box-shadow: var(--shadow-card-hover);
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-bounce-subtle {
    animation: bounceSubtle 2s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.marquee {
    animation: marquee 30s linear infinite;
}

.marquee:hover {
    animation-play-state: paused;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

@keyframes bounceSubtle {

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

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

@keyframes float {

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

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

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

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

::-webkit-scrollbar-track {
    background: hsl(var(--muted));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* --- Added from courses.html --- */

/* Enhanced course cards with modern design */
.course-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    overflow: hidden;
    background: hsl(var(--card));
    box-shadow: var(--shadow-card);
    border: 1px solid hsl(var(--border));
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: hsl(var(--primary) / 0.6);
}

/* Category filter buttons with improved design */
.category-btn {
    transition: all 0.2s ease;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    font-size: 0.9rem;
}

.category-btn:hover {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
    box-shadow: 0 2px 6px hsl(var(--foreground) / 0.05);
}

.category-btn.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.2);
}

/* Search bar styling with enhanced design */
.search-bar {
    border-radius: 50px;
    box-shadow: 0 1px 3px hsl(var(--foreground) / 0.05);
    padding: 16px 24px;
    font-size: 1rem;
    border: 2px solid hsl(var(--border));
    transition: all 0.2s ease;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}

.search-bar:focus {
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.2);
    border-color: hsl(var(--primary));
}

/* Course image container with improved styling */
.course-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-image {
    transform: scale(1.05);
}

/* Badge styling with enhanced design */
.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

/* Course content styling with improved typography */
.course-card-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: hsl(var(--foreground));
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.course-card-description {
    color: hsl(var(--muted-foreground));
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Course meta styling with improved layout */
.course-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border));
}

.course-card-price {
    font-weight: 800;
    color: hsl(var(--foreground));
    font-size: 1.25rem;
}

/* Button styling with enhanced design */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.25rem;
    box-shadow: 0 2px 6px hsl(var(--foreground) / 0.05);
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px hsl(var(--primary) / 0.2);
}

/* Loading spinner with enhanced design */
.loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid hsl(var(--primary) / 0.2);
    border-top: 4px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Sorting dropdown styling */
#sort-options {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    background-color: hsl(var(--background));
    border: 2px solid hsl(var(--border));
    transition: all 0.2s ease;
    min-width: 180px;
}

#sort-options:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .course-card-title {
        font-size: 1.125rem;
    }

    .course-card-content {
        padding: 1.25rem;
    }

    .category-btn {
        padding: 6px 16px;
        font-size: 0.875rem;
    }

    #sort-options {
        min-width: 150px;
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}