:root {
    /* Brand Colors */
    --ue-primary: #0d6efd;
    --ue-primary-hover: #0b5ed7;
    
    /* Text Colors */
    --ue-text-main: #1c1d1f;
    --ue-text-muted: #6a6f73;
    
    /* Backgrounds */
    --ue-bg-main: #ffffff;
    --ue-bg-section: #f7f9fa;
    --ue-border: #d1d7dc;

    /* Badges */
    --ue-badge-bestseller: #eceb98;
    --ue-badge-highest: #facaa2;
    --ue-rating: #b4690e;
    
    /* Geometry */
    --ue-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- BASE --- */
.ue-wrapper {
    font-family: var(--ue-font-sans);
    color: var(--ue-text-main);
    background-color: var(--ue-bg-main);
    line-height: 1.4;
    padding-top: 80px; /* Base padding below existing navbar */
}

.ue-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- HERO SECTION --- */
.ue-hero {
    background-color: #032147;
    margin-top: -110px; /* Offset the wrapper padding */
    padding: 160px 0 100px 0; 
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.ue-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.15) 0%, rgba(3, 33, 71, 0) 60%);
    pointer-events: none;
}

.ue-hero-inner {
    max-width: 820px;
    position: relative;
    z-index: 10;
}

.ue-hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.ue-hero-title span { color: #60a5fa; }

.ue-hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin: 0 0 3rem 0;
    font-weight: 400;
    line-height: 1.6;
}

.ue-search-wrapper { margin-bottom: 2.5rem; max-width: 680px; }
.ue-search-form {
    display: flex; align-items: center; background: #ffffff;
    border-radius: 9999px; padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: box-shadow 0.3s;
}
.ue-search-form:focus-within { box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 0 4px rgba(255,255,255,0.2); }
.ue-search-input-group { display: flex; align-items: center; flex: 1; padding-left: 1.5rem; }
.ue-search-icon { color: var(--ue-text-muted); font-size: 1.25rem; }
.ue-search-input-hero {
    flex: 1; border: none; outline: none; padding: 1rem 1.25rem;
    font-size: 0.9rem; color: var(--ue-text-main); background: transparent;
}
.ue-search-input-hero::placeholder { color: #9ca3af; }
.ue-btn-search {
    background-color: var(--ue-primary); color: #ffffff; border: none;
    line-height: 1; cursor: pointer; font-weight: 700;
    padding: 1.125rem 2.5rem; border-radius: 9999px; font-size: 1.125rem;
    transition: all 0.2s;
}
.ue-btn-search:hover { background-color: var(--ue-primary-hover); transform: scale(1.02); }

.ue-categories { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ue-pill {
    display: inline-block; padding: 0.5rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff; font-size: 0.9375rem; font-weight: 500; border-radius: 9999px;
    text-decoration: none; transition: all 0.2s;
}
.ue-pill:hover { background-color: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.4); color: #ffffff; }
.ue-pill.active {
    background-color: var(--ue-primary); color: #ffffff; border-color: var(--ue-primary);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

/* --- SECTION 1: MAIN COURSES / TABS --- */
.ue-section-header {
    margin-bottom: 1.5rem;
}

.ue-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ue-text-main);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.ue-section-subtitle {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--ue-text-muted);
    margin: 0;
}

/* --- TABS --- */
.ue-tabs-container {
    border-bottom: 1px solid var(--ue-border);
    margin-bottom: 2rem;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}
.ue-tabs-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar Webkit */
}

.ue-tab {
    display: inline-block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ue-text-muted);
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent; /* default invisible */
    transition: color 0.1s;
}

.ue-tab:hover {
    color: var(--ue-text-main);
}

.ue-tab.active {
    color: var(--ue-primary);
    border-bottom: 2px solid var(--ue-primary); /* The blue bottom border in mockup */
}

/* --- FILTER CONTROLS --- */
.ue-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.ue-select {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid var(--ue-text-main); /* Strong borders for inputs */
    border-radius: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ue-text-main);
    background-color: var(--ue-bg-main);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c1d1f' stroke-width='2'%3E%3Cpath stroke-linecap='square' stroke-linejoin='miter' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
}

/* --- COURSES GRID --- */
.ue-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    row-gap: 2.5rem;
}

/* --- COMPONENT: COURSE CARD (EXACT MOCKUP) --- */
.ue-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: var(--ue-text-main);
    background: transparent;
    transition: transform 0.2s;
    height: 100%;
}

/* Hover: Mockup cards scale or shadow slightly */
.ue-card:hover { 
    transform: translateY(-2px); 
}

