/*
************************ Student Progress Dashboard ***********
 */
#phd-progress-dashboard-single .ta-profile-photo {
    width: 200px; /* pick a default size */
    overflow: hidden;
    aspect-ratio: 1 / 1; /* keeps it square */
    border-radius: 20px;
    flex: 0 0 auto; /* ✅ don’t grow or shrink in flex layouts */
    align-self: flex-start; /* ✅ override parent stretch */
}

@media screen and (max-width: 400px) {
    #phd-progress-dashboard-single .ta-profile-photo {
        width: 150px;
    }
}

#phd-progress-dashboard-single .card {
    overflow: hidden;
    border: 1px solid rgba(112, 112, 112, 0.40);
    border-radius: 16px;
    padding: 15px 8px 10px;
}

#phd-progress-dashboard-single .modules-enrolled {
    grid-template-columns: repeat(auto-fill, minmax(100px, 250px));
    justify-content: start;
    gap: 10px;
}

#phd-progress-dashboard-single .modules-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem; /* space between cards */
}

#phd-progress-dashboard-single .modules-column {
    display: flex;
    flex-direction: row;
    @media screen and (max-width: 1600px) {
        flex-direction: column;
    }
    @media screen and (min-width: 992px) {
        align-self: start;
    }
}

#phd-progress-dashboard-single .key-milestones {
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 300px));
    justify-content: start;
    gap: 6px;
}

#phd-progress-dashboard-single .toggle-arrow {
    transition: transform 0.3s ease;
}

#phd-progress-dashboard-single a[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

/* Compact tabs */
#thesis-advisor-portal-students .nav-link {
    padding: .55rem .8rem;
    font-size: .95rem;
    font-weight: 600;
    color: #495057; /* inactive: neutral */
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: 0;
    border-radius: .4rem .4rem 0 0;
    line-height: 1.2;
}
#thesis-advisor-portal-students .nav-link:hover {
    color: #212529;
    background-color: #f1f3f5;
}
#thesis-advisor-portal-students .nav-link.active {
    color: #0d6efd; /* only active uses blue */
    background-color: #fff;
    border-color: #dee2e6;
    box-shadow: inset 0 -2px 0 #0d6efd; /* thinner accent */
}

