/* ============================================================
   MEDICHPLUS — MARKETPLACE STYLES
   Consistent with Dashboard / About Us / Services / Contact Us:
   navy + green + teal, Manrope (display) + Inter (body),
   20px radius cards, soft elevated shadows, restrained motion.
   Scoped under .mplus-marketplace so it won't leak elsewhere.
   ============================================================ */

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

.mplus-marketplace {
    --navy-950:#0d2140;
    --navy-900:#14315c;
    --navy-700:#1b3a6b;
    --green-600:#2f8f3b;
    --green-500:#3ea24a;
    --green-400:#5cb85f;
    --teal-600:#1e7f8c;
    --teal-500:#2596a3;
    --bg:#f5f7f9;
    --card:#ffffff;
    --ink:#132133;
    --ink-soft:#5a6572;
    --line:#e2e7ec;
    --radius:20px;

    font-family:'Inter',sans-serif;
    color:var(--ink);
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
    max-width:1180px;
    margin:0 auto;
    padding:0 24px 60px;
}

.mplus-marketplace *{box-sizing:border-box;}

.mplus-marketplace h1,
.mplus-marketplace h2,
.mplus-marketplace h3,
.mplus-marketplace h4{
    font-family:'Manrope',sans-serif;
    letter-spacing:-0.01em;
    margin:0;
    color:var(--navy-900);
}

.mplus-marketplace a{text-decoration:none;color:inherit;}
.mplus-marketplace img{max-width:100%;display:block;}
.mplus-marketplace button{font-family:'Manrope',sans-serif;cursor:pointer;border:none;}

.mplus-marketplace :focus-visible{
    outline:3px solid var(--teal-500);
    outline-offset:3px;
}

@media (prefers-reduced-motion: reduce){
    .mplus-marketplace *{
        animation-duration:0.001ms !important;
        animation-iteration-count:1 !important;
        transition-duration:0.001ms !important;
    }
}

@keyframes mplus-rise{
    from{opacity:0;transform:translateY(16px);}
    to{opacity:1;transform:translateY(0);}
}
@keyframes mplus-float{
    0%,100%{transform:translate(0,0);}
    50%{transform:translate(-16px,20px);}
}
@keyframes mplus-pulse{
    0%{box-shadow:0 0 0 0 rgba(92,184,95,.55);}
    70%{box-shadow:0 0 0 8px rgba(92,184,95,0);}
    100%{box-shadow:0 0 0 0 rgba(92,184,95,0);}
}
@keyframes mplus-shimmer{
    0%{background-position:-200% 0;}
    100%{background-position:200% 0;}
}

/* ============================================================
   HERO + SEARCH
   ============================================================ */
.mplus-marketplace-hero{
    position:relative;
    overflow:hidden;
    padding:64px 44px 56px;
    border-radius:var(--radius);
    margin:28px 0 24px;
    background:radial-gradient(120% 140% at 15% 0%, #1a3f74 0%, var(--navy-950) 55%, #0a1830 100%);
    color:#fff;
    text-align:center;
    box-shadow:0 30px 60px -24px rgba(13,33,64,.55);
    animation:mplus-rise .6s cubic-bezier(.2,.7,.2,1) both;
}

.mplus-marketplace-overlay{
    position:absolute;
    top:-140px;
    right:-110px;
    width:340px;
    height:340px;
    background:radial-gradient(circle, rgba(92,184,95,.25) 0%, rgba(92,184,95,0) 70%);
    border-radius:50%;
    animation:mplus-float 9s ease-in-out infinite;
}
.mplus-marketplace-hero::after{
    content:"";
    position:absolute;
    left:-90px;
    bottom:-120px;
    width:280px;
    height:280px;
    background:radial-gradient(circle, rgba(37,150,163,.28) 0%, rgba(37,150,163,0) 70%);
    border-radius:50%;
    animation:mplus-float 11s ease-in-out infinite reverse;
}

.mplus-marketplace-hero-content{position:relative;z-index:2;}

.mplus-marketplace-hero h1{
    font-size:clamp(28px,4vw,38px);
    font-weight:800;
    color:#fff;
}

.mplus-marketplace-hero-content > p{
    margin:12px auto 30px;
    max-width:520px;
    font-size:15.5px;
    color:#c7d3e2;
    font-weight:500;
}

.mplus-marketplace-search{
    display:flex;
    justify-content:center;
    gap:12px;
    max-width:560px;
    margin:0 auto;
}

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

#mplus-marketplace-search{
    width:100%;
    padding:16px 22px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.28);
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(10px);
    color:#fff;
    font-family:'Inter',sans-serif;
    font-size:15px;
    font-weight:500;
    transition:background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
