/* ============================================
   SeT Marketplace - Modern Design System
   ============================================ */

/* === DESIGN TOKENS === */
:root {
    --mp-purple-50: #F5F3FF;
    --mp-purple-100: #EDE9FE;
    --mp-purple-200: #DDD6FE;
    --mp-purple-400: #A78BFA;
    --mp-purple-500: #8B5CF6;
    --mp-purple-600: #7C3AED;
    --mp-purple-700: #6D28D9;
    --mp-purple-800: #5B21B6;
    --mp-purple-900: #4C1D95;
    --mp-blue-50: #EFF6FF;
    --mp-blue-500: #3B82F6;
    --mp-blue-700: #1D4ED8;
    --mp-pink-50: #FCE7F3;
    --mp-pink-500: #EC4899;
    --mp-orange-50: #FFF7ED;
    --mp-orange-500: #F97316;
    --mp-amber-50: #FEF3C7;
    --mp-amber-500: #F59E0B;
    --mp-amber-700: #B45309;
    --mp-green-500: #10B981;
    --mp-red-500: #EF4444;
    --mp-slate-50: #F8FAFC;
    --mp-slate-100: #F1F5F9;
    --mp-slate-200: #E2E8F0;
    --mp-slate-400: #94A3B8;
    --mp-slate-500: #64748B;
    --mp-slate-800: #1E293B;
    --mp-slate-900: #0F172A;
    --mp-radius-sm: 8px;
    --mp-radius-md: 12px;
    --mp-radius-lg: 16px;
    --mp-radius-xl: 20px;
    --mp-radius-2xl: 24px;
    --mp-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --mp-shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --mp-shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --mp-shadow-xl: 0 20px 50px rgba(0,0,0,0.12);
    --mp-shadow-glow: 0 0 30px rgba(139,92,246,0.15);
    --mp-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --mp-transition-fast: 0.2s ease;
}

/* === NAVBAR — Two-row modern header === */
.mp-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Top bar — logo + auth */
.mp-topbar {
    background: white;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    border-bottom: 1px solid var(--mp-slate-200);
}
.mp-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: all var(--mp-transition-fast);
}
.mp-logo:hover { opacity: 0.85; }
.mp-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(139,92,246,0.2);
    flex-shrink: 0;
}
.mp-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mp-logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--mp-slate-900);
    letter-spacing: -0.5px;
}
.mp-logo-text span {
    color: var(--mp-purple-500);
}
.mp-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mp-signin {
    padding: 9px 22px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mp-slate-800);
    text-decoration: none;
    border-radius: 10px;
    background: var(--mp-slate-50);
    border: 1px solid var(--mp-slate-200);
    white-space: nowrap;
    transition: all var(--mp-transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mp-signin i { font-size: 0.75rem; color: var(--mp-slate-400); }
.mp-signin:hover {
    background: white;
    border-color: var(--mp-purple-300);
    color: var(--mp-purple-600);
    box-shadow: 0 2px 8px rgba(139,92,246,0.1);
}
.mp-signin:hover i { color: var(--mp-purple-500); }
.mp-signup {
    padding: 9px 24px;
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--mp-purple-500) 0%, var(--mp-purple-700) 100%);
    text-decoration: none;
    border-radius: 10px;
    white-space: nowrap;
    transition: all var(--mp-transition-fast);
    box-shadow: 0 2px 12px rgba(124,58,237,0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
}
.mp-signup i { font-size: 0.72rem; }
.mp-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,0.4);
}

