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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #1f2937;
    line-height: 1.6;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 50;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-image: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.125rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #f97316, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: none;
    gap: 2rem;
}

nav a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #ea580c;
}

.header-search {
    display: none;
    align-items: center;
    background-color: #f3f4f6;
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    width: 256px;
}

.header-search input {
    background: transparent;
    border: none;
    outline: none;
    margin-left: 0.5rem;
    width: 100%;
    font-size: 0.875rem;
    color: #374151;
}

.header-search input::placeholder {
    color: #9ca3af;
}

/* User Profile Dropdown Styles */
.header-right-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile-dropdown {
    position: relative;
    display: none;
}

/* Login Button Styles */
.login-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.login-button:hover {
    background: linear-gradient(135deg, #ea580c, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.login-button:active {
    transform: translateY(0);
}

.login-button svg {
    flex-shrink: 0;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    transition: background-color 0.3s;
    font-size: 0.875rem;
    color: #374151;
}

.user-profile-trigger:hover {
    background-color: #f3f4f6;
}

.user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    background-color: #f3f4f6;
    display: block;
    flex-shrink: 0;
    /* Prevent layout shift during image load */
    aspect-ratio: 1 / 1;
}

.user-name {
    font-weight: 500;
    color: #374151;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    color: #6b7280;
    transition: transform 0.3s;
}

.user-profile-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1000;
}

.user-profile-dropdown.active .user-profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item:hover {
    background-color: #f9fafb;
    color: #ea580c;
}

.profile-menu-item svg {
    color: #6b7280;
    flex-shrink: 0;
}

