/* ===== Prevent oversized elements from pushing content off-screen on mobile ===== */
html, body {
    overflow-x: hidden;
}

/* ===== Fix hero & success-story background images not scaling on mobile ===== */
/* These sections use a JS plugin (backstretch) that inserts its own image wrapper */
.backstretch {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
}
.backstretch img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    left: 0 !important;
    top: 0 !important;
}

/* ===== Hero text: scale smoothly with screen width instead of jumping sizes ===== */
#home .jumbotron h1,
#home .jumbotron .h1 {
    font-size: clamp(28px, 8vw, 80px) !important;
}

#home .jumbotron small {
    font-size: clamp(16px, 4.5vw, 36px) !important;
    line-height: 1.4 !important;
}

/* ===== Fix poor text contrast over the "Success Stories" photo collage ===== */
#d_success.dark-overlay {
    position: relative;
}
#d_success.dark-overlay::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1;
}
#d_success .jumbotron {
    position: relative;
    z-index: 2;
}
#d_success .jumbotron p,
#d_success .jumbotron h2,
#d_success .jumbotron strong {
    color: #fff !important;
}

/* ===== Fix mobile nav bar: logo wrapping + invisible toggle button ===== */
@media (max-width: 767px) {
    .nav-wrapper {
        position: relative !important;
        padding: 10px 0;
    }

    /* Make the hamburger button visible and properly placed */
    .navbar-toggle {
        display: block !important;
        border: 1px solid #ccc;
        padding: 8px 10px;
        background: transparent;
        margin-left: 12px;
    }
    .navbar-toggle .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        background-color: #333 !important;
        margin: 4px 0;
    }

    /* Menu itself: floating frosted panel, shown/hidden with a fade + slide */
    .navbar-collapse.collapse {
        display: block !important;
        position: fixed;
        top: 70px;
        right: 15px;
        width: auto;
        min-width: 200px;
        max-width: 80vw;
        background: rgba(255,255,255,0.55);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255,255,255,0.4);
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.25);
        padding: 10px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease;
        z-index: 10001;
    }
    .navbar-collapse.collapse.in,
    .navbar-collapse.collapse.force-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .navbar-nav {
        float: none !important;
        margin: 0;
    }
    .navbar-nav li {
        display: block;
        text-align: center;
    }
    .navbar-nav li a {
        padding: 10px;
        display: block;
        border-radius: 8px;
    }
}

/* ===== Fix green CTA section stacking on mobile ===== */
@media (max-width: 767px) {
    .dark-wrapper.green-wrapper .row.cta {
        text-align: center;
    }
    .dark-wrapper.green-wrapper .col-sm-9,
    .dark-wrapper.green-wrapper .col-sm-3 {
        width: 100%;
        text-align: center !important;
        float: none;
    }
    .dark-wrapper.green-wrapper .col-sm-9 {
        margin-bottom: 20px;
    }
}

/* ===== Light modern animations ===== */
.section-inner, .section-inner-60 {
    animation: fadeInUp 0.8s ease both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hover-effect img, .icon-box-1 img {
    transition: transform 0.3s ease;
}
.hover-effect:hover img, .icon-box-1:hover img {
    transform: scale(1.04);
}
.btn {
    transition: all 0.25s ease;
}
.btn:hover {
    transform: translateY(-2px);
}

#reader {
    color: #6f42c1;
    background-color: #fff;
    border-color: #fff;
}
#reader:hover,
#reader:focus {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

/* Center all content inside the Success Stories section, on every screen size */
#d_success .jumbotron {
    text-align: center;
}

#Dsucc2 {
    text-align: center !important;
}

@media (hover: hover) and (pointer: fine) {
    p#Dsucc2:hover,
    p#Dsucc2:hover strong {
        background-color: #fff !important;
        color: #6f42c1 !important;
        border-radius: 12px;
    }
}

/* Force any full-height background section to properly cover the screen */
.fullheight,
.dark-overlay.fullheight,
#d_success.dark-overlay.fullheight {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* ===== Footer: deep purple background + white text ===== */
footer {
    background-color: #4a2e82 !important;
}

footer h1, footer h2, footer h3, footer h4, footer h5, footer h6,
footer p, footer a, footer li, footer .widget-title {
    color: #fff !important;
}

/* Fix black SVG icon (pin) - it's an image, not a font icon, so we flip it to white */
footer img[src*=".svg"] {
    filter: brightness(0) invert(1);
}

/* Green CTA section right above footer: match with a subtle purple accent on hover */
.dark-wrapper.green-wrapper .btn-white:hover {
    background-color: #4a2e82 !important;
    color: #fff !important;
    border-color: #4a2e82 !important;
}

/* ===== BIG obvious footer entrance animation ===== */
footer {
    animation: footerSlideIn 1.2s cubic-bezier(0.25, 1, 0.5, 1) both;
}
@keyframes footerSlideIn {
    from { opacity: 0; transform: translateY(80px); }
    to { opacity: 1; transform: translateY(0); }
}