/* Link bar — navigation pills */
.mp-linkbar {
    background: linear-gradient(135deg, var(--mp-purple-700) 0%, var(--mp-purple-900) 100%);
    padding: 0 40px;
    display: flex;
    align-items: center;
    height: 46px;
    box-shadow: 0 4px 20px rgba(76,29,149,0.15);
}
.mp-links {
    display: flex;
    gap: 4px;
    flex: 1;
    align-items: center;
    overflow-x: auto;
    flex-wrap: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.mp-links::-webkit-scrollbar { display: none; }
.mp-links a {
    padding: 7px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: all var(--mp-transition-fast);
}
.mp-links a i {
    font-size: 0.72rem;
    opacity: 0.6;
    transition: all var(--mp-transition-fast);
}
.mp-links a:hover {
    color: white;
    background: rgba(255,255,255,0.12);
}
.mp-links a:hover i { opacity: 1; }
.mp-links a.active {
    font-weight: 700;
    color: white;
    background: rgba(255,255,255,0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.mp-links a.active i { opacity: 1; }
.mp-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--mp-slate-500);
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    border-radius: var(--mp-radius-sm);
    transition: all var(--mp-transition-fast);
}
.mp-hamburger:hover {
    background: var(--mp-purple-50);
    color: var(--mp-purple-500);
}

/* Legacy compat — old .mp-nav class for pages that haven't updated */
.mp-nav {
    background: white;
    border-bottom: 1px solid var(--mp-slate-200);
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.mp-nav .mp-logo img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: var(--mp-radius-sm);
}
.mp-nav .mp-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* === LAYOUT HELPERS === */
.mp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}
.mp-container-md {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}
.mp-container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
}
.mp-grid {
    display: grid;
    gap: 20px;
}
.mp-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.mp-grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.mp-grid-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}
.mp-grid-sidebar {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}
.mp-filters {
    background: white;
    border: 1px solid var(--mp-slate-200);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.mp-hero {
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mp-hero h1 {
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1.15;
}
.mp-hero p {
    font-size: 1rem;
    line-height: 1.7;
}
.mp-hero-pills {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 12px;
}
.mp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.85rem;
}
.mp-page-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 8px;
}
.mp-page-header p {
    font-size: 0.95rem;
    color: var(--mp-slate-500);
    margin: 0;
}
.mp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* === MODERN CARD SYSTEM === */
.mp-card-cover {
    position: relative;
    height: 150px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}
.mp-card-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.mp-card-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
    pointer-events: none;
}
.mp-card-cover .cover-icon {
    font-size: 2.8rem;
    color: rgba(255,255,255,0.85);
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}
.mp-card-cover .cover-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    z-index: 1;
}
.mp-card-cover .cover-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 10px;
    font-size: 0.62rem;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
}
.mp-card-cover .cover-badge-left {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    font-size: 0.62rem;
    border-radius: 20px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
/* Rating badge on cover */
.mp-card-cover .cover-rating {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 8px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mp-card-cover .cover-rating i { color: var(--mp-amber-500); font-size: 0.65rem; }
.mp-card-body {
    padding: 18px 20px 20px;
}
.mp-card-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mp-slate-900);
    margin: 0 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mp-card-body .card-meta {
    font-size: 0.78rem;
    color: var(--mp-slate-500);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mp-card-body .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0 0;
}
.mp-card-body .card-tag {
    padding: 3px 10px;
    font-size: 0.68rem;
    border-radius: 20px;
    font-weight: 500;
}
.mp-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--mp-slate-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mp-card-footer .card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all var(--mp-transition-fast);
}

/* === GLASSMORPHISM CARD === */
.mp-modern-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--mp-slate-200);
    border-radius: var(--mp-radius-lg);
    overflow: hidden;
    transition: all var(--mp-transition);
    box-shadow: var(--mp-shadow-sm);
}
.mp-modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--mp-shadow-xl), var(--mp-shadow-glow);
    border-color: var(--mp-purple-200);
}
a .mp-modern-card:hover { color: inherit; }