/* Animated gradient */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* HERO that morphs from fullscreen -> banner */
.sps-hero-wrap {
    background: linear-gradient(-45deg, #3b82f6, #9333ea, #10b981, #f59e0b);
    background-size: 400% 400%;
    animation: gradientFlow 12s ease infinite;
    position: relative;

    /* fullscreen fit without causing page scroll */
    min-height: 600px;
    padding-top: 250px;

    display: flex;
    transition: min-height .6s ease, padding .6s ease, background-position .6s ease;
    /* Extra-tight on small screens */
    @media (max-width: 768px) {
        min-height: 700px;
        padding-top: 150px;
    }
}
/* Subtle dark overlay for readability */
.sps-hero-wrap::after {
    content: "";
    position: absolute;
    inset: 0;

    pointer-events: none;
}
.sps-hero-inner {
    position: relative;
    text-align: center; /* centered by default */
    margin: 0 auto;
}
.sps-hero-title {
    margin: 0 0 8px;
    font-size: 2.3rem;
    line-height: 1.25;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    color: white;
}
.sps-hero-caption {
    margin: 0 0 14px;
    font-size: 1.05rem;
    color: #f9fafb;
    opacity: 0.95;
}

/* Search bar (shared) */
.sps-searchbar {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px; /* tighter padding */
    margin: 0 auto;
    max-width: 680px;
    width: 92%;
    transition: justify-content .3s ease, margin .3s ease;
}
.sps-searchbar input[type="text"] {
    flex: 1 1 280px;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 10px;
    border-radius: 8px;
    min-width: 0;
}
.sps-searchbar button {
    border: 0;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    background: #2563eb;
    color: #fff;
}

/* When ACTIVE (after search): hero collapses to banner and aligns left */
.sps-root.sps-active .sps-hero-wrap {
    min-height: 240px; /* banner height */
    max-height: 240px;
    padding-top: 50px; /* banner padding */
    animation-duration: 18s; /* calmer flow when active */
    /* Extra-tight on small screens */
    @media (max-width: 768px) {
        min-height: 350px;
    }
}
.sps-root.sps-active .sps-hero-inner {
    text-align: left;
    margin: 0;
}
.sps-root.sps-active .sps-hero-title {
    font-size: 2rem;
}
.sps-root.sps-active .sps-hero-caption {
    max-width: 700px;
}
.sps-root.sps-active .sps-hero-inner .sps-searchbar {
    justify-content: flex-start; /* left align after collapse */
    margin-left: 0;
    margin-right: auto;
}

/* RESULTS AREA (hidden until active) */
.sps-content {
    display: none;
}
.sps-root.sps-active .sps-content {
    display: block;
    position: relative
}

/* Results responsive grid */
.sps-results {
    margin-top: 10px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.sps-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: box-shadow .15s ease, transform .15s ease;
}
.sps-card:hover {
    box-shadow: 0 10px 18px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
}
.sps-photo {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
}
.sps-meta {
    min-width: 0;
}
.sps-name {
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sps-id {
    margin: 2px 0;
    color: #6b7280;
    font-size: 0.92rem;
}
.sps-email {
    color: #374151;
    font-size: 0.85rem;
    word-break: break-all;
}
.sps-link {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #dbe2f0;
    padding: 6px 12px;
    border-radius: 10px;
    transition: background .15s ease;
}
.sps-link:hover {
    background: #f3f6ff;
}

/* Extra-tight on small screens */
@media (max-width: 576px) {
    #thesis-advisor-portal-students .nav-link {
        padding: .45rem .6rem;
        font-size: .9rem;
    }
}
/*
************************ Custom Search ************************
*/
.event-list-swiper .swiper-slide {
    height: auto !important; /* Make sure all slides stretch to the same height */
}
.event-list-swiper .swiper-slide a {
    display: flex !important;
}
.glowing-orange {
    box-shadow: 0 0 20px rgba(239, 124, 0, 0.5); /* Initial glow around edges using #ef7c00 */
    animation: glowing-orange 2s infinite alternate; /* Apply the animation */
}

/* Define the animation using keyframes */
@keyframes glowing-orange {
    0% {
        box-shadow: 0 0 5px rgba(239, 124, 0, 0.5); /* Start with a small glow */
    }
    50% {
        box-shadow: 0 0 10px rgba(239, 124, 0, 0.7); /* Medium glow */
    }
    100% {
        box-shadow: 0 0 15px rgba(239, 124, 0, 1); /* Strongest glow */
    }
}
.news-list-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 5px;
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}
@media only screen and (min-width: 700px) and (max-width: 1400px) {
    .news-list-wrapper {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
    }

    .news-list-wrapper .headline-img {
        min-height: 250px;
        max-height: 300px;
    }
}

.newsfeed-page .news-list-wrapper .headline-img,
.newsfeed-page .news-list-wrapper .nf-card__imagewrap {
    min-height: unset !important;
    max-height: unset !important;
}
@media only screen and (min-width: 1400px) {
    .news-list-wrapper {
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 10px;
    }

    .news-list-wrapper .headline-img {
        min-height: 250px;
        max-height: 350px;
    }
}

.card-list-wrapper {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(300px, 1fr));
    grid-gap: 20px;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Student portal resources list */
