/* =========================================
   CSS Variables & Resets
   ========================================= */
:root {
    --primary: #D90429;
    --primary-hover: #EF233C;
    --black: #0B090A;
    --black-light: #161A1D;
    --black-border: #1F2428;
    --text-white: #FFFFFF;
    --text-gray: #B0B5B9;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.light-mode {
    --black: #F8F9FA;
    --black-light: #FFFFFF;
    --black-border: #DEE2E6;
    --text-white: #212529;
    --text-gray: #495057;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--black-border);
}
body.light-mode .logo span {
    color: #212529;
}
body.light-mode .hamburger {
    color: #212529;
}
body.light-mode .footer {
    border-top: 1px solid var(--black-border);
}
body.light-mode .coach-card {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
body.light-mode .news-card {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--black);
    color: var(--text-gray);
    line-height: 1.6;
    overflow-x: hidden;
    animation: pageFadeIn 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-weight: 800;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   Utility Classes
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-red {
    color: var(--primary);
}

.text-center {
    text-align: center;
}

.section {
    padding: 100px 0;
}

.bg-darker {
    background-color: var(--black-light);
}

.w-100 {
    width: 100%;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(217, 4, 41, 0.5);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.btn-outline:hover {
    background-color: var(--text-white);
    color: var(--black);
    transform: translateY(-3px);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* Typography Titles */
.section-title {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin-bottom: 30px;
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition);
}

.navbar.scrolled {
    background-color: rgba(11, 9, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid var(--black-border);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logo img {
    height: 65px;
    width: auto;
    border: none !important;
    outline: none !important;
}

.logo span {
    color: var(--text-white);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary);
}

.hamburger {
    display: none;
    color: var(--text-white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: url('../assets/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darker gradient for enhanced readability of text */
    background: linear-gradient(to bottom, rgba(8, 7, 7, 0.85) 0%, rgba(8, 7, 7, 0.6) 50%, rgba(11, 9, 10, 1) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 90%;
    max-width: 800px;
    margin-top: 60px;
}

.hero-title {
    font-size: 5rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1;
    color: #FFFFFF !important; /* Always white on dark hero background */
    text-shadow: 2px 4px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9) !important; /* Always white/light on dark hero background */
    margin-bottom: 40px;
    text-shadow: 1px 2px 5px rgba(0,0,0,0.8);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Ensure hero buttons are always correctly styled on the dark hero background */
.hero-buttons .btn-primary {
    background-color: var(--primary);
    color: #FFFFFF !important;
}
.hero-buttons .btn-primary:hover {
    background-color: var(--primary-hover);
}
.hero-buttons .btn-outline {
    background-color: transparent;
    color: #FFFFFF !important;
    border: 2px solid #FFFFFF !important;
}
.hero-buttons .btn-outline:hover {
    background-color: #FFFFFF !important;
    color: #0B090A !important;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: #FFFFFF !important;
    font-size: 2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* =========================================
   Grid Layouts for Sections
   ========================================= */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* =========================================
   About Section
   ========================================= */
.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.features-list {
    margin-top: 30px;
}

.features-list li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    color: var(--text-white);
    font-weight: 600;
}

.about-image .image-wrapper {
    position: relative;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 20px 20px 0px rgba(217, 4, 41, 0.2);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background-color: var(--primary);
    color: var(--text-white);
    padding: 30px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 150px;
    height: 150px;
    border: 5px solid var(--black);
}

.experience-badge .number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 5px;
}

/* =========================================
   Programs Section
   ========================================= */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.program-card {
    background-color: var(--black);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--black-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--primary);
    transition: height var(--transition);
    z-index: -1;
}

.program-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(217, 4, 41, 0.15);
}

.program-card:hover::before {
    height: 100%;
}

.program-card:hover .card-icon {
    color: var(--text-white);
}

.program-card:hover h3, .program-card:hover p {
    color: var(--text-white);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: color var(--transition);
}

.program-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    transition: color var(--transition);
}

.program-card p {
    font-size: 0.95rem;
    transition: color var(--transition);
}

/* =========================================
   CTA Banner
   ========================================= */
.cta-banner {
    background-image: url('../assets/images/training.png'); /* Reusing training img */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 100px 0;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(217, 4, 41, 0.85); /* Red overlay */
}

.cta-content {
    position: relative;
    z-index: 10;
}

.cta-content h2 {
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.cta-content p {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   Contact Section
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background-color: var(--black-light);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.contact-info {
    background-color: var(--primary);
    padding: 50px 40px;
    color: var(--text-white);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.8);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
}

.info-item h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-item span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.social-links {
    margin-top: 50px;
    display: flex;
    gap: 15px;
}

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

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

.contact-form {
    padding: 50px 40px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 15px 20px;
    background-color: var(--black);
    border: 1px solid var(--black-border);
    border-radius: 4px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    padding: 70px 0 30px 0;
    border-top: 1px solid var(--black-border);
    background-color: var(--black-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
    text-align: left;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text-white);
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 40px;
    background: var(--primary);
}

.footer-col p {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    border: none !important;
    outline: none !important;
    filter: grayscale(0%) opacity(1);
    transition: all var(--transition);
    display: block;
}

.footer-logo:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-gray);
    position: relative;
    display: inline-block;
    transition: color var(--transition);
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transition: width var(--transition);
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.footer-contact-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 3px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    transition: all var(--transition);
}

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

body.light-mode .social-links a {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-white);
}