/* === COVER GRADIENTS === */
.cover-math { background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%); }
.cover-programming { background: linear-gradient(135deg, #6366F1 0%, #4338CA 100%); }
.cover-science { background: linear-gradient(135deg, #06B6D4 0%, #0E7490 100%); }
.cover-business { background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%); }
.cover-language { background: linear-gradient(135deg, #EC4899 0%, #BE185D 100%); }
.cover-engineering { background: linear-gradient(135deg, #10B981 0%, #047857 100%); }
.cover-education { background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%); }
.cover-technology { background: linear-gradient(135deg, #14B8A6 0%, #0F766E 100%); }
.cover-social { background: linear-gradient(135deg, #F97316 0%, #C2410C 100%); }
.cover-default { background: linear-gradient(135deg, #64748B 0%, #334155 100%); }
.cover-hiring { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); }
.cover-student-req { background: linear-gradient(135deg, #F97316 0%, #C2410C 100%); }
.cover-reviewer { background: linear-gradient(135deg, #EC4899 0%, #9D174D 100%); }
.cover-resource { background: linear-gradient(135deg, #F59E0B 0%, #92400E 100%); }
.cover-event { background: linear-gradient(135deg, #10B981 0%, #065F46 100%); }
.cover-course { background: linear-gradient(135deg, #3B82F6 0%, #1E3A8A 100%); }
.cover-instructor { background: linear-gradient(135deg, #8B5CF6 0%, #5B21B6 100%); }
.cover-institution { background: linear-gradient(135deg, #6366F1 0%, #3730A3 100%); }

/* === STARS === */
.mp-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.mp-stars i { font-size: 0.72rem; }
.star-on { color: var(--mp-amber-500); }
.star-off { color: var(--mp-slate-200); }

/* === INSTITUTION STATS === */
.inst-stats-grid {
    display: flex;
    gap: 0;
    margin-top: 10px;
    background: var(--mp-slate-50);
    border-radius: 10px;
    overflow: hidden;
}
.inst-stats-grid .inst-stat {
    text-align: center;
    flex: 1;
    padding: 10px 8px;
}
.inst-stats-grid .inst-stat + .inst-stat {
    border-left: 1px solid var(--mp-slate-200);
}
.inst-stats-grid .inst-stat-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--mp-purple-500);
}
.inst-stats-grid .inst-stat-label {
    font-size: 0.65rem;
    color: var(--mp-slate-400);
    font-weight: 500;
    margin-top: 1px;
}

/* === FOOTER (shared) === */
.mp-footer {
    background: var(--mp-slate-900);
    padding: 40px 24px;
    text-align: center;
    color: var(--mp-slate-400);
    font-size: 0.82rem;
    margin-top: 24px;
}

/* ============================================
   MARKETPLACE LANDING PAGE
   ============================================ */

/* === HERO === */
.mp-hero-v2 {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 30%, #4C1D95 70%, #1E1B4B 100%);
    padding: 72px 24px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mp-hero-v2::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(139,92,246,0.35) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59,130,246,0.25) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(236,72,153,0.18) 0%, transparent 40%);
    pointer-events: none;
    animation: meshFloat 12s ease-in-out infinite alternate;
}
@keyframes meshFloat {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.08) translate(-2%, 1%); }
}
/* Floating shapes */
.mp-hero-v2::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(139,92,246,0.08);
    top: -80px;
    right: -60px;
    pointer-events: none;
    animation: shapeFloat 8s ease-in-out infinite alternate;
}
@keyframes shapeFloat {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(20px) rotate(10deg); }
}
/* Flash Promotion Animations */
@keyframes flashPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes flashGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(245,158,11,.2); }
    50% { box-shadow: 0 0 20px rgba(245,158,11,.4); }
}
.flash-glow { animation: flashGlow 3s ease-in-out infinite; }
.mp-hero-v2 .hero-shape-left {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: rgba(236,72,153,0.06);
    bottom: -40px;
    left: -30px;
    pointer-events: none;
    animation: shapeFloat 10s ease-in-out infinite alternate-reverse;
}
.mp-hero-v2 .hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}
.mp-hero-v2 .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #FDE68A;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(253,230,138,0.2);
    border-radius: 50px;
    margin-bottom: 20px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}
.mp-hero-v2 h1 {
    font-size: 2.8rem;
    font-weight: 900;
    color: white;
    margin: 0 0 16px;
    line-height: 1.12;
    letter-spacing: -0.03em;
}
.mp-hero-v2 h1 .gradient-text {
    background: linear-gradient(135deg, #FDE68A 0%, #FBBF24 50%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mp-hero-v2 .hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.72);
    margin: 0 auto 32px;
    max-width: 540px;
    line-height: 1.7;
}

/* === HERO SEARCH (glassmorphism) === */
.mp-hero-search {
    max-width: 580px;
    margin: 0 auto 28px;
    position: relative;
    z-index: 1;
}
.mp-hero-search input {
    width: 100%;
    padding: 16px 58px 16px 22px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--mp-radius-md);
    font-size: 0.92rem;
    font-family: 'Inter', -apple-system, sans-serif;
    background: rgba(255,255,255,0.1);
    color: white;
    backdrop-filter: blur(16px);
    outline: none;
    box-sizing: border-box;
    transition: all var(--mp-transition-fast);
}
.mp-hero-search input::placeholder {
    color: rgba(255,255,255,0.5);
}
.mp-hero-search input:focus {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.45);
    box-shadow: 0 0 30px rgba(139,92,246,0.2);
}
.mp-hero-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background var(--mp-transition-fast);
    backdrop-filter: blur(6px);
}
.mp-hero-search button:hover {
    background: rgba(255,255,255,0.28);
}

/* === CATEGORY PILLS === */
.cat-pills {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.cat-pill {
    padding: 10px 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--mp-radius-md);
    color: white;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.25s;
    backdrop-filter: blur(6px);
}
.cat-pill:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2), 0 0 16px rgba(139,92,246,0.15);
    border-color: rgba(255,255,255,0.25);
}
.cat-pill .pill-count {
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
}

/* === STATS BAR === */
.mp-stats-v2 {
    display: flex;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--mp-slate-200);
    border-radius: var(--mp-radius-xl);
    margin: -32px auto 0;
    max-width: 800px;
    position: relative;
    z-index: 5;
    box-shadow: var(--mp-shadow-lg);
    overflow: hidden;
}
.mp-stats-v2 .sv2-item {
    flex: 1;
    text-align: center;
    padding: 22px 12px;
    border-right: 1px solid var(--mp-slate-100);
    transition: background var(--mp-transition-fast);
}
.mp-stats-v2 .sv2-item:last-child { border-right: none; }
.mp-stats-v2 .sv2-item:hover { background: var(--mp-purple-50); }
.mp-stats-v2 .sv2-num {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--mp-purple-500), var(--mp-purple-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mp-stats-v2 .sv2-label {
    font-size: 0.7rem;
    color: var(--mp-slate-400);
    font-weight: 500;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* === MAIN CONTENT WRAPPER === */
.mp-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === SECTION LAYOUT === */
.mp-sec {
    padding: 60px 0 20px;
}
.mp-sec-alt {
    background: linear-gradient(180deg, var(--mp-slate-50) 0%, var(--mp-slate-100) 100%);
    border-top: 1px solid var(--mp-slate-100);
    border-bottom: 1px solid var(--mp-slate-100);
    margin: 0 -24px;
    padding: 60px 24px 20px;
}
.mp-sec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px;
}
.mp-sec-header .sec-left h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--mp-slate-900);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
.mp-sec-header .sec-left h2 .sec-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--mp-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.mp-sec-header .sec-left p {
    font-size: 0.82rem;
    color: var(--mp-slate-500);
    margin: 0;
    padding-left: 54px;
}
/* Accent underline bar */
.mp-sec-header .sec-left h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 54px;
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mp-purple-500), var(--mp-purple-400));
    opacity: 0.6;
}
/* Ghost button for View All */
.mp-sec-header .sec-btn {
    padding: 10px 22px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--mp-radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--mp-transition-fast);
    border: 1.5px solid currentColor;
    background: transparent;
    flex-shrink: 0;
}
.mp-sec-header .sec-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* === CARD GRID === */
.mp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* === EMPTY STATE === */
.mp-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 20px;
    color: var(--mp-slate-400);
}
.mp-empty i { font-size: 2.5rem; color: var(--mp-slate-200); margin-bottom: 12px; display: block; }
.mp-empty .emp-text { font-size: 0.88rem; font-weight: 500; }

/* === RECOMMENDED BANNER === */
.mp-rec-banner {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1px solid #FCD34D;
    border-radius: var(--mp-radius-lg);
    padding: 24px 28px;
    margin: 32px 0 0;
}
.mp-rec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.mp-rec-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #92400E;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mp-rec-header p { font-size: 0.78rem; color: #78350F; margin: 4px 0 0; }
.mp-rec-header .rec-btn {
    padding: 8px 18px;
    background: var(--mp-amber-500);
    color: white;
    border-radius: var(--mp-radius-sm);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--mp-transition-fast);
}
.mp-rec-header .rec-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.mp-rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.mp-rec-card {
    background: white;
    padding: 16px;
    border-radius: var(--mp-radius-md);
    border: 1px solid #FCD34D;
    transition: transform var(--mp-transition-fast);
}
.mp-rec-card:hover { transform: translateY(-2px); }
.mp-rec-card .rc-label { font-size: 0.72rem; color: #92400E; font-weight: 600; margin-bottom: 5px; }
.mp-rec-card .rc-text { font-size: 0.82rem; font-weight: 700; color: var(--mp-slate-900); line-height: 1.4; }

/* === CTA BANNER === */
.mp-cta-banner {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 50%, #C7D2FE 100%);
    border: 2px solid #A5B4FC;
    border-radius: var(--mp-radius-lg);
    padding: 28px 32px;
    margin: 36px 0;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.mp-cta-banner .cta-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.mp-cta-banner .cta-body { flex: 1; min-width: 200px; }
.mp-cta-banner .cta-body h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: #312E81; }
.mp-cta-banner .cta-body p { margin: 0; font-size: 0.82rem; color: #4338CA; line-height: 1.5; }
.mp-cta-banner .cta-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    color: white;
    border: none;
    border-radius: var(--mp-radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--mp-transition-fast);
    flex-shrink: 0;
}
.mp-cta-banner .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.35);
}

/* === FOOTER V2 === */
.mp-footer-v2 {
    background: linear-gradient(180deg, var(--mp-slate-900) 0%, var(--mp-slate-800) 100%);
    padding: 56px 24px 36px;
    margin-top: 40px;
}
.mp-footer-v2 .ft-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}
.mp-footer-v2 .ft-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mp-slate-50);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mp-footer-v2 .ft-desc { font-size: 0.82rem; color: var(--mp-slate-400); line-height: 1.6; margin: 0 0 16px; }
.mp-footer-v2 .ft-social {
    display: flex;
    gap: 10px;
}
.mp-footer-v2 .ft-social a {
    width: 36px;
    height: 36px;
    border-radius: var(--mp-radius-sm);
    background: rgba(255,255,255,0.06);
    color: var(--mp-slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--mp-transition-fast);
}
.mp-footer-v2 .ft-social a:hover {
    background: var(--mp-purple-500);
    color: white;
}
.mp-footer-v2 .ft-col h4 {
    font-size: 0.78rem;
    font-weight: 700;
    color: #CBD5E1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}
.mp-footer-v2 .ft-col a {
    display: block;
    font-size: 0.82rem;
    color: var(--mp-slate-400);
    text-decoration: none;
    padding: 4px 0;
    transition: color var(--mp-transition-fast);
}
.mp-footer-v2 .ft-col a:hover { color: var(--mp-purple-500); }
.mp-footer-v2 .ft-copy {
    text-align: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(148,163,184,0.12);
    font-size: 0.75rem;
    color: var(--mp-slate-500);
}

/* === SCROLL TO TOP === */
#mpScrollTop {
    position: fixed;
    bottom: 90px;
    right: 28px;
    width: 42px;
    height: 42px;
    border-radius: var(--mp-radius-md);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--mp-slate-200);
    box-shadow: var(--mp-shadow-md);
    color: var(--mp-slate-500);
    font-size: 0.9rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--mp-transition-fast);
    z-index: 99;
}
#mpScrollTop:hover {
    background: var(--mp-purple-500);
    color: white;
    border-color: var(--mp-purple-500);
}

