/* Featured Content Carousel Styles */

.featured-carousel-section {
    margin-bottom: 30px;
}

.featured-carousel-section h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.carousel-container {
    position: relative;
    background: linear-gradient(135deg, #002b66 0%, #001f4d 100%);
    border-radius: 8px;
    border: 1px solid #003d80;
    overflow: hidden;
    height: 180px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
}

/* Next Match card */
.carousel-item.next_match {
    background: linear-gradient(135deg, #001a40 0%, #000d20 100%);
}

.carousel-item.next_match::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 61, 128, 0.75) 0%, rgba(0, 20, 60, 0.9) 100%),
                url('../images/fratton1.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    z-index: 0;
}

.next-match-crests {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 8px;
}

.next-match-crest-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    flex-shrink: 0;
}

.next-match-crest-box img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.next-match-vs {
    font-size: 12px;
    font-weight: 700;
    color: #8fb3d9;
    letter-spacing: 1px;
}

.next-match-countdown {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

/* Last Match card */
.carousel-item.last_match {
    background: linear-gradient(135deg, #001a40 0%, #000d20 100%);
}

.carousel-item.last_match::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 61, 128, 0.75) 0%, rgba(0, 20, 60, 0.9) 100%),
                url('../images/fratton11.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    z-index: 0;
}

.last-match-score {
    font-weight: 700;
    font-size: 14px;
}

.last-match-score.result-win {
    color: #4ade80;
}

.last-match-score.result-draw {
    color: #facc15;
}

.last-match-score.result-loss {
    color: #f87171;
}


/* Carousel Item Types */
.carousel-item.on_this_day::before {

    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 87, 184, 0.7) 0%, rgba(0, 43, 102, 0.85) 100%),
                url('../images/fratton1.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    z-index: 0;
}

.carousel-item.featured_player {
    background: linear-gradient(135deg, #002b66 0%, #001f4d 100%);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.carousel-item.featured_player .player-photo-disc {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    margin: 0;
}

.carousel-item.featured_player .carousel-content-wrapper {
    position: relative;
    z-index: 20;
    flex: 1;
    text-align: left;
}

/* Two-column layout for featured player stats */
.player-stats-columns {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.player-stats-left {
    flex: 0 0 auto;
    min-width: 0;
}

.player-stats-right {
    flex: 0 0 auto;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.extra-stat {
    font-size: 12px;
    color: #b3c9e6;
    margin-bottom: 4px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Player Photo Disc Component */
.player-photo-disc {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #002b66 0%, #001f4d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
}

.player-photo-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.player-photo-disc.initials {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

.carousel-item.season_spotlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(3, 51, 122, 0.7) 0%, rgba(0, 61, 128, 0.85) 100%),
                url('../images/ftunnel.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    z-index: 0;
}

.carousel-item.did_you_know::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(3, 51, 122, 0.7) 0%, rgba(0, 61, 128, 0.85) 100%),
                url('../images/fpcrowd.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    z-index: 0;
}

.carousel-item .carousel-content-wrapper {
    position: relative;
    z-index: 1;
}

/* Carousel Content */
.carousel-icon {
    display: none;
}

.carousel-title {
    font-size: 11px;
    font-weight: 600;
    color: #8fb3d9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px;
}

.carousel-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    line-height: 1.3;
}

.carousel-content {
    font-size: 13px;
    color: #b3c9e6;
    margin: 0 0 4px;
    line-height: 1.4;
}

.carousel-detail {
    font-size: 11px;
    color: #8fb3d9;
    margin: 0 0 8px;
    opacity: 0.9;
}

.carousel-link {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.carousel-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Player Image for Featured Player - now used as background */
.carousel-item.featured-player .carousel-content-wrapper {
    max-width: 100%;
}

/* Navigation Dots */
.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #ffffff;
    width: 20px;
    border-radius: 4px;
}

/* Hover Effect */
.carousel-container:hover {
    border-color: #66a3ff;
    box-shadow: 0 6px 20px rgba(0, 87, 184, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .carousel-item {
        padding: 14px;
        min-height: 130px;
    }
    
    .carousel-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .carousel-title {
        font-size: 10px;
    }
    
    .carousel-subtitle {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .carousel-content {
        font-size: 12px;
    }
    
    .carousel-detail {
        font-size: 10px;
    }
    
    .carousel-link {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .carousel-item.featured-player .carousel-content-wrapper {
        max-width: 100%;
    }

    /* Next match mobile adjustments */
    .next-match-crest-box {
        width: 36px;
        height: 36px;
    }

    .next-match-crest-box img {
        max-width: 26px;
        max-height: 26px;
    }

    .next-match-countdown {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    /* Featured player mobile adjustments */

    .carousel-item.featured_player {
        flex-direction: row;
        gap: 12px;
        padding: 14px;
        text-align: left;
        align-items: flex-start;
    }
    
    .carousel-item.featured_player .player-photo-disc {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }
    
    .carousel-item.featured_player .carousel-content-wrapper {
        text-align: left;
        flex: 1;
    }
    
    /* Stack player stats vertically on mobile */
    .player-stats-columns {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .player-stats-right {
        min-width: auto;
    }
    
    .extra-stat {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .carousel-dots {
        bottom: 8px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .carousel-item {
        padding: 18px;
    }
    
    .carousel-subtitle {
        font-size: 15px;
    }
}

/* Animation for content entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-item.active .carousel-icon,
.carousel-item.active .carousel-title,
.carousel-item.active .carousel-subtitle,
.carousel-item.active .carousel-content,
.carousel-item.active .carousel-detail,
.carousel-item.active .carousel-link {
    animation: fadeInUp 0.5s ease-out forwards;
}

.carousel-item.active .carousel-title {
    animation-delay: 0.1s;
}

.carousel-item.active .carousel-subtitle {
    animation-delay: 0.2s;
}

.carousel-item.active .carousel-content {
    animation-delay: 0.3s;
}

.carousel-item.active .carousel-detail {
    animation-delay: 0.4s;
}

.carousel-item.active .carousel-link {
    animation-delay: 0.5s;
}
