/* Global Variables */
:root {
    --primary-color: #3C8BF0;
    --secondary-color: #5d183b;
    --accent-color: #A9D1F9;
    --text-dark: #1a1a1a;
    --text-light: #f8f9fa;
    --bg-light: #f4f6f9;
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-heading: 'Outfit', sans-serif;
    --transition-speed: 0.3s;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
body {
    font-family: var(--font-family-sans);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

/* Navbar */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    transition: transform var(--transition-speed);
}

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

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem !important;
    transition: all var(--transition-speed);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Hero Carousel */
.carousel-item {
    height: 80vh;
    min-height: 500px;
    background-color: #000;
}

.carousel-image-container {
    height: 100%;
    width: 100%;
}

.carousel-image-container img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.carousel-caption {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    text-align: left;
}

.carousel-caption h2 {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    background-color: #fff;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.card-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

.card-text {
    color: #666;
    font-size: 0.95rem;
}

/* Match Center / Fixtures */
.match-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform var(--transition-speed);
}

.match-card:hover {
    transform: translateX(5px);
    border-left: 4px solid var(--primary-color);
}

.match-date {
    text-align: center;
    min-width: 80px;
    color: #666;
    font-weight: 600;
    border-right: 1px solid #eee;
    padding-right: 1rem;
    margin-right: 1rem;
}

.match-teams {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.team-name {
    width: 40%;
    text-align: center;
}

.vs-badge {
    background-color: #eee;
    color: #666;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0 1rem;
}

/* Standings Table */
.table-container {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Footer */
footer {
    background-color: var(--secondary-color) !important;
    color: #fff;
    padding: 4rem 0 2rem;
}

footer h5 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
    color: #fff;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all var(--transition-speed);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .carousel-caption h2 {
        font-size: 2rem;
    }

    .match-card {
        flex-direction: column;
        text-align: center;
    }

    .match-date {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .match-teams {
        width: 100%;
        justify-content: space-between;
    }
}

.hover-primary:hover {
    color: var(--primary-color) !important;
    transition: color 0.2s ease-in-out;
}

/* Horizontal Scroll Container */
.horizontal-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
    padding-bottom: 1rem;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Webkit */
}

.news-card-wrapper {
    flex: 0 0 auto;
    width: 300px;
}

.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .news-card-wrapper {
        width: 260px;
    }
}

/* Admin Dashboard */
.hover-primary-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-color) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* League Toggle Buttons */
.league-toggle-btn {
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    background-color: transparent !important;
    font-weight: 700 !important;
}

.league-toggle-btn:hover,
.league-toggle-btn.active {
    color: #fff !important;
    background-color: var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(60, 139, 240, 0.3);
}

/* Mobile Navbar Buttons */
@media (max-width: 991.98px) {
    .navbar .btn-outline-light {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-width: 1px;
    }
}