/* === SCROLL ANIMATIONS === */
.mp-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.mp-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Staggered card cascade */
.mp-card-grid .mp-modern-card,
.mp-card-grid > a {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.mp-card-grid.cards-visible .mp-modern-card,
.mp-card-grid.cards-visible > a {
    opacity: 1;
    transform: translateY(0);
}
.mp-card-grid.cards-visible > *:nth-child(1) { transition-delay: 0ms; }
.mp-card-grid.cards-visible > *:nth-child(2) { transition-delay: 80ms; }
.mp-card-grid.cards-visible > *:nth-child(3) { transition-delay: 160ms; }
.mp-card-grid.cards-visible > *:nth-child(4) { transition-delay: 240ms; }
.mp-card-grid.cards-visible > *:nth-child(5) { transition-delay: 320ms; }
.mp-card-grid.cards-visible > *:nth-child(6) { transition-delay: 400ms; }

/* Tutor avatar on cover */
.mp-tutor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 3px solid rgba(255,255,255,0.4);
    z-index: 1;
    overflow: hidden;
}
.mp-tutor-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.mp-tutor-name {
    color: white;
    font-weight: 700;
    font-size: 0.92rem;
    z-index: 1;
}

/* School logo on cover */
.mp-school-logo {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.3);
    z-index: 1;
    overflow: hidden;
}
.mp-school-logo img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}
.mp-school-name {
    color: white;
    font-weight: 700;
    font-size: 0.88rem;
    z-index: 1;
    text-align: center;
    max-width: 80%;
    line-height: 1.3;
}

