/**
 * Afrobot Website - Modern CSS
 * Contains modern animations, effects, and utility classes
 */

/* Scroll margin for sections to account for fixed header */
section[id] {
  scroll-margin-top: 8rem;
}

/* Navigation active state */
.nav-active {
  color: #FB3B2E; /* Orange color for active link */
  position: relative;
}

.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #FB3B2E;
  transition: width 0.3s ease;
}

/* Glass morphism effect */
.glass {
  /* background: rgba(255, 255, 255, 0.7); */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.glass-light {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease-in-out;
}

.glass-dark {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* Glow effects */
.glow-text {
  text-shadow: 0 0 10px rgba(251, 59, 46, 0.5), 
               0 0 20px rgba(251, 59, 46, 0.3), 
               0 0 30px rgba(251, 59, 46, 0.1);
}

.glow-text-white {
  text-shadow: 0 0 10px rgba(251, 251, 251, 0.5), 
               0 0 20px rgba(251, 251, 251, 0.3), 
               0 0 30px rgba(251, 251, 251, 0.1);
}

.glow-border {
  box-shadow: 0 0 5px rgba(251, 59, 46, 0.5), 
              0 0 10px rgba(251, 59, 46, 0.3);
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

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

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

@keyframes fadeInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
    100% { 
        transform: scale(1); 
    }
}

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

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

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease forwards;
}

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

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

.animate-rotate {
    animation: rotate 8s linear infinite;
}

/* Delay Classes */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

/* Modern Card Styles */
.modern-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Button Styles */
.modern-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.modern-button:hover::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(30, 30);
        opacity: 0;
    }
}

.modern-button-primary {
    background-color: #FB3B2E;
    color: white;
}

.modern-button-primary:hover {
    background-color: #e93025;
    box-shadow: 0 5px 15px rgba(251, 59, 46, 0.4);
}

.modern-button-secondary {
    background-color: white;
    color: #333;
    border: 1px solid #eaeaea;
}

.modern-button-secondary:hover {
    background-color: #f0f0f0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Typography Helpers */
.text-gradient {
    background: linear-gradient(135deg, #FB3B2E, #32A483);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Utility Styles */
.backdrop-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.perspective-card {
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .animate-mobile-none {
        animation: none !important;
    }
}

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Hover Effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 15px rgba(251, 59, 46, 0.5);
}

/* Gradient background */
.gradient-bg {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
}

/* Interactive button effect */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-hover-effect:after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 59, 46, 0.2), transparent);
  transition: all 0.5s ease;
}

.btn-hover-effect:hover:after {
  left: 100%;
}

/* Shimmer effect on cards */
.shimmer {
  background: linear-gradient(90deg, 
    rgba(251, 59, 46, 0) 0%, 
    rgba(251, 59, 46, 0.05) 50%, 
    rgba(251, 59, 46, 0) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Grid pattern for background */
.grid-pattern {
  background-image: 
    linear-gradient(rgba(251, 59, 46, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 59, 46, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Hero particles animation */
.particle {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(251, 60, 46, 0.788);
  pointer-events: none;
}

/* Hover card effect */
.hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Modern Animations and Effects */

/* Hover Effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Card Effects */
.card-3d {
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.card-outline {
    position: relative;
    overflow: hidden;
}

.card-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.card-outline:hover::before {
    border-color: #FB3B2E;
}

/* Button Effects */
.btn-pulse {
    position: relative;
}

.btn-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
    border-radius: inherit;
    opacity: 0.8;
    z-index: -1;
    transform: scale(1);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.fade-up {
    animation: fadeUp 0.8s ease forwards;
}

.fade-right {
    animation: fadeRight 0.8s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Card Hover Effect for Competitions */
.competition-card-hover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.competition-card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.competition-card-hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

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

/* Shine Effect */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 100%
    );
    transform: skewX(-25deg);
    transition: all 0.75s;
}

.shine-effect:hover::before {
    animation: shine 1.5s;
}

@keyframes shine {
    100% {
        left: 125%;
    }
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading Spinner */
.spinner-orbit {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-orbit .orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spin 1.2s linear infinite;
}

.spinner-orbit .orbit:nth-child(1) {
    border-top-color: #FB3B2E;
}

.spinner-orbit .orbit:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-right-color: #32A483;
    animation-duration: 1s;
    animation-direction: reverse;
}

.spinner-orbit .orbit:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-bottom-color: #018F3D;
    animation-duration: 0.8s;
}

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

/* Staggered animation for competition items */
.staggered-container .competition-item {
    opacity: 0;
    transform: translateY(20px);
}

.staggered-container .competition-item.animate {
    animation: fadeUp 0.6s ease forwards;
}

/* 3D card effect on hover */
.card-competition-3d {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    perspective: 1500px;
}

.card-competition-3d:hover {
    transform: translateY(-5px) scale(1.01) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Content ellipsis for varying content lengths */
.content-ellipsis {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.content-ellipsis-expanded {
    -webkit-line-clamp: none;
    max-height: 500px;
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gradient overlay for text when it's truncated */
.text-gradient-overlay {
    position: relative;
}

.text-gradient-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to top, white, transparent);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.text-gradient-overlay.expanded::after {
    opacity: 0;
}