/*
************************ General ************************
*/
.heading-card {
    color: #fff;
    border-radius: 0;
    border: none;
}
.search-btn {
    padding: 10px;
    color: #013D7C;
    border: none;
}
.suggest-btn {
    background-color: #013D7C;
    color: #fff;
    border-radius: 0;
}
.tag-box {
    padding: 3px 10px;
    background-color: #013D7C;
    color: #fff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
}
.visit-btn {
    padding: 0;
    color: #013D7C;
    text-decoration: underline;
    border-radius: 0;
}
/*.acf-field button:hover {*/
/*    background: transparent;*/
/*}*/
.acf-field-hidden,
.acf-hidden {
    display: none;
}
.btn-shadow {
    display: block;
    min-height: 40px;
    line-height: 1.5;
    font-size: 1rem;
    min-width: 150px;
    background: #fff;
    color: #707070;
    border: 1px solid #ced4da;
    box-shadow: 3px 3px 6px 3px rgba(0, 0, 0, 0.1);
}
.btn-shadow:hover, .btn-shadow:active, .btn-shadow:focus {
    background: #fff;
    color: #707070;
}
.btn-glow {
    display: flex;
    align-items: center;
    width: fit-content;
    color: #115AA6;
    background-color: transparent;
    border: 2px solid #115AA6;
    padding: 0.6em 1.2em;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            120deg,
            transparent,
            rgba(17, 90, 166, 0.2),
            transparent
    );
    transition: all 0.5s ease;
}

.btn-glow:hover {
    color: #fff;
    background-color: #115AA6;
    box-shadow: 0 0 12px rgba(17, 90, 166, 0.6);
    transform: translateY(-2px);
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-glow:active {
    transform: translateY(1px);
    box-shadow: 0 0 6px rgba(17, 90, 166, 0.8) inset;
}
.search-bar {
    position: relative;
    flex: 1;
}
.footnote {
    margin: 0 3px;
    color: var(--color-blue);
    text-decoration: underline;
    cursor: pointer;
}
.highlight {
    background-color: var(--color-light-orange);
    border-radius: 4px;
}
.swiper-wrapper {
    -webkit-transition-timing-function: linear !important;
    -o-transition-timing-function: linear !important;
    transition-timing-function: linear !important;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/*
************************ Home Page ************************
*/

.home-events-carousel {
    width: 100%;
    border-radius: 20px;
    box-shadow:
            0 4px 6px rgba(0, 0, 0, 0.2),
            0 10px 25px rgba(0, 0, 0, 0.25);
    @media screen and (max-width: 992px) {
        border-radius: 0;
        max-width: 100%;
    }
}

.home-events-carousel .swiper-slide {
    height: auto;
}

.home-events-carousel .event-image-cover {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-events-carousel .event-details {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}
.home-events-pagination-wrapper {
    position: absolute;
    width: fit-content;
    color: white;
    z-index: 20;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    @media screen and (min-width: 800px) {
        bottom: 3%;
    }
}
.home-events-pagination .swiper-pagination-bullet {
    width: 12px !important;
    height: 12px !important;
    background-color: #CCCCCC !important;
    opacity: 0.8 !important;
}
.home-events-pagination .swiper-pagination-bullet-active {
    width: 16px !important;
    height: 16px !important;
    background-color: white !important;
    transform: translate(0, 15%);
    opacity: 0.8 !important;
}
/* Make the slide take full height */
#hero-landing-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

#hero-landing-banner .video-cover {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Video fills the whole slide */
#hero-landing-banner .banner-video {
    position: absolute;
    inset: 0;              /* guarantees full box */
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;

    /* fade-in pattern */
    opacity: 0;
    transition: opacity 500ms ease;
}

#hero-landing-banner .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darker on left, fading to transparent on right */
    background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0.6) 0%,    /* darkest left edge */
            rgba(0, 0, 0, 0.3) 40%,   /* mid fade */
            rgba(0, 0, 0, 0.0) 100%   /* fully transparent on right */
    );
    z-index: 2;
    pointer-events: none; /* ensure overlay doesn’t block clicks */
}

/* Text and button on top */
#hero-landing-banner .content {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 3;
    color: #fff;
    text-align: left;
    padding: 20% 10%;
    font-family: sans-serif;
    max-width: 900px;
}

#hero-landing-banner h1 {
    font-size: 2.7rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 2.2rem;
    text-shadow:
            0 2px 4px rgba(0, 0, 0, 0.5),
            0 4px 8px rgba(0, 0, 0, 0.4),
            0 8px 16px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    position: relative;
    overflow: hidden;
    color: var(--color-nus-blue);
    background-color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.6s ease, transform 0.3s ease;
}