#mplus-marketplace-search::placeholder{color:#c7d3e2;}
#mplus-marketplace-search:focus{
    background:rgba(255,255,255,.18);
    border-color:var(--green-400);
    box-shadow:0 0 0 4px rgba(92,184,95,.22);
    outline:none;
}

#mplus-search-suggestions{
    display:none;
    position:absolute;
    top:calc(100% + 10px);
    left:0;right:0;
    background:var(--card);
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 20px 45px -18px rgba(13,33,64,.45);
    z-index:20;
    text-align:left;
    animation:mplus-rise .25s ease both;
}
.mplus-search-suggestion{
    padding:13px 20px;
    font-size:14.5px;
    font-weight:600;
    color:var(--navy-900);
    cursor:pointer;
    transition:background .2s ease, padding-left .2s ease;
    border-bottom:1px solid var(--line);
}
.mplus-search-suggestion:last-child{border-bottom:none;}
.mplus-search-suggestion:hover{
    background:var(--bg);
    padding-left:26px;
    color:var(--green-600);
}

.mplus-marketplace-search > button{
    flex-shrink:0;
    padding:16px 28px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--green-500),var(--teal-600));
    color:#fff;
    font-weight:700;
    font-size:15px;
    box-shadow:0 14px 28px -12px rgba(46,159,90,.55);
    transition:transform .25s ease, box-shadow .25s ease;
}
.mplus-marketplace-search > button:hover{
    transform:translateY(-3px);
    box-shadow:0 18px 34px -12px rgba(46,159,90,.65);
}

@media(max-width:600px){
    .mplus-marketplace-search{flex-direction:column;}
}

/* ============================================================
   STATS
   ============================================================ */
.mplus-marketplace-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
    margin-bottom:36px;
    animation:mplus-rise .6s cubic-bezier(.2,.7,.2,1) both;
    animation-delay:.1s;
}
@media(max-width:640px){
    .mplus-marketplace-stats{grid-template-columns:1fr;}
}

.mplus-marketplace-stat{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:16px;
    padding:26px 20px;
    text-align:center;
    box-shadow:0 10px 26px -16px rgba(20,49,92,.25);
    transition:transform .25s ease, box-shadow .25s ease;
}
.mplus-marketplace-stat:hover{
    transform:translateY(-5px);
    box-shadow:0 20px 40px -18px rgba(20,49,92,.32);
}
.mplus-marketplace-stat strong{
    display:block;
    font-family:'Manrope',sans-serif;
    font-size:30px;
    font-weight:800;
    background:linear-gradient(135deg,var(--green-500),var(--teal-600));
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}
.mplus-marketplace-stat span{
    display:block;
    margin-top:8px;
    font-size:13.5px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:var(--ink-soft);
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.mplus-marketplace-section-title{
    text-align:center;
    max-width:620px;
    margin:0 auto 30px;
    animation:mplus-rise .6s cubic-bezier(.2,.7,.2,1) both;
    animation-delay:.16s;
}
.mplus-marketplace-section-title h2{
    font-size:clamp(22px,2.6vw,28px);
    font-weight:800;
    position:relative;
    display:inline-block;
    padding-bottom:14px;
}
.mplus-marketplace-section-title h2::after{
    content:"";
    position:absolute;
    left:50%;
    bottom:0;
    transform:translateX(-50%);
    width:64px;
    height:4px;
    border-radius:999px;
    background:linear-gradient(90deg,var(--green-500),var(--teal-600));
}
.mplus-marketplace-section-title p{
    margin-top:12px;
    font-size:14.5px;
    color:var(--ink-soft);
    font-weight:500;
}

/* ============================================================
   COMPANY GRID + CARDS
   ============================================================ */
.mplus-marketplace-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:26px;
}