footer .widget {
    opacity: 0;
    animation: fadeInUp 1s ease both;
}
footer .col-2:nth-child(1) .widget { animation-delay: 0.2s; }
footer .col-2:nth-child(2) .widget { animation-delay: 0.5s; }

/* ===== Footer social icons: BIG hover bounce + color pop ===== */
.footer-social a {
    display: inline-block;
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}
.footer-social a:hover {
    transform: translateY(-8px) scale(1.4) rotate(-8deg);
    color: #1FB76E !important;
}

/* ===== Mailing list input + button: obvious focus/hover animation ===== */
footer .form-control {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
footer .form-control:focus {
    box-shadow: 0 0 15px rgba(255,255,255,0.6);
    transform: scale(1.02);
}

footer .btn-email {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}
footer .btn-email:hover {
    transform: scale(1.3) rotate(10deg);
    background-color: #1FB76E !important;
    color: #fff !important;
}

/* ===== Footer widget titles: obvious underline animation on load ===== */
footer .widget-title {
    position: relative;
    padding-bottom: 10px;
}
footer .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 60px;
    background-color: #1FB76E;
    animation: growLine 1.2s ease 0.6s both;
}
@keyframes growLine {
    from { width: 0; }
    to { width: 60px; }
}

/* ===== Footer links: underline sweep on hover ===== */
footer li a, footer p a {
    position: relative;
    text-decoration: none;
}
footer li a::after, footer p a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #1FB76E;
    transition: width 0.3s ease;
}
footer li a:hover::after, footer p a:hover::after {
    width: 100%;
}

/* ===== Hero: real image, scales full-width with no cropping, any screen size ===== */
.cwit-style-hero {
    position: relative;
    background-color: #663399;
}

.cwit-style-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.cwit-style-hero-overlay .jumbotron {
    position: static;
    transform: none;
    width: 100%;
}