/* blue overlay layer */
.cta-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--color-nus-blue);
    z-index: 0;
    transition: width 0.6s ease;
}

/* text fades to white slightly after the blue starts filling */
.cta-button:hover::before {
    width: 100%;
}

.cta-button:hover {
    color: #fff;
    transform: scale(1.07);
}

/* ensure text stays above blue overlay */
.cta-button span {
    position: relative;
    z-index: 1;
}
/* Responsive tweak */
@media (max-width: 768px) {
    #hero-landing-banner .content {
        padding: 150px 10%;
    }

    #hero-landing-banner .overlay {
        background: rgba(0, 0, 0, 0.55);
    }
}

#decide-on-programme {
    transform: translateY(8px);
}

.apply-btn:hover {
    animation: shakeAmplify 0.6s ease-in-out;
    transform-origin: center;
}

#graduate-journey-1 {
    position: relative;
    text-align: center;
    overflow: hidden;
    min-height: 780px;
    background: white;
}

#graduate-journey-2 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 40px;
    overflow: hidden;
    min-height: 650px;
    background: linear-gradient(135deg, #b5ddff, #a7d4ff, #c9e6ff, #b5ddff);
    background-size: 300% 300%;
    animation: gentleShift 18s ease-in-out infinite;
    padding: 50px 20px;
    margin: 20px 0;
}

#global-rank {
    position: relative;
    text-align: left;
    overflow: hidden;
    min-height: 780px;
    background: white;
    padding: 80px 20px;
}

.section2-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
}

.journey-header {
    text-align: center;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.journey-header h1 {
    font-size: 2.5rem;
    color: #115AA6;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 700;
}

.journey-header .top10 {
    color: #EF7C00;
    font-weight: 800;
}

@media (max-width: 1023px) and (min-width: 768px) {
    .journey-header {
        padding: 0 40px;
    }
    .journey-header h1 {
        font-size: 2rem;
        line-height: 1.4;
    }
    .journey-header .top10 {
        font-size: 2.2rem;
    }
}

@media (max-width: 767px) {
    .journey-header {
        padding: 0 16px;
    }
    .journey-header h1 {
        font-size: 1.5rem;
        line-height: 1.35;
    }
    .journey-header .top10 {
        font-size: 1.8rem;
    }
}

/* Animated shapes in section 1 */
.shape {
    position: absolute;
    background: linear-gradient(135deg, #E0F2FF, #D6E0FF);
    opacity: 0.6;
}

.star {
    position: absolute;
    width: 180px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #E0F2FF, #D6E0FF);
    clip-path: polygon(
            50% 0%, 61% 35%, 98% 35%,
            68% 57%, 79% 91%, 50% 70%,
            21% 91%, 32% 57%, 2% 35%,
            39% 35%
    );
    right: 10%;
    top: 20%;
    filter: drop-shadow(0 0 15px rgba(96,165,250,0.6));
    animation: rotate 10s infinite linear reverse;
}

.triangle {
    width: 150px;
    height: 150px;
    background: transparent;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
    border-bottom: 130px solid #E5F3FF;
    animation: rotate 10s infinite linear reverse;
}

#triangle-1 {
    left: 35%;
    bottom: 15%;
}

.hexagon {
    width: 150px;               /* width of the middle section */
    height: 86.6px;             /* height = width * sqrt(3)/2 for a perfect hexagon */
    background-color: #E5F3FF;
    margin: 43.3px 0;           /* centers vertically when stacked */
    animation: rotate 10s infinite linear reverse;
    right: 15%;
    top: 40px;
    position: absolute;
}

/* Create top and bottom triangles */
.hexagon::before,
.hexagon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 0;
    border-left: 75px solid transparent;
    border-right: 75px solid transparent;
}

/* Top triangle */
.hexagon::before {
    bottom: 100%;
    border-bottom: 43.3px solid #E5F3FF;
}

/* Bottom triangle */
.hexagon::after {
    top: 100%;
    border-top: 43.3px solid #E5F3FF;
}

.square {
    background: linear-gradient(135deg, #E0F2FF, #D6E0FF);
    width: 150px;
    height: 150px;
    left: 10%;
    top: 45%;
    animation: rotate 12s infinite linear;
}

.path-container {
    pointer-events: none;
    position: absolute;
    height: auto;
    max-width: none; /* prevents it from scaling on smaller screens */
}

#path-container-1 {
    top: 150px;
    left: 50%;
    transform: translateX(calc(-50% - 95px));
}

#path-container-2 {
    top: 80px;
    left: 50%;
    transform: translateX(calc(-50% - 15px));
}

