/* ======================================================
   GLOBAL RESET (SAFE)
====================================================== */
.edu-course-grid,
.edu-university-carousel {
    box-sizing: border-box;
}

.edu-course-card *,
.edu-university-card * {
    box-sizing: border-box;
}

/* Prevent layout flash before Swiper loads */
.edu-university-carousel {
    visibility: hidden;
}

.edu-university-carousel.swiper-initialized {
    visibility: visible;
}


/* ======================================================
   COURSES GRID
====================================================== */
.edu-course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

/* limit to 8 cards */
.edu-course-grid > .edu-course-card:nth-child(n+9) {
    display: none;
}

/* ======================================================
   COURSE CARD
====================================================== */
.edu-course-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    padding: 22px 22px 24px;
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}

.edu-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(0,0,0,.14);
}

/* ======================================================
   COURSE TOP ACCENT (FIXED)
====================================================== */
.edu-course-accent {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background: #2563eb; /* fallback */
    border-radius: 18px 18px 0 0;
}

/* ======================================================
   COURSE BADGE (SHORT NAME)
   Colors by card position – no per-course class needed
====================================================== */
.edu-course-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    background: #2563eb; /* fallback */
    border-radius: 10px;
    margin: 16px 0 12px;
    width: fit-content;
}

/* Automatic palette by card index (1–8) */
.edu-course-card:nth-child(1) .edu-course-badge,
.edu-course-card:nth-child(1) .edu-course-accent { background: #2563eb; }
.edu-course-card:nth-child(2) .edu-course-badge,
.edu-course-card:nth-child(2) .edu-course-accent { background: #16a34a; }
.edu-course-card:nth-child(3) .edu-course-badge,
.edu-course-card:nth-child(3) .edu-course-accent { background: #f97316; }
.edu-course-card:nth-child(4) .edu-course-badge,
.edu-course-card:nth-child(4) .edu-course-accent { background: #06b6d4; }
.edu-course-card:nth-child(5) .edu-course-badge,
.edu-course-card:nth-child(5) .edu-course-accent { background: #ec4899; }
.edu-course-card:nth-child(6) .edu-course-badge,
.edu-course-card:nth-child(6) .edu-course-accent { background: #14b8a6; }
.edu-course-card:nth-child(7) .edu-course-badge,
.edu-course-card:nth-child(7) .edu-course-accent { background: #6366f1; }
.edu-course-card:nth-child(8) .edu-course-badge,
.edu-course-card:nth-child(8) .edu-course-accent { background: #a35114; }

/* ======================================================
   COURSE TITLE
====================================================== */
.edu-course-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
    line-height: 1.35;
}

/* ======================================================
   COURSE META
====================================================== */
.edu-course-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.edu-course-meta li {
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
}

/* divider */
.edu-course-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0;
}

/* ======================================================
   COURSE AVAILABILITY
====================================================== */
.edu-course-availability {
    font-size: 14px;
    color: #475569;
    margin-bottom: 18px;
}

/* ======================================================
   COURSE BUTTON
====================================================== */
.edu-btn-primary {
    margin-top: auto;
    background: #00a651;
    color: #ffffff;
    /*padding: 10px;
    border-radius: 12px;*/
    padding: 10px 20px;
  border-radius: 30px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background .25s ease;
}

.edu-btn-primary:hover {
    background: #009245;
    color:#fff;
}

.edu-btn-outline {
    margin-top: auto;
    background: #00a65000;
    color: #009245;
    padding: 10px;
    border-radius: 30px;
    border: 1px solid #009245;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background .25s ease;
}

.edu-btn-outline:hover {
    background: #fff;
}

/* ======================================================
   COURSES RESPONSIVE
====================================================== */
@media (max-width: 1200px) {
    .edu-course-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 900px) {
    .edu-course-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 520px) {
    .edu-course-grid { grid-template-columns: 1fr; }
}

/* ======================================================
   UNIVERSITY CAROUSEL WRAPPER
====================================================== */
.edu-uni-carousel-wrap {
    position: relative;
    padding: 0 10px;
}

/* ======================================================
   NAVIGATION
====================================================== */
.edu-uni-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    cursor: pointer;
    color: #222;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
    z-index: 20;
}

.edu-uni-nav.prev { left: 0; }
.edu-uni-nav.next { right: 0; }

/* ======================================================
   UNIVERSITY CARD
====================================================== */
.edu-university-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.edu-university-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(0,0,0,.14);
}

/* ======================================================
   UNIVERSITY IMAGE
====================================================== */
.edu-uni-header {
    position: relative;
    height: 210px;
}

.edu-uni-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* MODE BADGE */
.edu-uni-mode {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    color: #ffffff;
}

.edu-uni-mode.online   { background:#2563eb; }
.edu-uni-mode.distance { background:#9333ea; }
.edu-uni-mode.private  { background:#16a34a; }
.edu-uni-mode.govt     { background:#0f766e; }
/* OFFLINE MODE */
.edu-uni-mode.offline {
    background: #64748b; /* neutral slate */
    color: #fff;
}


/* ======================================================
   UNIVERSITY BODY
====================================================== */
.edu-uni-body {
    padding: 18px;
}

.edu-uni-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.edu-uni-location,
.edu-uni-accreditation {
    font-size: 14px;
    color: #475569;
    margin-bottom: 6px;
}

.edu-uni-accreditation {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    line-height: 1.4;
}

.edu-uni-accreditation::before {
    content: "✔";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}


/* ======================================================
   UNIVERSITY STATS
====================================================== */
.edu-uni-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0;
    text-align: center;
}

.edu-uni-stats div {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: #334155;
}

.edu-uni-stats div span {
    font-size: 16px;
    margin-bottom: 4px;
}

.edu-uni-stats strong {
    font-size: 15px;
    font-weight: 700;
}


/* ======================================================
   UNIVERSITY ACTIONS (FIXED ALIGNMENT)
====================================================== */
.edu-uni-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
}

.edu-uni-actions .btn-primary {
    width: 100%;
}

.edu-uni-actions .btn-outline {
    white-space: nowrap;
}


.edu-uni-actions .btn-primary {
    background: #00a651;
    color: #ffffff;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.edu-uni-actions .btn-outline {
    border: 2px solid #00a651;
    color: #00a651;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

/* ===============================
   COURSE ACTION BUTTONS
================================ */
.edu-course-actions {
    display: flex;
    gap: 12px;               /* spacing between buttons */
    margin-top: 14px;
}




/* ======================================================
   UNIVERSITY RESPONSIVE
====================================================== */
@media (max-width: 768px) {
    .edu-uni-carousel-wrap {
        padding: 0 30px;
    }

    .edu-uni-actions {
        grid-template-columns: 1fr;
    }
    .edu-course-actions {
  margin-top: 12px;
  gap: 10px;
  grid-template-columns: 1fr;
  display: grid;
}
}

/* ======================================================
   DESKTOP CARD FIXES – FEATURED UNIVERSITY
====================================================== */

/* --- FIX IMAGE TO BODY GAP --- */
.edu-uni-header {
    margin-bottom: 0; /* remove gap */
}

.edu-uni-body {
    padding-top: 14px; /* controlled spacing */
}

/* --- FIX NAV ARROWS POSITION (OUTSIDE CARDS) --- */
.edu-uni-nav {
    top: 45%;
}

.edu-uni-nav.prev {
    left: -48px;
}

.edu-uni-nav.next {
    right: -48px;
}

/* --- STATS ROW – MATCH REFERENCE --- */
.edu-uni-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 14px 0;
    margin: 14px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

/* Each stat block */
.edu-uni-stats div {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: #475569;
}

/* Icon + number inline */
.edu-uni-stats div strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

/* Label below */
.edu-uni-stats div small {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    color: #64748b;
}

/* --- BUTTON AREA FIX --- */
.edu-course-actions {
    margin-top: 12px; /* tighten spacing */
    gap: 10px;
}

.edu-course-actions a {
    padding: 11px 30px;
    font-size: 14px;
}

/* ======================================================
   MOBILE – KEEP NAV INSIDE VIEW
====================================================== */
@media (max-width: 768px) {

    .edu-uni-nav.prev {
        left: -6px;
    }

    .edu-uni-nav.next {
        right: -6px;
    }

    .edu-uni-stats {
        padding: 12px 0;
        margin: 12px 0;
    }

    .swiper{
        border: 1px solid #00a65126;
  border-radius: 20px;
    }

    .edu-uni-nav{
        width: 24px;
  height: 48px;
    }
}