.mplus-marketplace-company-card{
    position:relative;
    background:var(--card);
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:0 14px 34px -22px rgba(20,49,92,.28);
    transition:transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
    animation:mplus-rise .55s cubic-bezier(.2,.7,.2,1) both;
}
.mplus-marketplace-company-card:hover{
    transform:translateY(-8px);
    box-shadow:0 26px 50px -22px rgba(20,49,92,.35);
}
.mplus-marketplace-company-card::before{
    content:"";
    position:absolute;left:0;top:0;
    width:100%;height:4px;
    background:linear-gradient(90deg,var(--green-500),var(--teal-600));
    transform:scaleX(0);
    transform-origin:left;
    transition:transform .35s ease;
    z-index:3;
}
.mplus-marketplace-company-card:hover::before{transform:scaleX(1);}

.mplus-marketplace-company-logo{
    position:relative;
    height:112px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg, var(--navy-900), var(--navy-950));
    overflow:hidden;
}
.mplus-marketplace-company-logo img{
    width:76px;
    height:76px;
    object-fit:cover;
    border-radius:16px;
    background:#fff;
    padding:6px;
    box-shadow:0 10px 24px -10px rgba(0,0,0,.4);
    transition:transform .35s ease;
}
.mplus-marketplace-company-card:hover .mplus-marketplace-company-logo img{
    transform:scale(1.06);
}
.mplus-marketplace-placeholder-logo{
    width:76px;height:76px;
    border-radius:16px;
    display:flex;align-items:center;justify-content:center;
    font-size:30px;
    background:linear-gradient(135deg,var(--green-500),var(--teal-600));
    box-shadow:0 10px 24px -10px rgba(0,0,0,.4);
}

.mplus-marketplace-company-info{
    padding:22px 22px 24px;
    position:relative;
}

.mplus-verified-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:5px 12px;
    border-radius:999px;
    background:#e7f7ed;
    color:var(--green-600);
    font-size:12px;
    font-weight:700;
    letter-spacing:.02em;
    margin-bottom:10px;
}
.mplus-verified-badge::before{
    content:"";
    width:7px;height:7px;
    border-radius:50%;
    background:var(--green-500);
    animation:mplus-pulse 2s infinite;
}

.mplus-marketplace-company-info h3{
    font-size:18px;
    font-weight:800;
    margin-bottom:8px;
    line-height:1.3;
}

.mplus-business-badge{
    display:inline-block;
    padding:5px 13px;
    border-radius:999px;
    background:var(--bg);
    border:1px solid var(--line);
    color:var(--teal-600);
    font-size:12px;
    font-weight:700;
    letter-spacing:.03em;
    text-transform:uppercase;
    margin-bottom:10px;
}

.mplus-marketplace-company-info > p{
    font-size:13.5px;
    color:var(--ink-soft);
    font-weight:600;
    margin-bottom:16px;
}

.mplus-company-mini-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
    padding:14px 0;
    margin-bottom:18px;
    border-top:1px solid var(--line);
    border-bottom:1px solid var(--line);
}
.mplus-company-mini-stats > div{text-align:center;}
.mplus-company-mini-stats strong{
    display:block;
    font-family:'Manrope',sans-serif;
    font-size:17px;
    font-weight:800;
    color:var(--navy-900);
}
.mplus-company-mini-stats span{
    display:block;
    margin-top:2px;
    font-size:11px;
    font-weight:700;
    letter-spacing:.03em;
    text-transform:uppercase;
    color:var(--ink-soft);
}