#path-container-3 {
    top: 150px;
    left: 0;
    transform: translateX(calc(-30% + 20px));
}

.ball {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow:
            inset -3px -3px 8px rgba(0, 0, 0, 0.25),
            inset 3px 3px 8px rgba(255, 255, 255, 0.3),
            0 4px 10px rgba(0, 0, 0, 0.25);
    transition: none;
    z-index: 6;
}

#ball1 {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #115AA6;
}

#ball2 {
    position: absolute;
    top: 60px;
    left: -50px;
    transform: translateX(-50%);
    background-color: white;
}

#ball3 {
    position: absolute;
    top: 60px;
    right: -100px;
    transform: translateX(-50%);
    background-color: #115AA6;
}

.wonder-badge {
    background: #115AA6; /* solid deep blue */
    color: #fff;
    padding: 18px 42px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 40px;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    position: relative;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);

    /* Depth base */
    box-shadow:
            0 6px 0 #162e7a,
            0 10px 18px rgba(0, 0, 0, 0.25);

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Subtle shine overlay (faint reflection on top) */
.wonder-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
            rgba(17, 90, 166, 0.35),  /* light glow tone of #115AA6 */
            rgba(17, 90, 166, 0)
    );
    border-radius: inherit;
    pointer-events: none;
}

/* Hover: lift and glow */
.wonder-badge:hover {
    transform: translateY(-6px);
    box-shadow:
            0 8px 0 #162e7a,
            0 20px 25px rgba(0, 0, 0, 0.3),
            0 0 25px rgba(37, 99, 235, 0.6), /* blue outer glow */
            0 0 45px rgba(37, 99, 235, 0.4), /* softer wide glow */
            inset 0 0 10px rgba(255, 255, 255, 0.1); /* faint internal shine */
}

.wonder-badge:active {
    transform: translateY(2px);
    box-shadow:
            0 3px 0 #162e7a,
            0 6px 10px rgba(0, 0, 0, 0.25);
}

.path-line {
    fill: none;
    stroke: #80C4FF;
    stroke-linecap: round;
}

.wonder-cards-container {
    position: relative;
    z-index: 9;
    width: 480px;
    height: 260px;
    perspective: 1000px;
    cursor: grab;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .wonder-cards-container {
        width: 70vw;
        height: 230px;
    }
}

/* base card */
.wonder-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px 30px;
    transition: transform .6s ease, box-shadow .6s ease;
    border: 2px solid rgba(128,196,255,.25);
}

.wonder-card-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

@media (max-width: 1023px) and (min-width: 768px) {
    .wonder-cards-container {
        width: 75vw;
        height: 250px;
    }
    .wonder-card {
        padding: 24px 28px;
    }
    .wonder-card h3 {
        font-size: 1.15rem;
        line-height: 1.45;
        font-weight: 500;
    }
}

@media (max-width: 767px) {
    .wonder-cards-container {
        width: 88vw;
        height: 210px;
    }
    .wonder-card {
        padding: 18px 22px;
    }
    .wonder-card h3 {
        font-size: 1rem;
        line-height: 1.3;
        font-weight: 500;
    }
    .wonder-card-icon {
        font-size: 2rem;
    }
}

/* uneven stack look */
.wonder-card:nth-child(1){z-index:4;transform:rotate(-3deg) translate(0,0);}
.wonder-card:nth-child(2){z-index:3;transform:rotate(3deg) translate(10px,18px) scale(.97);}
.wonder-card:nth-child(3){z-index:2;transform:rotate(-5deg) translate(-12px,35px) scale(.95);}
.wonder-card:nth-child(4){z-index:1;transform:rotate(4deg) translate(8px,50px) scale(.93);}

/* hover amplify (desktop only, disabled when sliding) */
.wonder-cards-container:not(.animating):hover .wonder-card:nth-child(1) {  /* 🔹 added :not(.animating) */
    animation: hoverLift 0.5s ease forwards;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}
.wonder-cards-container:hover { cursor: pointer; }
.wonder-cards-container:active { cursor: grabbing; }

/* slide out/in */
.wonder-card.slide-out {
    animation: slideOutRight .7s cubic-bezier(.55,0,.1,1) forwards;
}
.wonder-card.slide-in {
    animation: slideInRight .7s cubic-bezier(.55,0,.1,1) forwards;
}

.wonder-card.shake {
    animation: shake 0.8s ease-in-out;
}

/* container */
.ranking-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    justify-items: center;
    align-items: stretch;
    margin: 100px auto;
    max-width: 1200px;
    position: relative;
    z-index: 15;
}