/* Price label in footer */
.mp-price {
    font-size: 0.95rem;
    font-weight: 700;
}
.mp-price-sub {
    font-size: 0.65rem;
    color: var(--mp-slate-400);
    font-weight: 400;
}

/* Promotion badge styles */
.badge-promo {
    background: rgba(255,255,255,0.95);
    color: var(--mp-slate-900);
}

/* === RESPONSIVE === */

/* Tablet: collapse nav text */
@media (max-width: 1100px) {
    .mp-links a span { display: none; }
    .mp-links a { padding: 6px 8px; font-size: 0.95rem; }
    .mp-links a i { font-size: 1rem; }
    .mp-links { gap: 0; }
}

/* Tablet: 2-col cards */
@media (max-width: 1024px) {
    .mp-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mp-hero-v2 {
        padding: 56px 20px 44px;
    }
    .mp-hero-v2 h1 {
        font-size: 2.2rem;
    }
}

/* Tablet Portrait */
@media (max-width: 900px) {
    .mp-grid-sidebar { grid-template-columns: 1fr !important; }
    .mp-grid-2col { grid-template-columns: 1fr !important; }
}

/* Mobile */
@media (max-width: 768px) {
    .mp-nav {
        padding: 0 16px;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
    }
    .mp-hamburger { display: block; }
    .mp-topbar { padding: 0 16px; height: 56px; }
    .mp-linkbar {
        display: none;
        padding: 12px 16px;
        height: auto;
        flex-wrap: wrap;
    }
    .mp-linkbar.open {
        display: flex;
    }
    .mp-links {
        flex-wrap: wrap;
        gap: 4px;
    }
    .mp-links a { flex: 0 0 auto; font-size: 0.78rem; padding: 6px 12px; }
    .mp-topbar-right { margin-left: auto; }
    .mp-signin, .mp-signup { padding: 7px 14px; font-size: 0.78rem; }
    .mp-signin i, .mp-signup i { display: none; }

    /* Layout */
    .mp-container, .mp-container-md, .mp-container-sm { padding: 16px !important; }
    .mp-grid-3, .mp-grid-2 { grid-template-columns: 1fr !important; }
    .mp-grid-sidebar, .mp-grid-2col { grid-template-columns: 1fr !important; }
    .mp-main { padding: 0 16px; }

    /* Filters */
    .mp-filters {
        flex-direction: column;
        padding: 16px;
    }
    .mp-filters > div, .mp-filters > button { width: 100% !important; min-width: 0 !important; flex: none !important; }
    .mp-filters button { width: 100%; }

    /* Hero */
    .mp-hero-v2 { padding: 40px 16px 36px; }
    .mp-hero-v2 h1 { font-size: 1.7rem; }
    .mp-hero-v2 .hero-sub { font-size: 0.9rem; }
    .mp-hero { padding: 30px 16px 20px !important; }
    .mp-hero h1 { font-size: 1.5rem !important; }
    .mp-hero p { font-size: 0.88rem !important; }
    .mp-hero-pills { gap: 6px; }
    .mp-hero-pills a { padding: 8px 12px !important; font-size: 0.72rem !important; }

    /* Stats */
    .mp-stats-v2 { margin: -22px 16px 0; border-radius: var(--mp-radius-md); }
    .mp-stats-v2 .sv2-num { font-size: 1.2rem; }
    .mp-stats-v2 .sv2-item { padding: 14px 8px; }
    .mp-hero-search { margin: 0 auto 20px; }
    .mp-hero-search input { padding: 12px 48px 12px 16px; font-size: 0.85rem; }

    /* Sections */
    .mp-sec { padding: 40px 0 12px; }
    .mp-sec-alt { margin: 0 -16px; padding: 40px 16px 12px; }
    .mp-sec-header { flex-direction: column; align-items: flex-start; }
    .mp-sec-header .sec-left p { padding-left: 0; }
    .mp-sec-header .sec-left h2::after { left: 0; }
    .mp-card-grid { grid-template-columns: 1fr; gap: 16px; }

    /* Category pills horizontal scroll */
    .cat-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 16px;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .cat-pills::-webkit-scrollbar { display: none; }
    .cat-pill { padding: 8px 14px; font-size: 0.72rem; flex-shrink: 0; }

    /* CTA */
    .mp-cta-banner { flex-direction: column; text-align: center; padding: 20px; }
    .mp-cta-banner .cta-btn { width: 100%; justify-content: center; }

    /* Footer */
    .mp-footer-v2 .ft-inner { grid-template-columns: 1fr; gap: 24px; }

    /* Page headers */
    .mp-page-header h1 { font-size: 1.3rem !important; }
    .mp-page-header p { font-size: 0.85rem !important; }
    .mp-section-header { flex-direction: column; align-items: flex-start; gap: 10px; }

    /* Detail pages */
    .mp-detail-header { padding: 20px 16px !important; }
    .mp-detail-header h1 { font-size: 1.25rem !important; }
    .mp-detail-body { padding: 20px 16px !important; }
    .mp-card { border-radius: var(--mp-radius-md) !important; }

    /* Tables */
    .mp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .mp-table-wrap table { min-width: 500px; }
    .mp-info-grid { grid-template-columns: 1fr !important; }
    .mp-booking-grid { grid-template-columns: 1fr !important; }

    /* Cards */
    .mp-card-cover { height: 130px; }
    .mp-card-cover .cover-icon { font-size: 2.2rem; }
    .inst-stats-grid .inst-stat-num { font-size: 1rem; }

    /* Disable scroll animations on mobile for performance */
    .mp-reveal { opacity: 1; transform: none; }
    .mp-card-grid .mp-modern-card,
    .mp-card-grid > a { opacity: 1; transform: none; }
}

