body {
    font-family: 'Inter', sans-serif;
}

.gradient-text {
    background: linear-gradient(to right, #1f2937, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #a855f7, #ec4899);
    border-radius: 9999px;
}

/* Mobile menu animations */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

.menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Image popup styles */
.image-popup {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    backdrop-filter: blur(10px);
}

.image-popup.open {
    opacity: 1;
    visibility: visible;
}

.image-popup img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-popup.open .popup-content {
    animation: zoomIn 0.3s ease-out;
}

/* Smooth infinite scroll galleries */
.gallery-container {
    overflow: hidden;
}

.gallery-track {
    display: flex;
    transition: none;
    will-change: transform;
}

.gallery-track.paused {
    animation-play-state: paused;
}

/* Tournament Gallery Styles */
.tournaments-gallery-container {
    overflow: hidden;
    position: relative;
}

.tournaments-gallery-track {
    display: flex;
    gap: 2rem;
    transition: none;
    will-change: transform;
}

.tournament-card {
    flex-shrink: 0;
    width: 350px;
    position: relative;
    cursor: pointer;
}

.tournament-card img {
    transition: transform 0.3s ease;
}

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

.tournament-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px 16px 0 0;
}

.tournament-card:hover .tournament-image-overlay {
    opacity: 1;
}

.tournament-image-overlay::after {
    content: '🔍';
    font-size: 2rem;
    color: white;
}

/* Animation Effects */
.fade-in-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

.stagger-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Parallax Effect */
.parallax-bg {
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

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

/* Pulse Animation */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
    }
}

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

/* Slide reveal animation */
.slide-reveal {
    position: relative;
    overflow: hidden;
}

.slide-reveal.animate::before {
    left: 100%;
}

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid;
    white-space: nowrap;
    animation: typewriter 3s steps(40) 1s forwards, blink 1s infinite;
    width: 0;
}

.typewriter.animate {
    animation: typewriter 3s steps(40) forwards, blink 1s infinite;
}

@keyframes typewriter {
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Rotation on scroll */
.rotate-on-scroll {
    transition: transform 0.3s ease-out;
}

/* News Section Styles */
.news-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-category.tournament {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.news-category.academy {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.news-category.club {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.news-category.general {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.news-content {
    padding: 20px;
}

.news-date {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-read-more:hover {
    color: #1d4ed8;
}

.news-read-more i {
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.news-read-more:hover i {
    transform: translateX(4px);
}

/* Featured news styles */
.featured-news {
    grid-column: span 2;
}

.featured-news img {
    height: 300px;
}

.featured-news .news-title {
    font-size: 24px;
}

.featured-news .news-excerpt {
    font-size: 16px;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

@media (max-width: 768px) {
    .featured-news {
        grid-column: span 1;
    }

    .featured-news img {
        height: 200px;
    }

    .featured-news .news-title {
        font-size: 20px;
    }

    .featured-news .news-excerpt {
        font-size: 14px;
    }
}

/* Academy Images Hover Effect */
.academy-image {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.academy-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.academy-image:hover::after {
    opacity: 1;
}

.academy-image:hover::after {
    content: '🔍';
    font-size: 2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}