/* Cool Animations and Effects for UHS CSF Website */

/* Hover Effects for Navigation Links */
.nav-hover-effect {
    position: relative;
    overflow: hidden;
}

.nav-hover-effect::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-hover-effect:hover::after {
    width: 100%;
}

/* Parallax Effect for Hero Section */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Pulsating Animation for Important Elements */
.pulse-effect {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Floating Animation for Cards */
.float-animation {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Gradient Animation Background */
.gradient-bg {
    background: linear-gradient(-45deg, #2466b7, #52819A, #29698B, #3b82f6);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Shine Effect for Images */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    z-index: 2;
    display: block;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 100%);
    transform: skewX(-25deg);
    transition: all 0.75s;
}

.shine-effect:hover::before {
    animation: shine 1.5s;
}

@keyframes shine {
    100% {
        left: 125%;
    }
}

/* Scale Effect for Buttons */
.scale-on-hover {
    transition: transform 0.3s ease;
}

.scale-on-hover:hover {
    transform: scale(1.05);
}

/* Bounce Animation */
.bounce-animation {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* Typewriter effect */
.typewriter h1 {
    overflow: hidden;
    border-right: .15em solid #3b82f6;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation:
        typing 3.5s steps(40, end),
        blink-caret .75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: #3b82f6;
    }
}

/* Swing Animation for Icons */
.icon-swing {
    transform-origin: top center;
}

.icon-swing:hover {
    animation: swing 1s ease;
    animation-iteration-count: 1;
}

@keyframes swing {
    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* 3D Flip Card Effect */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-front {
    background-color: #bbb;
    color: black;
}

.flip-card-back {
    background-color: #2980b9;
    color: white;
    transform: rotateY(180deg);
}

/* Shadow Effect for Depth */
.shadow-depth {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.shadow-depth:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* Glow effect on hover */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
}

/* Fade in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered fade in for lists */
.stagger-fade li {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.stagger-fade li:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-fade li:nth-child(2) {
    animation-delay: 0.3s;
}

.stagger-fade li:nth-child(3) {
    animation-delay: 0.5s;
}

.stagger-fade li:nth-child(4) {
    animation-delay: 0.7s;
}

.stagger-fade li:nth-child(5) {
    animation-delay: 0.9s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Background wave animation */
.wave-bg {
    position: relative;
    overflow: hidden;
}

.wave-bg::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: -1;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.2) 100%);
    transform-origin: 0 0;
    animation: rotate 7s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Particle Background Effect */
.particle-bg {
    position: relative;
    overflow: hidden;
}

.particle-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    z-index: -1;
    animation: particleMove 20s linear infinite;
}

@keyframes particleMove {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}

/* Highlight Text Effect for Important Information */
.highlight-text {
    position: relative;
    display: inline-block;
}

.highlight-text::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: rgba(59, 130, 246, 0.3);
    z-index: -1;
    transition: height 0.3s ease;
}

.highlight-text:hover::before {
    height: 50%;
}

/* Image Zoom Effect on Hover */
.zoom-img-container {
    overflow: hidden;
    border-radius: 8px;
}

.zoom-img {
    transition: transform 0.5s ease;
}

.zoom-img:hover {
    transform: scale(1.05);
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.dark .navbar-scrolled {
    background-color: rgba(7, 89, 133, 0.95) !important;
}

/* Typing cursor effect for headings */
.cursor-effect::after {
    content: '|';
    display: inline-block;
    margin-left: 3px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Button Effects */
.button-effect {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.button-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 1;
}

.button-effect:hover::before {
    transform: translateX(0);
}

.button-effect span {
    position: relative;
    z-index: 2;
}

/* Pulsating submit button */
.pulse-button {
    position: relative;
}

.pulse-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
    border-radius: inherit;
    animation: pulse-ring 1.5s ease-out infinite;
    opacity: 0;
    z-index: -1;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    80%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* 3D Button Effect */
.button-3d {
    transform-style: preserve-3d;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button-3d:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.2);
}

.button-3d:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.1);
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scroll-down-indicator:hover {
    opacity: 1;
}

.scroll-down-indicator .mouse {
    width: 30px;
    height: 50px;
    border: 2px solid #fff;
    border-radius: 15px;
    position: relative;
}

.scroll-down-indicator .mouse::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: scrollMouse 1.5s infinite;
}

@keyframes scrollMouse {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.scroll-down-indicator p {
    color: white;
    margin-top: 8px;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}