.profile-menu-item:hover svg {
    color: #ea580c;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

.menu-btn:hover {
    background-color: #f3f4f6;
}

.menu-btn svg {
    width: 24px;
    height: 24px;
    color: #374151;
}

@media (min-width: 768px) {
    nav {
        display: flex;
    }

    .header-search {
        display: flex;
    }

    .user-profile-dropdown {
        display: block;
    }

    .login-button {
        display: flex;
    }

    .menu-btn {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .user-profile-dropdown {
        display: block;
    }
    
    .login-button {
        display: flex;
        padding: 0.5rem 0.75rem;
    }
    
    .login-button span {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .user-profile-trigger {
        padding: 0.375rem;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: 128px;
    padding-bottom: 64px;
    padding-left: 1rem;
    padding-right: 1rem;
    background: linear-gradient(to bottom, #fff7ed, #ffffff);
}

.hero-container {
    max-width: 896px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.75rem;
    }
}

.hero-highlight {
    background: linear-gradient(90deg, #f97316, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 3rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .search-bar {
        flex-direction: row;
    }
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper input {
    width: 100%;
    padding: 1rem;
    padding-left: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #111827;
    outline: none;
    transition: all 0.3s;
}

.search-input-wrapper input::placeholder {
    color: #9ca3af;
}

.search-input-wrapper input:focus {
    ring: 2px solid #f97316;
    border-color: transparent;
    box-shadow: 0 0 0 2px #f97316;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.search-btn {
    padding: 1rem 2rem;
    background-image: linear-gradient(90deg, #f97316, #dc2626);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-btn:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.search-btn.gradient-animate {
    background-image: linear-gradient(90deg, #f97316, #dc2626, #f97316);
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

.arrow-icon {
    width: 20px;
    height: 20px;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.popular-label {
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 10px;
}

.tag {
    padding: 0.5rem 1rem;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.tag:hover {
    border-color: #ea580c;
    color: #ea580c;
}

/* ===== FEATURED COURSES ===== */
.featured-courses {
    padding: 4rem 1rem;
    background-color: #ffffff;
}

.featured-courses-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-top: 40px;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 3rem;
    }
}

.section-header p {
    font-size: 1.25rem;
    color: #4b5563;
}

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

.category-modules-grid {
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 35px;
    }
}

.course-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

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

.course-image {
    height: 192px;
    overflow: hidden;
    background-color: #d1d5db;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.course-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.course-card:hover .course-image-overlay {
    background-color: rgba(0, 0, 0, 0.2);
}

.course-content {
    padding: 1.5rem;
}

.course-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.module-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.module-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: #fed7aa;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #9a3412;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    white-space: nowrap;
}

.module-badge:hover {
    background-color: #fdba74;
    color: #7c2d12;
    transform: translateY(-1px);
}

.module-badge-more {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: default;
}

.module-badge-more:hover {
    background-color: #f3f4f6;
    color: #6b7280;
    transform: none;
}

.module-badge-empty {
    background-color: #fee2e2;
    color: #991b1b;
    cursor: default;
}

.module-badge-empty:hover {
    background-color: #fee2e2;
    color: #991b1b;
    transform: none;
}

.course-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #fed7aa;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.star {
    width: 16px;
    height: 16px;
    color: #fbbf24;
    fill: #fbbf24;
}

.course-rating span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.course-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.course-card:hover .course-title {
    color: #f97316;
}

.course-description {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6b7280;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-icon {
    width: 16px;
    height: 16px;
}

.explore-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background-image: linear-gradient(90deg, #f97316, #dc2626);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.explore-btn:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.view-all-btn {
    display: block;
    margin: 0 auto;
    padding: 1rem 2rem;
    border: 2px solid #f97316;
    color: #f97316;
    font-weight: 600;
    background: transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background-color: #fff7ed;
}

/* ===== CATEGORIES ===== */
.categories {
    padding: 4rem 1rem;
    background-color: #f9fafb;
}

.categories-container {
    max-width: 1280px;
    margin: 0 auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        margin-top: 35px;
    }
}

.category-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s;
    cursor: pointer;
}

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

.category-card.web-dev {
    background-color: #eff6ff;
}

.category-card.web-dev:hover {
    background-color: #dbeafe;
}

.category-card.data-science {
    background-color: #f3e8ff;
}

.category-card.data-science:hover {
    background-color: #e9d5ff;
}

.category-card.ml {
    background-color: #f0fdf4;
}

.category-card.ml:hover {
    background-color: #dcfce7;
}

.category-card.design {
    background-color: #fdf2f8;
}

.category-card.design:hover {
    background-color: #fbcfe8;
}

.category-card.mobile {
    background-color: #ecf9ff;
}

.category-card.mobile:hover {
    background-color: #cffafe;
}

.category-card.cloud {
    background-color: #fffbeb;
}

.category-card.cloud:hover {
    background-color: #fef3c7;
}

.category-card.programming {
    background-color: #fef2f2;
}

.category-card.programming:hover {
    background-color: #fee2e2;
}

.category-card.other {
    background-color: #fff7ed;
}

.category-card.other:hover {
    background-color: #fef3c7;
}

.category-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.125rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.875rem;
    color: #4b5563;
}

.category-card.web-dev .category-icon {
    color: #2563eb;
}

.category-card.data-science .category-icon {
    color: #9333ea;
}

.category-card.ml .category-icon {
    color: #16a34a;
}

.category-card.design .category-icon {
    color: #db2777;
}

.category-card.mobile .category-icon {
    color: #0891b2;
}

.category-card.cloud .category-icon {
    color: #b45309;
}

.category-card.programming .category-icon {
    color: #dc2626;
}

.category-card.other .category-icon {
    color: #f97316;
}

/* ===== CTA SECTION ===== */
.cta {
    padding: 4rem 1rem;
    background-color: #ffffff;
}

.cta-container {
    max-width: 1280px;
    margin: 0 auto;
}

.cta-box {
    background-image: linear-gradient(90deg, #f97316, #dc2626);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    color: white;
}

.cta-box h2 {
    font-size: 2.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-btn {
    padding: 1rem 2rem;
    background-color: white;
    color: #f97316;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.header-container .logo a img {
    height: auto !important;
    width: 158px !important;
}

.footer-brand .footer-logo-wrapper a img {
    height: 78px !important;
    width: 190px !important;
}

.cta-btn:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 4rem 1rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

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

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo-wrapper {
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    height: 80px;
}

.footer-brand-icon {
    width: 32px;
    height: 32px;
    background-image: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.footer-brand-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #f97316, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand-desc {
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer-section h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ea580c;
}

.footer-divider {
    border-top: 1px solid #374151;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-divider {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-copyright {
    font-size: 0.875rem;
    color: #9ca3af;
}

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

.social-icon {
    width: 20px;
    height: 20px;
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    color: #ea580c;
}

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