/* Shared listing pages: programs.php + courses.php */

.listing-hero{
    padding:22px 0 8px;
}

.listing-breadcrumb{
    font-size:.9rem;
    color:#667085;
    margin-bottom:12px;
}

.listing-breadcrumb a{
    color:var(--brand,#0039a6);
    text-decoration:none;
}

.listing-breadcrumb .sep{
    color:#98a2b3;
    margin:0 8px;
}

.listing-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
}

.listing-title{
    margin:0;
    font-size:clamp(24px,2.6vw,34px);
    font-weight:700;
    line-height:1.18;
    color:#1f2937;
}

.listing-subtitle{
    margin:8px 0 0;
    font-size:.96rem;
    color:#667085;
    max-width:760px;
    line-height:1.65;
}

.listing-count{
    white-space:nowrap;
    padding:9px 13px;
    background:#fff;
    border:1px solid #d8deea;
    border-radius:999px;
    font-size:.9rem;
    font-weight:600;
    color:#0039a6;
}

.listing-main{
    padding:16px 0 48px;
}

.listing-map-card{
    background:#fff;
    border:1px solid #d8deea;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 20px rgba(17,24,39,.04);
    position:sticky;
    top:132px;
}

.listing-map-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 15px;
    border-bottom:1px solid #e7ebf3;
    background:#fff;
}

.listing-map-title{
    margin:0;
    font-size:1rem;
    font-weight:700;
    color:#1f2937;
}

.listing-map-actions{
    display:flex;
    align-items:center;
    gap:8px;
}

.listing-map-btn{
    width:38px;
    height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    border:1px solid #d8deea;
    background:#fff;
    color:#0039a6;
    text-decoration:none;
}

.listing-map-frame{
    aspect-ratio:4 / 5;
    background:#eef3fb;
}

.listing-map-frame iframe{
    width:100%;
    height:100%;
    border:0;
    display:block;
}

.listing-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}

.institute-listing-card{
    background:#fff;
    border:1px solid #d8deea;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 20px rgba(17,24,39,.04);
    transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
    height:100%;
}

.institute-listing-card:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 24px rgba(17,24,39,.06);
    border-color:#cfd7e6;
}

.institute-listing-image{
    position:relative;
    aspect-ratio:16 / 10;
    overflow:hidden;
    background:#e8eef8;
}

.institute-listing-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.institute-listing-badge{
    position:absolute;
    top:10px;
    left:10px;
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:7px 10px;
    border-radius:999px;
    font-size:.72rem;
    font-weight:700;
    background:rgba(0,57,166,.92);
    color:#fff;
}

.institute-listing-body{
    padding:14px 14px 16px;
}

.institute-listing-title{
    margin:0 0 8px;
    font-size:1.08rem;
    line-height:1.3;
    font-weight:700;
    color:#1f2937;
}

.institute-listing-meta{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:8px;
    color:#667085;
    font-size:.84rem;
}

.institute-listing-excerpt{
    margin:0 0 12px;
    color:#4b5563;
    font-size:.9rem;
    line-height:1.65;
}

.institute-listing-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.institute-listing-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    padding:0 14px;
    border-radius:12px;
    background:#0039a6;
    color:#fff;
    text-decoration:none;
    font-size:.88rem;
    font-weight:700;
}

.institute-listing-link:hover{
    background:#002f88;
    color:#fff;
}

.institute-listing-photo{
    width:42px;
    height:42px;
    border-radius:12px;
    object-fit:cover;
    border:1px solid #d8deea;
}

.listing-pagination{
    margin-top:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}

.listing-page-link{
    min-width:40px;
    height:40px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    border:1px solid #d8deea;
    background:#fff;
    color:#1f2937;
    text-decoration:none;
    font-size:.88rem;
    font-weight:600;
}

.listing-page-link.is-active,
.listing-page-link:hover{
    background:#0039a6;
    border-color:#0039a6;
    color:#fff;
}

@media (max-width:1199.98px){
    .listing-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:991.98px){
    .listing-map-card{
        position:static;
        top:auto;
    }

    .listing-map-frame{
        aspect-ratio:16 / 9;
    }
}

@media (max-width:767.98px){
    .listing-grid{
        grid-template-columns:1fr;
    }

    .listing-title{
        font-size:28px;
    }

    .listing-map-toolbar{
        padding:12px 14px;
    }

    .institute-listing-title{
        font-size:1rem;
    }
}

/* === COURSE DETAILS (NEW DESIGN) === */

.course-top-layout{
    display:grid;
    grid-template-columns:120px 1fr auto;
    gap:20px;
    align-items:center;
}

.course-logo-wrap{
    width:100px;
    height:100px;
    border:2px solid #e5e7eb;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
}
.course-logo-wrap img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.course-title{
    font-size:1.4rem;
    font-weight:700;
    margin-bottom:6px;
}

.course-institute{
    font-size:14px;
    color:#667085;
    margin-bottom:10px;
}

.course-badges{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.badge-promo{
    border:2px solid #22c55e;
    color:#22c55e;
    padding:6px 12px;
    border-radius:10px;
    font-size:13px;
    font-weight:700;
}

.badge-category{
    border:2px solid var(--brand);
    color:var(--brand);
    padding:6px 12px;
    border-radius:10px;
    font-size:13px;
    font-weight:700;
}

/* Promotion badge */
.badge-promo{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    background:#e8fff1;
    color:#0a7a3f;
    border:1px solid #b6f0cf;
}

.badge-promo::before{
    content:"🔥";
    font-size:12px;
}

/* Inline promotion (fees section) */
.badge-promo-inline{
    margin-left:8px;
    font-size:11px;
    font-weight:700;
    color:#0a7a3f;
}

.course-apply{
    display:flex;
    align-items:center;
    justify-content:flex-end;
}

.course-info-list{
    display:flex;
    flex-direction:column;
    gap:12px;
    font-size:14px;
}

.course-info-list .label{
    display:inline-block;
    color:var(--brand);
    padding:4px 10px;
    border-radius:8px;
    font-size:12px;
    font-weight:700;
    margin-right:6px;
}


.course-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff3cd;
    color: #8a5a00;
    border: 1px solid #ffe08a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.course-card {
    position: relative;
}

.course-card:has(.course-promo-badge) {
    border-color: #ffe08a;
    background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
}