/* Custom CSS for Emercallplus - Professional Animated Design */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu.show {
    display: block;
}

/* Card hover effects with 3D transform */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-hover:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.2);
}

/* Project card animations */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::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;
}

.project-card:hover::before {
    left: 100%;
}

.project-icon {
    transition: transform 0.4s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Member card styles with enhanced hover */
.member-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.member-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.member-card:hover::after {
    opacity: 1;
}

.member-card:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.15);
}

/* Loading spinner with glow effect */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f97316;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade-in animation with stagger */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient animation for hero sections */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Pulse glow effect */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(249, 115, 22, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.8);
    }
}

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

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

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

/* Search input styling with enhanced focus */
.search-input {
    transition: all 0.3s ease;
    border: 2px solid #cbd5e1;
}

.search-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
    transform: scale(1.02);
}

/* Badge styles with shimmer effect */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
}

.badge-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
}

.badge-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

/* Photo placeholder with animated gradient */
.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    background-size: 200% 200%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    animation: gradientShift 5s ease infinite;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

/* Button animations */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Stagger animation for lists */
@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item {
    opacity: 0;
    animation: staggerIn 0.5s ease-out forwards;
}

/* WhatsApp button special animation */
.whatsapp-btn {
    position: relative;
    overflow: hidden;
}

.whatsapp-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Icon bounce on hover */
.icon-bounce:hover i {
    animation: bounce 0.5s ease;
}

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

/* Text reveal animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    to {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.text-reveal {
    animation: textReveal 0.8s ease-out forwards;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Auto dark mode styles if needed in the future */
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Professional card shine effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.6s;
}

.card-shine:hover::after {
    transform: rotate(45deg) translateY(100%);
}

/* Enhanced navigation animations */
nav {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Smooth page transitions */
@keyframes pageTransition {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-transition {
    animation: pageTransition 0.4s ease-out;
}

/* Stats counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-number {
    animation: countUp 0.6s ease-out;
}

/* ========================================
   Floating Join Button Styles
   ======================================== */

.floating-join-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatButton 3s ease-in-out infinite;
    white-space: nowrap;
}

.floating-join-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(249, 115, 22, 0.6);
    padding: 16px 32px;
}

.floating-join-btn:active {
    transform: translateY(-2px);
}

/* Floating animation */
@keyframes floatButton {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Pulse glow animation */
.floating-join-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50px;
    padding: 3px;
    background: linear-gradient(135deg, #f97316, #ea580c, #f97316);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    animation: pulseGlow 2s ease-out infinite;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}

/* Icon styling */
.floating-join-btn i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.floating-join-btn:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* Hide tooltip since we have text now */
.floating-join-btn .tooltip {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .floating-join-btn {
        bottom: 20px;
        right: 20px;
        padding: 14px 22px;
        font-size: 0.9rem;
        gap: 10px;
    }

    .floating-join-btn i {
        font-size: 1.1rem;
    }

    .floating-join-btn:hover {
        padding: 14px 24px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-join-btn {
        animation: none;
    }

    .floating-join-btn::before {
        animation: none;
    }
}
