/* Hover effects for hero stat boxes */
.hero-box img {
    transition: transform 0.3s ease;
}
.hero-box:hover img {
    transform: translateY(-5px);
}
.hero-box:hover img {
    transform: translateY(-5px);
}
.hero-box .hero-title {
    transition: color 0.3s ease;
}
.hero-box:hover .hero-title {
    color: white;
    -webkit-text-stroke: 2px #301B60;
}

@media (width < 768px) {
.hero-icon { height: 80px; }
}
@media (width >= 768px) {
.hero-icon { height: 80px; }
}
@media (width >= 992px) {
.hero-icon { height: 130px; }
}

/* Rotate top left logo on hover */
#top-logo {
    transition: transform 0.3s ease;
}
#top-logo:hover {
    transform: rotate(5deg);
}

/* Show grabber cursor when hovering/grabbing the swiper */
.mySwiper {
    cursor: grab;
}
.mySwiper:active {
    cursor: grabbing;
}

/* Generic class for hover buttons */
.hover-button {
    transition: transform 0.25s ease;
}
.hover-button:hover {
    transform: scale(1.075);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Smooth underlines */
.nav-menu a {
    position: relative;
    text-decoration: none;
    padding-bottom: 2px;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #301B60;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
.nav-menu a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Work With Us section effects */
.card-title {
    transition: bottom 0.5s ease, opacity 0.5s ease;
    bottom: 20px;
    opacity: 1;
}
.group:hover .card-title { /* move title up and fade out on hover */
    bottom: 80%;
    opacity: 1;
    transition-delay: 0s; /* no delay when hovering */
}
.group:not(:hover) .card-title {
    transition-delay: 0.15s; /* wait for hover content to fade out before moving title */
}
.card-hover-content h3 { /* space filler title */
    visibility: hidden;
}
.card-hover-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
    pointer-events: none;
}
.group:hover .card-hover-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.group:not(:hover) .card-hover-content {
    transition-delay: 0s;
}
.card-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(48, 27, 96, 0.4), rgba(48, 27, 96, 0.75)); /* gradient when not hovering */
    border-radius: 30px;
    z-index: 2;
    opacity: 1;
    transition: background 0.4s ease, opacity 0.4s ease;
}
.group:hover .card-wrapper::after { /* solid background on hover */
    background: rgba(48, 27, 96, 0.76);
}

@media (max-width: 639px) {
    .card-hover-content {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100%;
      padding-top: 20px; /* adjusts spacing under title */
      padding-bottom: 20px; /* makes room for button at bottom */
    }
}