/* ==========================================================================
   Visual Effects
   ========================================================================== */

/* --------------------------------------
   1. Ken Burns Effect for Hero Slideshow
   -------------------------------------- */

@keyframes kenburns {
    0% {
        transform: scale(1.0) translate(0, 0);
        animation-timing-function: ease-in;
    }
    50% {
        transform: scale(1.1) translate(-2%, 1%);
        animation-timing-function: ease-out;
    }
    100% {
        transform: scale(1.0) translate(0, 0);
    }
}

.hero-slide.active {
    /* Ken Burns disabled — photo stays still */
}


/* --------------------------------------
   2. 3D Card Tilt Effect
   -------------------------------------- */

/* The container for the cards needs perspective to create the 3D space */
.sports-grid,
.news-grid,
.events-list,
.athletes-preview-grid {
    perspective: 1500px;
}

/* The cards that will have the tilt effect */
.sport-card,
.news-card,
.event-card,
.athlete-preview-card {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out; /* Faster transition for responsiveness */
    will-change: transform;
}

/* Add a subtle shadow that lifts on hover */
.sport-card,
.news-card,
.event-card,
.athlete-preview-card {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s ease-in-out;
}

.sport-card:hover,
.news-card:hover,
.event-card:hover,
.athlete-preview-card:hover {
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}


/* --------------------------------------
   3. Scroll-Reveal Animation
   -------------------------------------- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-reveal:nth-child(2) { transition-delay: 0.08s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.16s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.24s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.32s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.40s; }


/* --------------------------------------
   4. Glowing Button Pulse
   -------------------------------------- */
@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(139, 37, 0, 0.35), 0 2px 6px rgba(0,0,0,0.2); }
    50%       { box-shadow: 0 6px 28px rgba(139, 37, 0, 0.65), 0 4px 14px rgba(0,0,0,0.25); }
}

.btn--primary {
    animation: buttonGlow 3s ease-in-out infinite;
}
.btn--primary:hover,
.btn--primary:focus {
    animation: none;
    box-shadow: 0 8px 32px rgba(139, 37, 0, 0.75), 0 4px 12px rgba(0,0,0,0.25);
}


/* --------------------------------------
   5. Shimmer on Section Titles
   -------------------------------------- */
@keyframes shimmerPass {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

.section__title,
.section-title {
    background: linear-gradient(
        90deg,
        #8C1B2F 0%,
        #C8963E 30%,
        #8C1B2F 50%,
        #C8963E 70%,
        #8C1B2F 100%
    );
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerPass 5s linear infinite;
}

/* Restore original colour in dark/inverted contexts */
.footer .section__title,
.footer .section-title,
.page-header .section__title,
.page-header .section-title,
.section--dark .section__title,
.section--dark .section-title {
    background: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
}


/* --------------------------------------
   6. Floating Hero Ornaments
   -------------------------------------- */
@keyframes floatOrnament {
    0%, 100% { transform: translateY(0)   rotate(0deg); }
    33%       { transform: translateY(-14px) rotate(1.2deg); }
    66%       { transform: translateY(-7px)  rotate(-0.6deg); }
}

.hero__ornament-left  { animation: floatOrnament 9s ease-in-out infinite; }
.hero__ornament-right { animation: floatOrnament 9s ease-in-out infinite; animation-delay: -4.5s; }


/* --------------------------------------
   7. Hero Overlay Breathe
   -------------------------------------- */
@keyframes heroBreathe {
    0%, 100% { opacity: 0.60; }
    50%       { opacity: 0.80; }
}
.hero::before { animation: heroBreathe 7s ease-in-out infinite; }


/* --------------------------------------
   8. Social Link Brand-Colour Hover
   -------------------------------------- */
.social-link {
    transition: background 0.25s ease, border-color 0.25s ease,
                color 0.25s ease, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.social-link[aria-label="Telegram"]:hover {
    background-color: #0088CC !important;
    border-color: #0088CC !important;
    color: #fff !important;
    transform: translateY(-5px) scale(1.12);
}
.social-link[aria-label="Instagram"]:hover {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
    border-color: transparent !important;
    color: #fff !important;
    transform: translateY(-5px) scale(1.12);
}
.social-link[aria-label="YouTube"]:hover {
    background-color: #FF0000 !important;
    border-color: #FF0000 !important;
    color: #fff !important;
    transform: translateY(-5px) scale(1.12);
}


/* --------------------------------------
   9. Stat Number Pop-In
   -------------------------------------- */
@keyframes countPop {
    0%  { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.12); }
    100%{ transform: scale(1);   opacity: 1; }
}
.stat-number.is-visible {
    animation: countPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}


/* --------------------------------------
   10. Marquee Sports Band
   -------------------------------------- */
.sports-marquee-divider {
    width: 100%;
    overflow: hidden;
    background: var(--color-primary, #8C1B2F);
    padding: 0.85rem 0;
    position: relative;
}

@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.sports-marquee-track {
    display: inline-flex;
    gap: 0;
    white-space: nowrap;
    animation: marqueeScroll 28s linear infinite;
}

.sports-marquee-track span {
    font-family: var(--font-heading, 'Raleway', sans-serif);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(200,150,62,0.9);
    padding: 0 1.5rem;
}

.sports-marquee-divider:hover .sports-marquee-track {
    animation-play-state: paused;
}


/* --------------------------------------
   11. Stat Icons
   -------------------------------------- */
.stat-item__icon {
    width: 48px;
    height: 48px;
    color: var(--color-gold, #C8963E);
    margin-bottom: 0.5rem;
    opacity: 0.85;
}


/* --------------------------------------
   12. Featured News Card
   -------------------------------------- */
.news-grid--featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .news-grid--featured {
        grid-template-columns: 7fr 5fr;
        align-items: start;
    }
}

.news-card--featured .news-card__image {
    aspect-ratio: 16/9;
}

.news-card--featured .news-card__title {
    font-size: 1.35rem;
}

.news-card--compact {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border, rgba(139,37,0,0.12));
    padding-bottom: 1rem;
}

.news-card--compact:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-card--compact .news-card__image {
    width: 120px;
    min-width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.news-card--compact .news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card--compact .news-card__content {
    flex: 1;
    padding: 0;
}

.news-card--compact .news-card__title {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card--compact .news-card__text {
    display: none;
}

.news-cards-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}


/* --------------------------------------
   13. Respect reduced-motion
   -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .btn--primary                        { animation: none; }
    .section__title, .section-title      { animation: none; background: none; -webkit-text-fill-color: currentColor; }
    .hero__ornament-left,
    .hero__ornament-right                { animation: none; }
    .hero::before                        { animation: none; }
    .hero-slide.active                   { animation: none; }
    .stat-number.is-visible              { animation: none; }
}
