/* Animations CSS for Vasudharini Research Foundation */

/* Page Element Animations */
.section-heading h2,
.hero h1,
.hero h2,
.program-content h2 {
    animation: fadeInUp 0.8s ease forwards;
}

.heading-underline,
.section-heading h2::after,
.hero h1::after,
.program-content h2::after {
    animation: lineGrow 1s ease 0.3s forwards;
    width: 0;
}

@keyframes lineGrow {
    from { width: 0; }
    to { width: 80px; }
}

/* Fade-in animation for page elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero section animations */
.hero-content {
    animation: fadeInLeft 1s ease forwards;
}

.hero-image {
    animation: fadeInRight 1s ease forwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Service cards hover effect */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 153, 204, 0.2);
}

.service-image img {
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

/* Center cards animation */
.center-icon {
    transition: background-color 0.3s ease;
}

.center-icon i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.center-card:hover .center-icon {
    background-color: #0099cc;
}

.center-card:hover .center-icon i {
    color: #ffffff;
    transform: scale(1.1);
}

/* Button effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: -100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::after {
    left: 0;
}

.btn-text i {
    transition: transform 0.3s ease;
}

.btn-text:hover i {
    transform: translateX(5px);
}

/* Social links animation */
.social-links a {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Publication card animations */
.publication-icon {
    transition: background-color 0.3s ease;
}

.publication-icon i {
    transition: color 0.3s ease, transform 0.3s ease;
}

.publication-card:hover .publication-icon {
    background-color: #0099cc;
}

.publication-card:hover .publication-icon i {
    color: #ffffff;
    transform: scale(1.1);
}

/* Footer link animations */
.footer-links a {
    transition: padding 0.3s ease, color 0.3s ease;
}

.footer-links a::before {
    transition: transform 0.3s ease, left 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    padding-left: 18px;
    color: #ffffff;
}

.footer-links a:hover::before {
    left: 3px;
    color: #ff9900;
}

/* Contact info animations */
.contact-info i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact-info li:hover i {
    transform: translateX(3px);
    color: #ff9900;
}

/* Back to top button animation */
.back-to-top {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

.back-to-top i {
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    animation: bounceUp 0.8s ease infinite alternate;
}

@keyframes bounceUp {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

/* Partner logo animations */
.partner-logo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-logo::before {
    transition: height 0.3s ease;
}

.partner-logo i,
.partner-logo span {
    transition: color 0.3s ease;
}

.partner-logo:hover {
    transform: translateY(-5px);
}

.partner-logo i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Navigation animations */
.nav-link::before {
    transition: width 0.3s ease;
}

.nav-link i {
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: rotate(180deg);
}

.dropdown-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.centers-dropdown {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Mobile menu animations */
.mobile-menu-toggle {
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animations */
.scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animation.active {
    opacity: 1;
    transform: translateY(0);
}