/* ===== Modern first-visit preloader ===== */
.preloader.modern-preloader {
    background: linear-gradient(135deg, #2c1a4d, #4a2e82 60%, #1a0f33);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modern-preloader-inner {
    position: relative;
    text-align: center;
    width: 90%;
    max-width: 500px;
}

.mp-symbols span {
    position: absolute;
    color: rgba(255,255,255,0.15);
    font-family: monospace;
    font-size: 22px;
}

.mp-logo {
    width: 70px;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease both;
}

.mp-title {
    color: #fff;
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 0;
    animation: fadeInUp 0.8s ease 0.15s both;
}

.mp-subtitle {
    color: rgba(255,255,255,0.6);
    letter-spacing: 6px;
    font-size: 13px;
    margin: 5px 0 30px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.mp-terminal {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 15px 20px;
    text-align: left;
    animation: fadeInUp 0.8s ease 0.45s both;
}

.mp-terminal-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}
.mp-terminal-dots span:nth-child(1) { background: #ff5f56; }
.mp-terminal-dots span:nth-child(2) { background: #ffbd2e; }
.mp-terminal-dots span:nth-child(3) { background: #27c93f; }

.mp-terminal-text {
    color: #1FB76E;
    font-family: monospace;
    font-size: 15px;
    margin-top: 10px;
}

.mp-cursor {
    animation: blink 0.8s step-end infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

.mp-progress-track {
    margin-top: 25px;
    height: 4px;
    width: 100%;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
}
.mp-progress-bar {
    height: 100%;
    width: 0%;
    background: #1FB76E;
    transition: width 3.5s ease;
}

/* Make the preloader purple from the very first paint, before JS swaps in the full content */
.preloader {
    background: linear-gradient(135deg, #2c1a4d, #4a2e82 60%, #1a0f33) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preloader .preloader-img {
    display: none;
}

/* ===== Nav links: purple text by default, purple background + white text on hover ===== */
.regular-navigation .navbar-nav > li > a {
    color: #663399 !important;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.regular-navigation .navbar-nav > li > a:hover,
.regular-navigation .navbar-nav > li > a:focus {
    background-color: #663399 !important;
    color: #fff !important;
}

/* ===== CWIT '26 secondary section nav ===== */
.cwit-subnav {
    position: relative;
    z-index: 5000;
    display: flex;
    justify-content: center;
    padding: 14px 0;
    background: transparent;
    animation: subnavDrop 0.6s cubic-bezier(0.25,1,0.5,1) both;
}
@keyframes subnavDrop {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cwit-subnav-inner {
    position: relative;
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(74,46,130,0.15);
    transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
}

.cwit-subnav-link {
    position: relative;
    z-index: 2;
    padding: 10px 22px;
    color: #663399;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 50px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.cwit-subnav-link:hover {
    color: #1FB76E;
}

.cwit-subnav-link.active {
    color: #fff;
}

.cwit-subnav-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    background: linear-gradient(120deg, #1FB76E, #17974f);
    border-radius: 50px;
    z-index: 1;
    transition: left 0.4s cubic-bezier(0.65,0,0.35,1), width 0.4s cubic-bezier(0.65,0,0.35,1);
    box-shadow: 0 0 12px rgba(31,183,110,0.5);
}

.cwit-subnav.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    animation: cwitSubnavLock 0.4s cubic-bezier(0.25,1,0.5,1);
}
.cwit-subnav.is-fixed .cwit-subnav-inner {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
@keyframes cwitSubnavLock {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.cwit-subnav.is-unlocking {
    animation: cwitSubnavUnlock 0.35s ease;
}
@keyframes cwitSubnavUnlock {
    from { opacity: 0.4; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.cwit-subnav-spacer {
    height: 0;
}

@media (max-width: 600px) {
    .cwit-subnav-inner {
        overflow-x: auto;
        max-width: 92%;
        -webkit-overflow-scrolling: touch;
    }
    .cwit-subnav-link {
        padding: 9px 16px;
        font-size: 11px;
    }
}

.cwit-section {
    scroll-margin-top: 80px;
}

/* ===== Hamburger toggle (shown once scrolled past the last section) ===== */
.cwit-subnav-toggle {
    display: flex;
    position: fixed;
    top: 14px;
    right: 20px;
    z-index: 5001;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.6);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.cwit-subnav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #663399;
    border-radius: 2px;
}

.cwit-subnav.is-collapsed .cwit-subnav-inner {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}
.cwit-subnav.is-collapsed .cwit-subnav-toggle {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* ===== Dropdown menu ===== */
.cwit-subnav-dropdown {
    display: none;
    position: fixed;
    top: 68px;
    right: 20px;
    z-index: 5001;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    padding: 10px;
    min-width: 180px;
    flex-direction: column;
}
.cwit-subnav-dropdown.open {
    display: flex;
    animation: cwitDropdownOpen 0.25s ease both;
}
@keyframes cwitDropdownOpen {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.cwit-subnav-dropdown a {
    padding: 10px 14px;
    color: #663399;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.cwit-subnav-dropdown a:hover,
.cwit-subnav-dropdown a.active {
    background: #1FB76E;
    color: #fff;
}

#d_success {
    background-image: none !important;
}

#d_success.cwit-style-hero-overlay {
    position: absolute !important;
}

/* ===== Keep Success Stories content compact enough to always fit inside the real image height ===== */
@media (max-width: 767px) {
    #d_success .jumbotron h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }
    #d_success #Dsucc2 {
        height: 90px;
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    #d_success #reader {
        padding: 6px 14px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #d_success .jumbotron h2 {
        font-size: 18px;
    }
    #d_success #Dsucc2 {
        height: 70px;
        font-size: 12px;
    }
}

/* ===== Logo + site name: consistent layout on every screen size ===== */
.nav-wrapper .container {
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.nav-wrapper .row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin: 0;
}

.nav-wrapper .col-xs-3,
.nav-wrapper .col-xs-9 {
    padding: 0;
    display: flex;
    align-items: center;
    width: auto;
    flex-shrink: 0;
}

.nav-wrapper .col-xs-3 {
    margin-right: auto;
}

.nav-wrapper .col-xs-9 {
    justify-content: flex-end;
}

.nav-wrapper .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.nav-wrapper .logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-wrapper .logo-text {
    display: block;
    line-height: 1.3;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #663399;
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .nav-wrapper .logo img {
        width: 36px;
        height: 36px;
    }
    .nav-wrapper .logo-text {
        font-size: 12px;
    }
}

/* ===== Prevent layout jump while images load ===== */
img {
    aspect-ratio: attr(width) / attr(height);
}
.img-responsive, .hover-effect img {
    background-color: rgba(0,0,0,0.03);
}

/* ===== Dynamically fit hover-caption content within each card, regardless of text length ===== */
.hover-effect .hover-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 22px;
    box-sizing: border-box;
    overflow-y: auto;
}

.hover-effect .hover-caption .vertical-center-js {
    display: block !important;
    width: 100%;
    max-height: 100%;
}

.hover-effect .hover-caption p {
    margin-bottom: 14px;
}

.hover-effect .hover-caption small {
    font-size: clamp(11px, 1.6vw, 14px);
    line-height: 1.5;
}

.hover-effect .hover-caption .btn {
    margin-top: 4px;
}

/* Slim, unobtrusive scrollbar for cards whose text is too long to fully fit */
.hover-effect .hover-caption::-webkit-scrollbar {
    width: 6px;
}
.hover-effect .hover-caption::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 3px;
}

/* Trim excess vertical gap between the icon-boxes section and the details section on Scholarships page */
#scholarship-overview .section-inner {
    padding-bottom: 30px;
}
#scholarship-details .section-inner {
    padding-top: 20px;
}

/* Back-to-top arrow: shadow + repositioned to stack above the poster badge */
a#back-to-top {
    right: 20px !important;
    bottom: 90px !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

footer .form-control {
    color: #fff;
}