/* ========================================
   CAUSE II Main Website - Custom Styles
   ======================================== */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Apply Animations */
.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Fade-in on Scroll (will be triggered by JS) */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card Hover Effects */
.card-hover-effect {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #06b6d4, #0ea5e9, #14b8a6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

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

/* Section Dividers */
.section-divider {
    position: relative;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(6, 182, 212, 0.5) 20%, 
        rgba(14, 165, 233, 0.5) 50%, 
        rgba(20, 184, 166, 0.5) 80%, 
        transparent
    );
    margin: 4rem auto;
    max-width: 600px;
}

/* Button Shimmer Effect */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.btn-shimmer:hover::before {
    left: 100%;
}

/* Component Card Glow */
.component-card {
    position: relative;
}

.component-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, transparent, rgba(6, 182, 212, 0.3), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: -1;
    filter: blur(10px);
}

.component-card:hover::before {
    opacity: 1;
}

/* Impact Stats Counter Animation */
.impact-stat {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.impact-stat:hover {
    transform: scale(1.1) rotate(2deg);
}

/* News Card Image Overlay */
.news-card-image {
    position: relative;
    overflow: hidden;
}

.news-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(6, 182, 212, 0.2) 100%
    );
    opacity: 0;
    transition: opacity 0.4s;
}

.news-card:hover .news-card-image::after {
    opacity: 1;
}

/* Footer Links Animation */
.footer-link {
    position: relative;
    display: inline-block;
    transition: color 0.3s;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #14b8a6);
    transition: width 0.3s;
}

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

/* Loading Animation (optional) */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    border: 3px solid rgba(6, 182, 212, 0.2);
    border-top-color: #06b6d4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Mobile Responsiveness Enhancements */
@media (max-width: 768px) {
    .animate-fade-in {
        animation-duration: 0.6s;
    }
    
    .fade-in-on-scroll {
        transform: translateY(15px);
    }
    
    .card-hover-effect:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none;
    }
}

/* Selection Styling */
::selection {
    background: rgba(6, 182, 212, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(6, 182, 212, 0.3);
    color: white;
}
