/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply fade-in to elements with animation class */
.animate {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Staggered animations for child elements */
.animate-stagger > * {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Card Hover Effects */
.card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Info Card Hover Effects */
.info-card {
    transition: none;
}

.info-card:hover {
    transform: none;
    box-shadow: none;
}

.info-card .card-icon {
    transition: none;
}

.info-card:hover .card-icon {
    transform: none;
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Navigation Link Hover Effects */
.nav-links a {
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Mobile Menu Animation */
.mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
    opacity: 0;
}

.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
}

/* Loading Animation */
.loading {
    animation: spin 1s linear infinite;
}

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

/* Page Transition Effects */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* Back to Top Button Animation */
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* Footer Link Hover Effects */
.footer-nav a {
    position: relative;
    transition: color 0.3s ease;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    /* background: currentColor; */
    transition: width 0.3s ease;
}

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

/* Social Icons Animation */
.social-icons a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icons a:hover {
    transform: translateY(-4px) scale(1.1);
    color: var(--primary-color);
}

/* Hero Section Animation */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease-out 0.6s forwards;
}

/* Handbook Card Animation */
.handbook-cards .card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.8s ease-out forwards;
}

.handbook-cards .card:nth-child(1) { animation-delay: 0.2s; }
.handbook-cards .card:nth-child(2) { animation-delay: 0.4s; }
.handbook-cards .card:nth-child(3) { animation-delay: 0.6s; }

/* About Section Animation */
.about-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.profile-image {
    opacity: 0;
    transform: scale(0.9);
    animation: fadeIn 1s ease-out 0.5s forwards;
}

/* Section Title Animation */
section h2 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease-out forwards;
}

/* Mobile Menu Button Animation */
.mobile-menu-btn {
    transition: transform 0.3s ease;
}

.mobile-menu-btn.active {
    transform: rotate(90deg);
}

/* Success Message Animation */
.success-message {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeIn 0.5s ease-out forwards;
}

/* Handbook Sidebar Animation */
.sidebar {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--color-background);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-lg);
        padding: var(--spacing-xl);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.95);
        transition: 
            opacity 0.3s ease,
            visibility 0s 0.3s,
            transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
        transition: 
            opacity 0.3s ease,
            visibility 0s,
            transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .nav-links a {
        font-size: 1.5rem;
        opacity: 0;
        transform: translateY(20px);
        transition: 
            opacity 0.3s ease,
            transform 0.3s ease;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
        transition: 
            opacity 0.3s ease 0.1s,
            transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
    }

    .nav-links a:nth-child(2) {
        transition-delay: 0.2s;
    }

    /* Add backdrop blur when menu is active */
    .nav-links::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        z-index: -1;
    }
} 