body.light-mode .social-links a:hover {
    background: var(--primary);
    color: var(--text-white);
}

.newsletter-form input {
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid var(--black-border);
    flex: 1;
    outline: none;
    background: transparent;
    color: var(--text-white);
    width: 100%;
    margin-bottom: 15px;
}

.newsletter-form button {
    width: 100%;
    border-radius: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid var(--black-border);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
}

.footer p {
    font-size: 0.9rem;
}

/* =========================================
   Animations
   ========================================= */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.animate-right {
    transform: translateX(50px);
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* =========================================
   Responsive Design
   ========================================= */
@media screen and (max-width: 992px) {
    .section-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
        margin-bottom: 40px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .experience-badge {
        width: 100px;
        height: 100px;
        padding: 15px;
        bottom: -15px;
        left: -15px;
    }
    
    .experience-badge .number {
        font-size: 1.8rem;
    }
    
    .experience-badge .text {
        font-size: 0.6rem;
    }
    
    /* Mobile Menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background-color: var(--black-light);
        flex-direction: column;
            justify-content: center;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .hamburger {
        display: block;
        z-index: 1001; /* Above mobile menu */
    }
}

/* =========================================
   New Multi-Page Extras
   ========================================= */
.page-body {
    padding-top: 80px; /* Offset for fixed navbar */
}
.page-header {
    background-color: var(--black-light);
    padding: 60px 0;
    text-align: center;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 50px;
}
.mt-5 { margin-top: 50px; }
.p-5 { padding: 50px; }
.br-8 { border-radius: 8px; }

/* Masonry Grid */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}
.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
}
.masonry-item img {
    border-radius: 8px;
    width: 100%;
    transition: transform 0.3s;
}
.masonry-item img:hover {
    transform: scale(1.03);
}

/* Ticker */
.ticker-wrapper {
    overflow: hidden;
    background-color: var(--primary);
    padding: 15px 0;
    white-space: nowrap;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.ticker-content {
    display: inline-block;
    animation: ticker 40s linear infinite;
}
.ticker-content:hover {
    animation-play-state: paused;
}
.ticker-item {
    display: inline-block;
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-right: 50px;
}
.ticker-item i { margin-right: 8px; }
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media screen and (max-width: 992px) {
    .masonry-grid { column-count: 2; }
}

}

/* =========================================
   Phase 3 Advanced Components
   ========================================= */
/* Coaches */
.coach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}
.coach-card {
    background-color: var(--black-light);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    border: 1px solid var(--black-border);
}
.coach-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}
.coach-info {
    padding: 20px;
}
.coach-info h3 { color: var(--primary); margin-bottom: 5px; }

/* Schedule Table */
.schedule-table-wrapper {
    overflow-x: auto;
}
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: var(--black-light);
}
.schedule-table th, .schedule-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid var(--black-border);
}
.schedule-table th { background-color: var(--primary); color: white; }
.schedule-table tr:nth-child(even) { background-color: rgba(255,255,255,0.02); }

/* News Board */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.news-card {
    background-color: var(--black-light);
    padding: 25px;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    transition: transform 0.3s;
}
.news-card:hover { transform: translateY(-5px); }
.news-date { color: var(--primary); font-size: 0.85rem; font-weight: bold; margin-bottom: 10px; display: block; }
.news-card p { margin-top: 10px;}

/* Admissions Full Page */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media screen and (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* EA Style Player Cards Grid */
.ea-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 40px;
    justify-items: center;
}

