/* BF1 Tv - Custom Styles */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(185, 28, 28, 0.2) transparent;
}

body::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background: rgba(185, 28, 28, 0.18);
    border-radius: 999px;
    border: 1px solid rgba(185, 28, 28, 0.09);
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(185, 28, 28, 0.28);
}

body::-webkit-scrollbar-corner {
    background: transparent;
}

:root {
    --bf1-red: #b91c1c;
    --bf1-maroon: #7b1b1b;
    --bf1-cream: #f4efe7;
    --bf1-dark: #1b0808;
    --bf1-darker: #0d0505;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bf1-darker);
    background-image: radial-gradient(circle at top left, rgba(185, 28, 28, 0.12), transparent 25%),
                      radial-gradient(circle at bottom right, rgba(185, 28, 28, 0.08), transparent 20%);
    background-blend-mode: screen;
    color: var(--bf1-cream);
    overflow-x: hidden;
    border-left: 1px solid rgba(185, 28, 28, 0.08);
    border-right: 1px solid rgba(185, 28, 28, 0.08);
    box-shadow: inset 0 0 80px rgba(185, 28, 28, 0.12);
}

.bg-rti-dark {
    background-color: var(--bf1-dark) !important;
}

.bg-rti-darker {
    background-color: var(--bf1-darker) !important;
}

.bg-rti-orange {
    background-color: var(--bf1-maroon) !important;
}

.text-rti-orange {
    color: var(--bf1-maroon) !important;
}

.bg-rti-red {
    background-color: var(--bf1-red) !important;
}

.bg-rti-dark\/95 {
    background-color: rgba(27, 8, 8, 0.95) !important;
}

.bg-rti-dark\/50 {
    background-color: rgba(27, 8, 8, 0.5) !important;
}

.bg-rti-dark\/30 {
    background-color: rgba(27, 8, 8, 0.18) !important;
}

.text-rti-dark\/60 {
    color: rgba(244, 239, 231, 0.6) !important;
}

.text-rti-dark\/80 {
    color: rgba(244, 239, 231, 0.8) !important;
}

.hover\:bg-rti-orange:hover {
    background-color: var(--bf1-maroon) !important;
}

.hover\:bg-rti-red:hover {
    background-color: var(--bf1-red) !important;
}

/* Floating Live Widget */
.floating-live-widget {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background: linear-gradient(135deg, rgba(27, 8, 8, 0.95), rgba(47, 10, 10, 0.95));
    border: 2px solid rgba(185, 28, 28, 0.6);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(185, 28, 28, 0.3);
    z-index: 50;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-live-widget.hidden {
    display: none;
}

.live-widget-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--bf1-cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.live-widget-close:hover {
    background: rgba(185, 28, 28, 0.5);
}

.live-widget-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--bf1-cream);
    font-size: 0.95rem;
}

.live-widget-content {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    cursor: pointer;
}

.live-widget-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-widget-meta {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(90deg, var(--bf1-red), var(--bf1-maroon));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.live-indicator-small {
    width: 8px;
    height: 8px;
    background-color: var(--bf1-red);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

.live-badge {
    background-color: var(--bf1-red);
    padding: 8px 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-new {
    background-color: var(--bf1-red);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.dropdown-item:hover {
    background-color: rgba(123, 27, 27, 0.2) !important;
}

/* Enhanced Navigation Styles */
.nav-link {
    position: relative;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--bf1-red), var(--bf1-maroon));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Enhanced Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

/* Force dropdown display on hover */
.dropdown:hover > .dropdown-menu {
    display: block !important;
}

.dropdown-item {
    position: relative;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: var(--bf1-red);
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

.dropdown-item:hover::before {
    width: 4px;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(185, 28, 28, 0.1), rgba(123, 27, 27, 0.1)) !important;
    transform: translateX(5px);
    color: white !important;
}

/* Mobile Navigation Enhancement */
.mobile-nav-link {
    position: relative;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--bf1-red), var(--bf1-maroon));
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before {
    width: 100%;
}

.mobile-nav-link:hover {
    transform: translateX(8px);
    color: white !important;
}

/* Section Titles Alignment */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--bf1-red);
}