/* Small mobile */
@media (max-width: 480px) {
    .mp-logo { font-size: 0.88rem; }
    .mp-logo img { width: 32px; height: 32px; }
    .mp-hero-v2 h1 { font-size: 1.4rem; }
    .mp-signin { display: none; }
    .mp-stats-v2 { flex-wrap: wrap; }
    .mp-stats-v2 .sv2-item { flex: 0 0 50%; border-right: none; }
    .mp-stats-v2 .sv2-item:nth-child(odd) { border-right: 1px solid var(--mp-slate-100); }
    .mp-stats-v2 .sv2-item:nth-child(1),
    .mp-stats-v2 .sv2-item:nth-child(2) { border-bottom: 1px solid var(--mp-slate-100); }
}

/* Shared grid class for other marketplace pages */
.mp-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
@media (max-width: 768px) {
    .mp-grid-modern { grid-template-columns: 1fr !important; }
}

/* Section bg helper for other pages */
.mp-section { padding: 48px 0 0; }
.mp-section-bg {
    background: var(--mp-slate-50);
    border-radius: var(--mp-radius-2xl);
    padding: 32px;
    margin: 0 -8px;
}
@media (max-width: 768px) {
    .mp-section-bg {
        border-radius: var(--mp-radius-lg);
        padding: 20px 16px;
        margin: 0;
    }
}