#student_policy_hits.card-list-wrapper {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    grid-gap: 16px;
}
@media (max-width: 1400px) {
    #student_policy_hits.card-list-wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 960px) {
    #student_policy_hits.card-list-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    #student_policy_hits.card-list-wrapper {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}
@media (max-width: 450px) {
    .card-list-wrapper {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media only screen and (min-width: 450px) and (max-width: 960px) {
    .card-list-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (min-width: 960px) and (max-width: 1400px) {
    .card-list-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card-list-masonry-wrapper {
    -moz-column-gap: 20px;
    column-gap: 20px;
    -moz-column-fill: balance;
    column-fill: balance;
    margin: 20px auto 0;
    padding: 2rem;
    -moz-column-count: 1;
    column-count: 1;
    @media only screen and (min-width: 650px) and (max-width: 1200px) {
        -moz-column-count: 2;
        column-count: 2;
    }
    @media only screen and (min-width: 1200px) and (max-width: 1400px) {
        -moz-column-count: 3;
        column-count: 3;
    }
    @media only screen and (min-width: 1400px) {
        -moz-column-count: 4;
        column-count: 4;
    }

}

.admin-page-wrapper {
    background-color: var(--color-lightgray);
    margin: 0 auto;
    height: 100%;
    min-height: 50vh;
    padding: 60px 1.5rem;
}

@media (max-width: 1000px) {
    .admin-page-wrapper {
        padding: 40px 1rem;
    }

    .admin-page-wrapper .container {
        padding: 0;
    !important;
        border-width: 0;
    !important;
    }

}

.admin-page-card {
    padding: 2rem;
    border-radius: 20px;
    background-color: #fff;
    border: 1px solid var(--color-dimgray-200);
    overflow-x: auto;
}

@media (max-width: 650px) {
    .admin-page-card {
        padding: 24px 12px;
    }
}

.admin-page-card-title {
    font-weight: 700;
    font-size: 1.5rem;
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-dimgray-200);
}

.admin-page-card-subtitle {
    font-weight: 400;
    font-size: 14px;
    width: inherit;
    padding: 24px 0;
    color: #707070
}

.admin-page-button-holders {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    width: 100%;
    flex-wrap: wrap;
}
/*
************************ Scholarship Page ************************
*/
.browse-list-banner {
    width: 100%;
    display: flex;
    color: white;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem min(100px, 5%);
    position: relative;
}

.browse-list-banner-previous,
.browse-list-banner-next {
    width: 35%;
}

.browse-list-banner #all {
    max-width: 400px;
    width: 30%;
    padding: 0 10px;
}

.browse-list-banner #prev-icon,
.browse-list-banner #next-icon {
    display: none;
}
@media (max-width: 650px) {
    .browse-list-banner #prev,
    .browse-list-banner #next {
        display: none;
    }

    .browse-list-banner #prev-icon,
    .browse-list-banner #next-icon {
        display: inline-block;
    }

    .browse-list-banner #all {
        width: 90% !important;
        padding: 20px 0 !important;
    }

    .browse-list-banner-previous,
    .browse-list-banner-next {
        width: 5%;
    !important;
    }

    .browse-list-banner #all h5 {
        font-size: 1rem;
    }
}

.details-page-wrapper {
    padding: 60px 15%;
    display: flex;
    justify-content: center;
    position: relative;
}

.details-page {
    width: 100%;
    max-width: var(--max-page-width);
    gap: 24px;
    display: flex;
    flex-direction: column;
    color: var(--color-dimgray-100)
}

.details-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-darkslategray);
    overflow-wrap: break-word;

}

.details-page-section {
    display: flex;
    padding: 2rem;
    width: 100%;
    border-radius: 10px;
    flex-wrap: wrap;
}
#programme-details-page .details-page-section:nth-child(even),
#scholarship-details-page .details-page-section:nth-child(even) {
    background: var(--color-whitesmoke);
}

#vertical-table th {
    min-width: 100px;
    width: 20%;
    background-color: var(--color-gray-table);
    border: 1px solid var(--color-dimgray-200);
    color: var(--color-darkslategray);
    display: table-cell;
    vertical-align: middle;
}

#vertical-table td {
    color: var(--color-dimgray-100);
    border: 1px solid var(--color-dimgray-200);
}

.details-page-section-head {
    width: 25%;
    padding-right: 5%;
    overflow-wrap: break-word;
    font-weight: 600;
    font-size: 18px;
    color: var(--color-darkslategray);
}

.details-page-section-body {
    width: 75%;
    overflow-x: auto;
}

.details-page-section-body p {
    word-break: break-word;
}

.details-page-section-body .bold {
    font-weight: 600;
    color: var(--color-darkslategray);
}

.banner-img-container {
    aspect-ratio: 1280 / 400;
}

@media (max-width: 800px) {
    .details-page-title {
        font-size: 1.5rem;
    }

    .details-page-wrapper {
        padding: 54px 5%;
    }

    .details-page-section {
        padding: 1rem;
        width: 100% !important;
    }

    .details-page-section-head {
        margin-bottom: 1.5rem;
    }

    .details-page-section-head,
    .details-page-section-body {
        width: 100% !important;
        max-width: 100%;
    }
}