.section-title i {
    color: var(--bf1-red);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Centered Content Layout */
.content-centered {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (min-width: 768px) {
    .content-centered {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1024px) {
    .content-centered {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

@media (min-width: 1280px) {
    .content-centered {
        padding-left: 5rem;
        padding-right: 5rem;
    }
}

/* Background Overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(185, 28, 28, 0.04), transparent 20%, transparent 80%, rgba(123, 27, 27, 0.03)),
        radial-gradient(circle at top left, rgba(185, 28, 28, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(185, 28, 28, 0.08), transparent 18%),
        radial-gradient(circle at bottom left, rgba(123, 27, 27, 0.06), transparent 20%),
        radial-gradient(circle at bottom right, rgba(185, 28, 28, 0.06), transparent 22%);
    pointer-events: none;
    z-index: -1;
}

/* Center Smoke Effect */
.center-smoke {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 100vh;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(185, 28, 28, 0.08) 18%,
        rgba(123, 27, 27, 0.02) 50%,
        rgba(185, 28, 28, 0.08) 82%,
        transparent 100%
    );
    opacity: 0.14;
    pointer-events: none;
    z-index: -1;
    filter: blur(16px);
}

.genre-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(123, 27, 27, 0.85), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* Live Indicator Animation */
.live-indicator {
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

.live-indicator-small {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Live Badge */
.live-badge {
    background-color: #ef4444;
    padding: 8px 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Channel Badges */
.channel-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.channel-badge-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.channel-1 {
    background-color: #f97316;
    color: #fff;
}

.channel-2 {
    background-color: #22c55e;
    color: #fff;
}

.channel-3 {
    background-color: #8b5cf6;
    color: #fff;
}

.channel-radio {
    background-color: #3b82f6;
    color: #fff;
    font-size: 10px;
}

/* Hero Section */
.hero-slides {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Indicators */
.hero-indicator {
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-indicator.active {
    background-color: #fff;
    width: 60px;
}

.hero-indicator:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.carousel-btn-left {
    left: 10px;
}

.carousel-btn-right {
    right: 10px;
}

/* Video Cards */
.video-card {
    position: relative;
    flex-shrink: 0;
    width: 320px;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

.video-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.genre-card {
    position: relative;
    flex-shrink: 0;
    width: 220px;
    height: 140px;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.genre-card:hover {
    transform: scale(1.03);
}

.video-card::before,
.genre-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(185, 28, 28, 0.18), rgba(0, 0, 0, 0.32));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.video-card:hover::before,
.genre-card:hover::before {
    opacity: 1;
}

.video-card:hover img,
.genre-card:hover img {
    transform: scale(1.05);
}

.rubrique-card {
    min-width: 180px;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(15, 5, 5, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.rubrique-card:hover {
    transform: translateY(-3px);
    border-color: rgba(217, 39, 39, 0.35);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.rubrique-card .rubrique-card-body {
    background: rgba(10, 4, 4, 0.82);
}

.rubrique-card .rubrique-card-meta {
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rubrique-card .rubrique-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.rubrique-card .rubrique-card-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rubrique-card .rubrique-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: space-between;
    width: 100%;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
}

/* Light mode - Rubrique cards */
body.light-mode .rubrique-card {
    background: rgba(185, 28, 28, 0.15) !important;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .rubrique-card > div {
    background: rgba(185, 28, 28, 0.15) !important;
}

body.light-mode .rubrique-card .bg-gradient-to-br {
    background: rgba(185, 28, 28, 0.15) !important;
}

body.light-mode .rubrique-card:hover {
    border-color: transparent !important;
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.2) !important;
}

body.light-mode .rubrique-card .rubrique-card-body {
    background: rgba(185, 28, 28, 0.08) !important;
}

body.light-mode .rubrique-card .rubrique-card-title {
    color: #ffffff !important;
}

body.light-mode .rubrique-card .rubrique-card-subtitle {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.light-mode .rubrique-card .rubrique-card-meta {
    color: #ffffff !important;
}

body.light-mode .rubrique-card .rubrique-card-cta {
    color: #ffffff !important;
}


    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    background: rgba(27, 8, 8, 0.78);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
    pointer-events: none;
}

.card-hover-info .hover-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
}

.card-hover-info .hover-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.82);
}

.video-card:hover .card-hover-info,
.genre-card:hover .card-hover-info {
    opacity: 1;
}

.video-card .card-front,
.video-card-hover-content .card-hover-content,
.genre-card .genre-overlay {
    z-index: 3;
}

.video-card-portrait {
    width: 220px;
}

/* Hover Content Card */
.video-card-hover-content .card-front {
    transition: opacity 0.3s ease;
}

.video-card-hover-content .card-hover-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(123, 27, 27, 0.92) 0%, rgba(16, 6, 6, 0.95) 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.video-card-hover-content:hover .card-hover-content {
    opacity: 1;
}

/* Genre Cards */
.genre-card {
    flex-shrink: 0;
    width: 220px;
    height: 140px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: block;
}

.genre-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.genre-card:hover img {
    transform: scale(1.1);
}

.genre-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* Badges */
.badge-new {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #22c55e;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.duration-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Time Badge for News */
.time-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dropdown Menu Dark Theme */
.dropdown-menu-dark {
    background-color: #1a2332 !important;
}

.dropdown-item:hover {
    background-color: rgba(249, 115, 22, 0.2) !important;
}

/* Modal Dark Theme */
.modal-content.bg-rti-dark {
    background-color: #1a2332 !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-image {
        width: 100%;
        opacity: 0.3;
    }
    
    .video-card {
        width: 280px;
    }
    
    .video-card-portrait {
        width: 180px;
    }
    
    .genre-card {
        width: 180px;
        height: 120px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .video-card {
        width: 260px;
    }
    
    .video-card-portrait {
        width: 160px;
    }
    
    .genre-card {
        width: 150px;
        height: 100px;
    }
}

/* Custom Scrollbar for desktop */
@media (min-width: 1024px) {
    .carousel-track {
        padding-bottom: 15px;
    }
    
    .carousel-track::-webkit-scrollbar {
        display: block;
        height: 6px;
    }
    
    .carousel-track::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }
    
    .carousel-track::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    
    .carousel-track::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* Footer Styles */
footer a:hover {
    color: #f97316 !important;
}

/* Animation for cards on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #1a2332 25%, #2a3442 50%, #1a2332 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Card Hover Overlay Styles */
.card-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.45), rgba(123, 27, 27, 0.55));
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 30;
}

.video-card:hover .card-hover-overlay {
    opacity: 1;
}

.hover-description {
    text-align: center;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    padding: 20px;
}