/* Authentic FIFA Ultimate Team Gold Card Shape */
.ea-card {
    position: relative;
    width: 260px;
    height: 400px;
    /* Rich gold gradient */
    /* Background will be applied via tier class */
    /* FIFA Card clip path */
    clip-path: polygon(12% 0, 88% 0, 100% 12%, 100% 85%, 50% 100%, 0 85%, 0 12%);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    overflow: hidden;
    /* Color via tier class */
    font-family: var(--font-heading);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.5));
}

.ea-card:hover {
    transform: translateY(-15px) scale(1.05);
    filter: drop-shadow(0 25px 25px rgba(217, 4, 41, 0.4));
}

/* Inner gold border area */
.ea-card::before {
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    /* Background via tier class */
    clip-path: polygon(12% 0, 88% 0, 100% 12%, 100% 85%, 50% 100%, 0 85%, 0 12%);
    z-index: 1;
}

/* Shimmer animation */
.ea-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(45deg);
    animation: shine 5s infinite linear;
    pointer-events: none;
    z-index: 20;
}

@keyframes shine {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

/* Container for all content inside the inner border */
.ea-card-inner {
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    padding-bottom: 15px;
}

.ea-card-top {
    position: relative;
    height: 180px;
    width: 100%;
}

.ea-card-stats-quick {
    position: absolute;
    top: 15px;
    left: 20px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.ea-card-rating {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    
}

.ea-card-position {
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: -2px;
}

/* Add custom flags/logos directly as image tags natively */
.ea-card-nation, .ea-card-club {
    width: 28px;
    height: 18px;
    margin-top: 5px;
    object-fit: cover;
}
.ea-card-club {
    height: 28px; 
    object-fit: contain;
}

.ea-card-image {
    position: absolute;
    bottom: -15px;
    right: -10px;
    width: 190px;
    height: 190px;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.ea-card-image img {
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: top;
    filter: drop-shadow(-2px 5px 8px rgba(0,0,0,0.5));
    /* Fade out the bottom so it blends with the background */
    -webkit-mask-image: linear-gradient(to top, transparent 0%, black 15%);
    mask-image: linear-gradient(to top, transparent 0%, black 15%);
}

.ea-card-bottom {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ea-card-name {
    font-size: 1.35rem;
    font-weight: 900;
    text-transform: uppercase;
    
    margin-top: 5px;
    letter-spacing: 0.5px;
    text-align: center;
}

.line-divider {
    width: 80%;
    height: 1px;
    
    margin: 3px auto 8px auto;
}

.ea-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 25px;
    row-gap: 2px;
    width: 85%;
    margin: 0 auto;
    padding-bottom: 20px;
}

.ea-stat {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
}

.ea-stat strong {
    
    font-size: 1.2rem;
    font-weight: 900;
}

.ea-stat span {
    
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pt-0 { padding-top: 0 !important; }

/* Player Modal */
.player-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.player-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.player-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    align-items: flex-start;
    background: linear-gradient(135deg, #1e1b15 0%, #171510 100%);
    border: 2px solid #d4af37;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    color: #FFFFFF !important;
}

.player-modal-overlay.active .player-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    align-items: flex-start;
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #d4af37;
    cursor: pointer;
    transition: transform 0.3s;
}

.modal-close:hover {
    transform: scale(1.2);
    color: #ffd700;
}

.modal-left img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: radial-gradient(circle at center, #4a050f 0%, #0b0103 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.modal-right h2 {
    font-size: 2.5rem;
    color: #d4af37;
    text-transform: uppercase;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}
.modal-right h3 {
    color: #ffdf00;
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.modal-full-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.modal-detail-item {
    background: rgba(255,255,255,0.05);
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid #d4af37;
}

.modal-detail-item > span {
    display: block;
    color: #a0a5a8 !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.modal-detail-item strong {
    font-size: 1.2rem;
    color: #FFFFFF !important;
}

.modal-bio {
    margin-top: 25px;
    font-size: 0.95rem;
    color: #E0E0E0 !important;
    line-height: 1.6;
}

.modal-bio strong {
    color: #FFFFFF !important;
}

@media screen and (max-width: 768px) {
    .player-modal-content {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
}



/* =========================================
   Ultimate Scouting Portal Enhancements
   ========================================= */

/* Tiers */
.tier-gold {
    background: radial-gradient(circle at 50% 10%, #fff7ce 0%, #ecd077 30%, #c49626 70%, #875c08 100%);
    color: #3b2d0d;
}
.tier-gold::before {
    background: radial-gradient(circle at center, #fcefa8 0%, #dabd64 45%, #a67c1e 80%, #68480a 100%);
}
.tier-gold .ea-stat strong, .tier-gold .ea-stat span, .tier-gold .ea-card-name, .tier-gold .ea-card-rating {
    color: #3b2d0d;
}
.tier-gold .line-divider { background: rgba(59, 45, 13, 0.4); }

.tier-silver {
    background: radial-gradient(circle at 50% 10%, #ffffff 0%, #e0e0e0 30%, #9e9e9e 70%, #616161 100%);
    color: #212121;
}
.tier-silver::before {
    background: radial-gradient(circle at center, #f5f5f5 0%, #bdbdbd 45%, #757575 80%, #424242 100%);
}
.tier-silver .ea-stat strong, .tier-silver .ea-stat span, .tier-silver .ea-card-name, .tier-silver .ea-card-rating {
    color: #212121;
}
.tier-silver .line-divider { background: rgba(33, 33, 33, 0.4); }

.tier-bronze {
    background: radial-gradient(circle at 50% 10%, #ffdfbf 0%, #cd7f32 30%, #8c5523 70%, #593515 100%);
    color: var(--text-white);
}
.tier-bronze::before {
    background: radial-gradient(circle at center, #e6a87c 0%, #b87333 45%, #734a26 80%, #402813 100%);
}
.tier-bronze .ea-stat strong, .tier-bronze .ea-stat span, .tier-bronze .ea-card-name, .tier-bronze .ea-card-rating {
    color: var(--text-white);
}
.tier-bronze .line-divider { background: rgba(255, 255, 255, 0.4); }

.tier-inform {
    background: radial-gradient(circle at 50% 10%, #303030 0%, #1a1a1a 30%, #000000 70%, #000000 100%);
    color: #f7d770;
}
.tier-inform::before {
    background: radial-gradient(circle at center, #424242 0%, #212121 45%, #0d0d0d 80%, #000000 100%);
}
.tier-inform .ea-stat strong, .tier-inform .ea-stat span, .tier-inform .ea-card-name, .tier-inform .ea-card-rating {
    color: #f7d770;
}
.tier-inform .line-divider { background: rgba(247, 215, 112, 0.4); }

/* Filters & Search UI */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 40px auto;
    max-width: 900px;
}

.search-input {
    padding: 12px 25px;
    border-radius: 30px;
    border: 2px solid var(--black-border);
    background: var(--black-light);
    color: var(--text-white);
    font-size: 1rem;
    font-family: inherit;
    width: 300px;
    max-width: 100%;
    transition: all 0.3s;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 30px;
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-gray);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

/* Ambient Stadium Background */
.page-body {
    position: relative;
}
.stadium-bg-effects {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.stadium-light {
    position: absolute;
    width: 150vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, rgba(217, 4, 41, 0.05) 0%, transparent 60%);
    transform-origin: center top;
    animation: sweep 12s infinite alternate ease-in-out;
}
.stadium-light-2 {
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
    animation: sweep 15s infinite alternate-reverse ease-in-out;
}

@keyframes sweep {
    0% { transform: translateY(-50%) rotate(-15deg); }
    100% { transform: translateY(0%) rotate(15deg); }
}

/* Modal Updates for Radar & Highlights */
.modal-grid-v2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media screen and (min-width: 768px) {
    .modal-grid-v2 {
        grid-template-columns: 1fr 1fr;
    }
}

.modal-radar-container {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.modal-highlights {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
}

.modal-highlights h4 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #ffdf00;
}

.video-thumb {
    width: 100%;
    height: 140px;
    background: url('../assets/images/training.png') center/cover;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
}

.video-thumb:hover {
    transform: scale(1.02);
}

.video-thumb::after {
    content: '\f144'; /* FontAwesome play button */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
    transition: color 0.3s;
}

.video-thumb:hover::after {
    color: var(--primary);
}


/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px auto 40px auto;
    flex-wrap: wrap;
    max-width: 900px;
}

.cat-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    color: var(--text-white);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.cat-tab:hover {
    background: rgba(212, 175, 55, 0.2);
}

.cat-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(217, 4, 41, 0.4);
}

@media screen and (max-width: 768px) {
    .cat-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

.category-grid {
    display: none;
}
.category-grid.active {
    display: grid;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ConnecTED Footer Button */
.connected-btn {
    display: inline-block;
    background: linear-gradient(135deg, #EF233C, #D90429);
    color: var(--text-white);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-left: 8px;
    box-shadow: 0 4px 10px rgba(217, 4, 41, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
}
.connected-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(217, 4, 41, 0.6);
    color: var(--text-white);
}

.text-white { color: var(--text-white) !important; }