/* Stats bar (legacy - shared pages) */
.mp-stats-bar {
    display: flex;
    gap: 0;
    background: white;
    border: 1px solid var(--mp-slate-200);
    border-radius: var(--mp-radius-lg);
    margin: -28px auto 0;
    max-width: 800px;
    position: relative;
    z-index: 5;
    box-shadow: var(--mp-shadow-md);
    overflow: hidden;
}
.mp-stats-bar .stat-item {
    flex: 1;
    text-align: center;
    padding: 18px 12px;
    border-right: 1px solid var(--mp-slate-100);
}
.mp-stats-bar .stat-item:last-child { border-right: none; }
.mp-stats-bar .stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--mp-purple-500), var(--mp-purple-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mp-stats-bar .stat-label {
    font-size: 0.72rem;
    color: var(--mp-slate-400);
    font-weight: 500;
    margin-top: 2px;
}
@media (max-width: 768px) {
    .mp-stats-bar { margin: -20px 16px 0; border-radius: var(--mp-radius-md); }
    .mp-stats-bar .stat-num { font-size: 1.15rem; }
    .mp-stats-bar .stat-item { padding: 12px 8px; }
}
@media (max-width: 480px) {
    .mp-stats-bar { flex-wrap: wrap; }
    .mp-stats-bar .stat-item { flex: 0 0 50%; border-right: none; }
    .mp-stats-bar .stat-item:nth-child(odd) { border-right: 1px solid var(--mp-slate-100); }
    .mp-stats-bar .stat-item:nth-child(1),
    .mp-stats-bar .stat-item:nth-child(2) { border-bottom: 1px solid var(--mp-slate-100); }
}

/* Section header (legacy - shared pages) */
.mp-section-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--mp-slate-900);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mp-section-header p {
    font-size: 0.85rem;
    color: var(--mp-slate-500);
    margin: 0;
}
.mp-section-header .view-all-btn {
    padding: 10px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.mp-section-header .view-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============== MARKETPLACE MOBILE ============== */
@media (max-width: 768px) {
    .mp-section-header { flex-direction: column; align-items: flex-start !important; gap: 10px; }
    .mp-section-header h2 { font-size: 1.15rem; }
}
@media (max-width: 480px) {
    .mp-section-header h2 { font-size: 1rem; }
    .mp-section-header .view-all-btn { padding: 8px 14px; font-size: 0.78rem; }
}
@media (max-width: 380px) {
    .mp-hero-v2 h1 { font-size: 1.2rem; }
    .mp-hero-v2 .hero-sub { font-size: 0.82rem; }
    .mp-container, .mp-container-md, .mp-container-sm { padding: 10px !important; }
    .mp-card-grid { gap: 10px; }
    .mp-section-header h2 { font-size: 0.92rem; }
    .mp-links a { font-size: 0.72rem; padding: 4px 6px; }
    .mp-sec { padding: 28px 0 8px; }
    .cat-pill { padding: 6px 10px; font-size: 0.68rem; }
}
@media (max-width: 320px) {
    .mp-hero-v2 { padding: 28px 10px 24px; }
    .mp-hero-v2 h1 { font-size: 1.05rem; }
    .mp-logo { font-size: 0.78rem; gap: 4px; }
    .mp-logo img { width: 26px !important; height: 26px !important; }
    .mp-signup { font-size: 0.72rem; padding: 5px 10px; }
}
