/* Additional custom styles for ApeNerds website */

/* Apply Poppins font globally */
body {
    font-family: 'Poppins', sans-serif;
}

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: #c0c0c0;
    color: #0a0a0a;
}

/* Smooth transitions for all elements */
* {
    transition: all 0.3s ease;
}

/* Enhanced button hover effects */
.btn-glow:hover {
    box-shadow: 0 0 30px rgba(192, 192, 192, 0.6);
    transform: translateY(-2px);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(192, 192, 192, 0.3);
    border-radius: 50%;
    border-top-color: #c0c0c0;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive text sizes */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Enhanced card animations */
.service-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.3s ease;
    align-self: start; /* Prevent grid from stretching cards to equal height */
    height: auto; /* Allow natural height */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(192, 192, 192, 0.1);
}

/* Accordion behavior for service cards - robust across browsers */
.service-card .service-details {
    /* Use max-height technique instead of display to avoid override quirks */
    max-height: 0;
    overflow: hidden;
    margin-top: 0; /* will animate in */
    opacity: 0;
    transform: translateY(6px);
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, margin-top 0.25s ease;
}

.service-card.active .service-details {
    max-height: 800px; /* large enough for content */
    opacity: 1;
    transform: translateY(0);
    margin-top: 1rem;
}

.service-card .service-arrow {
    transition: transform 0.25s ease;
}

.service-card.active .service-arrow {
    transform: rotate(180deg);
}

/* Service arrow animation */
.service-arrow {
    transition: transform 0.3s ease;
}

/* Animated chevron like homepage */
.service-arrow {
    animation: bounce-subtle 2s ease-in-out infinite;
}

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

/* Additional service cards */
.additional-service-card {
    transition: all 0.3s ease;
}

.additional-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(192, 192, 192, 0.1);
}

/* Gradient borders */
.gradient-border {
    position: relative;
    background: linear-gradient(45deg, #c0c0c0, #ffffff);
    padding: 2px;
    border-radius: 12px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: #1a1a1a;
    border-radius: 10px;
}

/* Animated background particles */
.particle {
    position: absolute;
    background: #c0c0c0;
    border-radius: 50%;
    opacity: 0.1;
    animation: particle-float 20s infinite linear;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.1;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced mobile menu */
.mobile-menu {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(192, 192, 192, 0.1);
}

/* Typing cursor effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
