:root {
    --primary-blue: #0b559f;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --accent-pink: #ec4899;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: #f8fafc;
    -webkit-text-size-adjust: 100%; /* Prevents iOS font-boosting bugs */
}

header {
    background: #000000;
    border-bottom: 2px solid #0056b3; /* Clean athletic blue underline border */
    padding: 1rem 1.5rem; /* Reduced horizontal padding for mobile spacing safety */
    display: flex;
    flex-direction: column; /* Stacked layout by default on mobile phones */
    gap: 1.25rem;
    align-items: center;
    box-sizing: border-box;
}

/* Brand Grouping: Logo + Stacked Text */
.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #ffffff;
}

.logo-container img {
    height: 60px; /* Scaled down slightly for mobile harmony */
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-title {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 1.5rem; /* Mobile scaling standard */
    line-height: 1.1;
    letter-spacing: 1px;
    margin: 0;
    color: #ffffff;
    text-transform: uppercase;
}

.brand-subtitle {
    font-family: 'Arial', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.1;
    letter-spacing: 1px;
    margin: 0;
    color: #ffffff;
    text-transform: uppercase;
}

/* Navigation Links layout alignment definitions */
nav {
    display: flex;
    flex-wrap: wrap; /* Permits safe wraps on extremely small phones */
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}

nav a:hover { 
    color: var(--primary-blue); 
}

/* Accent underline hovering effect */
nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3b82f6;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

nav a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Premium Register Button */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #000000;
    color: #ffffff !important;
    padding: 0.65rem 1.5rem;
    border: 2px solid #2563eb;
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    width: auto; /* Stops cross-width stretching on mobile flex elements */
}

.cta-btn:hover {
    background: #2563eb;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.7);
    transform: translateY(-1px);
}

/* Small inline logo inside the register button */
.cta-btn img {
    height: 18px;
    width: auto;
}

/* Responsive Fluid Typography Section Settings */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95));
}

.hero h1 {
    font-size: 2rem; /* Clean drop for small screens */
    margin-top: 0;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.hero p {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0 auto;
    max-width: 600px;
}

/* Section Headings Styling rules removed from inline structure */
.section-heading {
    max-width: 1200px;
    margin: 2.5rem auto 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.section-heading h2 {
    border-left: 5px solid var(--primary-blue);
    padding-left: 1rem;
    font-size: 1.5rem;
    margin: 0;
}

.grid-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adaptive card sizes */
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    background: #334155; 
}

.card-content { 
    padding: 1.25rem; 
}

.badge {
    background: var(--primary-blue);
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.badge-pink { 
    background: var(--accent-pink); 
}

/* Training Component Responsive Container Rules */
.training-section {
    max-width: 800px;
    margin: 3.5rem 1rem; /* Margins instead of auto-locks prevent side-bleeding */
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    text-align: center;
}

@media(min-width: 800px) {
    .training-section {
        margin: 4rem auto;
        padding: 2.5rem;
    }
}

footer {
    background: #000;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid #334155;
}

/* ==========================================================================
   DESKTOP MEDIA QUERY OVERRIDES (Restores beautiful wide spacing on large screens)
   ========================================================================== */
@media (min-width: 768px) {
    header {
        flex-direction: row; /* Horizontal navigation bar restored */
        justify-content: space-between;
        padding: 0.75rem 3rem;
    }

    nav {
        width: auto;
        gap: 2rem;
    }

    .logo-container img {
        height: 75px;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .brand-subtitle {
        font-size: 1.2rem;
    }

    .hero {
        padding: 4rem 2rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.3rem;
    }

    .section-heading {
        margin-top: 4rem;
    }

    .section-heading h2 {
        font-size: 1.8rem;
    }
    
    .grid-container {
        gap: 2rem;
        margin: 3rem auto;
    }
}