/* Thumbnail */
.ue-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--ue-border);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.ue-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating Badges */
.ue-badge-highlight {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ue-text-main);
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ue-badge-bestseller { background-color: var(--ue-badge-bestseller); }
.ue-badge-highest { background-color: var(--ue-badge-highest); }
.ue-badge-new { background-color: #d8f3eb; /* very pale green */ }

/* Body */
.ue-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0.25rem 0 0 0; /* No side padding, flush with image */
}

.ue-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.25rem 0;
    color: var(--ue-text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ue-card-instructor {
    font-size: 0.75rem;
    color: var(--ue-text-muted);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rating Area */
.ue-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.ue-rating-score {
    font-weight: 700;
    color: var(--ue-rating);
    font-size: 0.875rem;
}

.ue-rating-stars {
    color: var(--ue-rating);
    font-size: 0.75rem;
}

.ue-rating-count {
    font-size: 0.75rem;
    color: var(--ue-text-muted);
}

/* Stats (Duration, Students) */
.ue-card-stats {
    font-size: 0.75rem;
    color: var(--ue-text-muted);
    margin-bottom: 0.5rem;
}

/* Price */
.ue-card-price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.ue-price-current {
    font-size: 1.125rem;
    font-weight: 800;
}

.ue-price-normal {
    color: #1c1d1f; /* Solid Black */
}

@keyframes blink-promo {
    0%, 100% { color: #dc3545; opacity: 1; }
    50% { color: #e4606d; opacity: 0.6; }
}

.ue-price-promo {
    color: #dc3545;
    animation: blink-promo 1.5s infinite;
}

.ue-price-original {
    font-size: 0.875rem;
    color: #94a3b8; /* Solid Gray */
    text-decoration: line-through;
}

/* Bottom Badges */
.ue-card-badges-bottom {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ue-badge-premium {
    background-color: #5b21b6; /* Purple */
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ue-badge-terlaris {
    background-color: #cffafe;
    color: #083344;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ue-badge-tertinggi {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- SECTION 2: ALTERNATE BG (Sedang dilihat siswa) --- */
.ue-section-alt {
    padding: 4rem 0;
    background-color: var(--ue-bg-section);
    border-top: 1px solid var(--ue-border);
    border-bottom: 1px solid var(--ue-border);
    margin-top: 3rem;
}

.ue-section-alt .ue-card {
    background: transparent; /* Flush against the light gray background */
}

/* --- SECTION 3: FEATURES (Mengapa belajar...) --- */
.ue-features {
    padding: 5rem 0;
    text-align: center;
    background-color: var(--ue-bg-main);
}

.ue-features-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    color: var(--ue-text-main);
}

.ue-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.ue-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ue-feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--ue-primary-light);
    color: var(--ue-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.ue-feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--ue-text-main);
}

.ue-feature-desc {
    font-size: 0.9375rem;
    color: var(--ue-text-muted);
    line-height: 1.5;
}

/* --- PAGINATION --- */
.ue-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .ue-hero-title { font-size: 2.75rem; }
}
@media (max-width: 768px) {
    .ue-hero { padding: 140px 0 60px 0; }
    .ue-hero-title { font-size: 2.25rem; }
    .ue-search-form { flex-direction: column; background: transparent; box-shadow: none; padding: 0; gap: 1rem; }
    .ue-search-input-group { width: 100%; background: #ffffff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
    .ue-btn-search { width: 100%; border-radius: 12px; box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3); }

    .ue-section-title { font-size: 1.5rem; }
    .ue-features-grid { grid-template-columns: 1fr; gap: 3rem; }
    .ue-tabs-container { margin-bottom: 1rem; }
}

/* =============================================
   EMPTY STATE
   ============================================= */
.ue-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ue-empty-icon-wrap {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f0fe 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 32px rgba(15, 98, 254, 0.12);
    animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1);     box-shadow: 0 8px 32px rgba(15, 98, 254, 0.12); }
    50%       { transform: scale(1.07); box-shadow: 0 12px 40px rgba(15, 98, 254, 0.22); }
}

.ue-empty-icon {
    font-size: 2.8rem;
    color: #0f62fe;
}

.ue-empty-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.ue-empty-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.75;
    max-width: 460px;
    margin-bottom: 2rem;
}

.ue-btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: #0f62fe;
    color: #fff;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(15, 98, 254, 0.25);
}

.ue-btn-reset:hover {
    background: #0353e9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 98, 254, 0.35);
    color: #fff;
}