.mplus-marketplace-view-button{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    padding:13px 20px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--green-500),var(--teal-600));
    color:#fff;
    font-family:'Manrope',sans-serif;
    font-weight:700;
    font-size:14px;
    transition:transform .25s ease, box-shadow .25s ease, letter-spacing .25s ease;
    box-shadow:0 12px 24px -12px rgba(46,159,90,.5);
}
.mplus-marketplace-view-button:hover{
    transform:translateY(-2px);
    letter-spacing:.02em;
    box-shadow:0 16px 30px -12px rgba(46,159,90,.6);
}

/* ============================================================
   FEATURED OVERLAY (auto-rotating slides over the card)
   ============================================================ */
.mplus-featured-overlay{
    position:absolute;
    inset:0;
    z-index:5;
    background:var(--card);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .4s ease, visibility .4s ease;
}
.mplus-marketplace-company-card:hover .mplus-featured-overlay{
    /* overlay only activates via JS .active state on slides,
       card hover reveals container so slides can animate */
    visibility:visible;
    pointer-events:auto;
}

.mplus-featured-slide{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    opacity:0;
    transform:scale(1.04);
    transition:opacity .55s ease, transform .7s ease;
    background:linear-gradient(180deg, rgba(13,33,64,0) 0%, rgba(13,33,64,.75) 78%, rgba(13,33,64,.92) 100%), var(--navy-950);
}
.mplus-featured-slide img{
    width:100%;
    height:100%;
    object-fit:cover;
    position:absolute;
    inset:0;
    z-index:-1;
}
.mplus-featured-slide.active{
    opacity:1;
    transform:scale(1);
}
.mplus-featured-slide.exit{
    opacity:0;
    transform:scale(.97);
}

.mplus-featured-slide span{
    margin-top:auto;
    align-self:flex-start;
    margin-left:22px;
    padding:5px 13px;
    border-radius:999px;
    background:rgba(255,255,255,.16);
    backdrop-filter:blur(6px);
    color:#9fd6a8;
    font-size:11.5px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
    border:1px solid rgba(255,255,255,.25);
}
.mplus-featured-slide h3{
    margin:8px 22px 0;
    color:#fff;
    font-size:17px;
    font-weight:800;
}
.mplus-featured-slide p{
    margin:6px 22px 20px;
    color:#c7d3e2;
    font-size:12.5px;
    font-weight:500;
}

/* Show overlay container permanently when it has active slides,
   independent of hover, so the rotation is visible at rest too */
.mplus-featured-overlay:has(.mplus-featured-slide.active),
.mplus-featured-overlay:has(.mplus-featured-slide.exit){
    visibility:visible;
    opacity:1;
    pointer-events:auto;
}

/* ============================================================
   EMPTY / LOADING STATE (optional shimmer placeholder)
   ============================================================ */
.mplus-marketplace p:only-child{
    text-align:center;
    padding:60px 20px;
    color:var(--ink-soft);
    font-weight:600;
    font-size:15px;
}

.mplus-marketplace-skeleton{
    border-radius:var(--radius);
    height:280px;
    background:linear-gradient(90deg, var(--line) 25%, #eef1f4 37%, var(--line) 63%);
    background-size:400% 100%;
    animation:mplus-shimmer 1.6s ease infinite;
}

/* ============================================================
   RESPONSIVE TUNING
   ============================================================ */
@media(max-width:768px){
    .mplus-marketplace-hero{padding:48px 26px 42px;}
    .mplus-marketplace-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));}
}
@media(max-width:480px){
    .mplus-marketplace-grid{grid-template-columns:1fr;}
    .mplus-marketplace-company-info{padding:20px 18px 22px;}
}