/* card style */
.ranking-card {
    background: #E5F3FF;
    color: #115AA6;
    border-radius: 12px;
    padding: 24px 20px;
    width: 100%;
    min-height: 260px;
    max-width: 260px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ranking-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 10px 20px rgba(17, 90, 166, 0.3);
}

/* icon */
.ranking-icon {
    font-size: 52px;
    margin-bottom: 18px;
}

/* main text */
.ranking-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 8px 0;
    line-height: 1.3;
}

/* subtext */
.ranking-card p {
    font-size: 0.9rem;
    color: #7D91A6;
    margin-top: 6px;
}

/* tilt styles (desktop only) */
.tilt-left {
    transform: rotate(-6deg);
}

.tilt-right {
    transform: rotate(6deg);
}

/* Tablet layout (2x2 grid) */
@media (max-width: 992px) {
    .ranking-section {
        margin: 60px auto;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 1.25rem; /* smaller horizontal gap */
        max-width: 700px;  /* ensures cards have breathing room */
    }

    .ranking-card {
        max-width: none;
        width: 100%;
        min-height: 240px;
    }
}

/* Mobile (tight 2x2 layout, no tilt) */
@media (max-width: 768px) {
    .ranking-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem 1rem; /* reduced spacing between cards */
        max-width: 95%;
    }

    .ranking-card {
        transform: none !important; /* remove tilt */
        min-height: 220px;
        padding: 22px 16px;
    }

    .ranking-icon {
        font-size: 44px;
    }

    .ranking-card h2 {
        font-size: 1.4rem;
    }

    #path-container-3 {
        top: 0;
        left: 0;
        transform: translateX(calc(-20% - 10px));
    }
}

@media (max-width: 500px) {
    .ranking-section {
        gap: 0.5rem;               /* tighter spacing */
        width: 95%;
        margin: 50px auto;
    }

    .ranking-card {
        padding: 8px;        /* smaller padding */
        min-height: 180px;         /* reduce height */
        max-width: 100%;
    }

    .ranking-icon {
        font-size: 34px;           /* smaller icon */
        margin-bottom: 10px;
    }

    .ranking-card h2 {
        font-size: 0.9rem;
        margin: 3px 0;
    }

    .ranking-card p {
        font-size: 0.75rem;        /* smaller subtitle */
    }

    #path-container-3 {
        top: 0;
        left: 0;
        transform: translateX(calc(-30% - 10px));
    }
}


.advisors-section {
    padding: 0 5%;
    background: #fff;
}

/* === GRID LAYOUT === */
.advisors-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "card1 card2 info info"
        ". card3 card4 .";
    gap: 20px;
    align-items: start;
}

[data-slot="card1"] { grid-area: card1; }
[data-slot="card2"] { grid-area: card2; }
[data-slot="card3"] { grid-area: card3; }
[data-slot="card4"] { grid-area: card4; }
[data-slot="info"]  { grid-area: info; align-self: center; }
.spacer { display: none; } /* only used for grid balance */

/* === CARDS === */
.advisor-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 260px;
    background: #E5F3FF;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* inner anchor container */
.advisor-card-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.advisor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(17, 90, 166, 0.25);
}

.advisor-card img {
    position: absolute;
    inset: 0; /* shorthand for top/right/bottom/left: 0 */
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.advisor-card:hover img {
    transform: scale(1.08);
}

/* overlay styling */
.advisor-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 90, 166, 0.95) 40%, rgba(17, 90, 166, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1rem;
}

.advisor-card:hover .advisor-overlay {
    opacity: 1;
}

/* details positioned at bottom */
.advisor-details {
    color: #fff;
    text-align: left;
}

.advisor-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.advisor-faculty {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.advisor-department {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0.2rem 0 0 0;
}

/* optional shimmer or glow */
.advisor-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.advisor-card:hover::after {
    transform: translateX(100%);
}

@media (max-width: 600px) {
    .advisor-card {
        height: 200px;
    }
    .advisors-layout {
        gap: 10px;
    }
}

/* === TEXT PANEL === */
.advisor-info {
    padding: 12px;
}

.advisor-info h2 {
    color: #115AA6;
    font-size: 1.9rem;
    margin: 0 0 10px;
    font-weight: 600;
}

.advisor-info p {
    color: #374151;
    margin: 0 0 18px;
    line-height: 1.55;
    font-size: 1rem;
}
.advisor-card:hover img {
    transform: scale(1.05);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .advisors-section { padding: 0 3%; }
    .advisor-info h2 { font-size: 1.7rem; }
}

@media (max-width: 768px) {
    .advisors-layout {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
          "info info"
          "card1 card2"
          "card3 card4";
    }
    .advisor-info {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

