/* =====================================================================
   Club Theme – Shared Multi-Club Theme
   =====================================================================
   Only TWO variables drive the entire look:
     --club-primary    Background of navbars, banners, headers, buttons
     --club-secondary  Text / icons sitting ON those primary backgrounds

   The variables are injected at runtime via _Layout.cshtml <style> block,
   so database / club-model values win automatically.
   =====================================================================
*/

:root {
    /* Derived shades (computed from the two primaries) */
    --club-primary-dark: color-mix(in srgb, var(--club-primary) 75%, #000);
    --club-primary-light: color-mix(in srgb, var(--club-primary) 15%, #fff);
    --club-secondary-dark: color-mix(in srgb, var(--club-secondary) 80%, #000);

    /* Semantic gradients */
    --gradient-primary: linear-gradient(135deg, var(--club-primary) 0%, var(--club-primary-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--club-secondary) 0%, var(--club-secondary-dark) 100%);
    --gradient-dark: linear-gradient(135deg, var(--club-primary-dark) 0%, var(--club-primary) 100%);

    /* Neutral tokens */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border-color: rgba(0, 0, 0, 0.05);
    --border-light: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ============ GLOBAL STYLES ============ */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: #f8fafc;
    color: var(--text-primary);
}

/* ============ NAVBAR ============ */

.navbar,
[class*="navbar"] {
    background: var(--club-primary) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.navbar-brand {
    color: var(--club-secondary) !important;
}

.navbar .nav-link {
    color: var(--club-secondary) !important;
    opacity: 0.88;
    transition: opacity 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--club-secondary) !important;
    opacity: 1;
}

/* ============ BUTTONS ============ */

.btn-club,
.btn-primary {
    background: var(--club-primary) !important;
    border-color: var(--club-primary) !important;
    color: var(--club-secondary) !important;
}

.btn-club:hover,
.btn-primary:hover {
    background: var(--club-primary-dark) !important;
    border-color: var(--club-primary-dark) !important;
    color: var(--club-secondary) !important;
}

.btn-club-accent {
    background: var(--club-secondary) !important;
    color: var(--club-primary-dark) !important;
    border: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-club-accent:hover {
    background: white !important;
    color: var(--club-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-club-accent {
    border: 2px solid var(--club-primary) !important;
    color: var(--club-primary) !important;
}

.btn-outline-club-accent:hover {
    background: var(--club-primary) !important;
    color: var(--club-secondary) !important;
}

/* ============ BADGES & ALERTS ============ */

.badge-club,
.bg-club {
    background-color: var(--club-primary) !important;
    color: var(--club-secondary) !important;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-color: #10B981 !important;
    color: #047857 !important;
}

.alert-danger {
    background-color: color-mix(in srgb, var(--club-primary) 10%, #fff) !important;
    border-color: var(--club-primary) !important;
    color: var(--club-primary-dark) !important;
}

.alert-warning {
    background-color: color-mix(in srgb, var(--club-secondary) 10%, #fff) !important;
    border-color: var(--club-secondary) !important;
    color: #92400e !important;
}

/* Force dark text on yellow/warning backgrounds globally */
.bg-warning,
[class*="bg-warning"],
.badge.bg-warning {
    color: #1e293b !important;
}

/* ============ FORMS ============ */

.form-control:focus,
.form-select:focus {
    border-color: var(--club-primary) !important;
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--club-primary) 25%, transparent) !important;
}

.form-check-input:checked {
    background-color: var(--club-primary) !important;
    border-color: var(--club-primary) !important;
}

.form-check-input:focus {
    border-color: var(--club-primary) !important;
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--club-primary) 25%, transparent) !important;
}

/* ============ LINKS ============ */

a {
    color: var(--club-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--club-primary-dark);
}

/* ============ CARDS ============ */

.card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: color-mix(in srgb, var(--club-primary) 5%, transparent);
    border-bottom: 2px solid var(--border-color);
}

/* ============ TEXT UTILITIES ============ */

.text-club {
    color: var(--club-primary) !important;
}

.text-club-hover:hover {
    color: var(--club-primary-dark) !important;
}

.fw-semibold {
    font-weight: 600;
}

/* ============ PROGRESS BARS ============ */

.progress {
    background-color: #e5e7eb;
}

.progress-bar {
    background-color: var(--club-primary) !important;
}

/* ============ TABLES ============ */

.table thead th {
    background-color: var(--club-primary);
    color: var(--club-secondary);
    border-bottom: 2px solid var(--club-secondary);
}

.table tbody tr:hover {
    background-color: color-mix(in srgb, var(--club-primary) 4%, transparent);
}

/* ============ TABS ============ */

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    background-color: var(--club-primary);
    color: var(--club-secondary);
    border-color: var(--club-primary);
}

.nav-pills .nav-link {
    color: var(--club-primary);
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
    background-color: var(--club-primary) !important;
    color: var(--club-secondary);
}

.nav-pills .nav-link:hover {
    background-color: color-mix(in srgb, var(--club-primary) 10%, transparent);
}

/* ============ DROPDOWNS ============ */

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--club-primary);
    color: var(--club-secondary);
}

.dropdown-item:hover {
    background-color: color-mix(in srgb, var(--club-primary) 10%, transparent);
    color: var(--club-primary);
}

/* ============ MODALS ============ */

.modal-content {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background-color: var(--club-primary);
    color: var(--club-secondary);
    border-bottom: 2px solid var(--border-color);
}

.close-btn,
.btn-close {
    color: var(--club-primary) !important;
}

/* ============ PAGINATION ============ */

.pagination .page-link {
    color: var(--club-primary);
    border-color: var(--border-color);
}

.pagination .page-link:hover {
    background-color: color-mix(in srgb, var(--club-primary) 10%, transparent);
    color: var(--club-primary-dark);
    border-color: var(--club-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--club-primary);
    border-color: var(--club-primary);
    color: var(--club-secondary);
}

/* ============ SPINNERS ============ */

.spinner-border {
    color: var(--club-primary) !important;
}

/* ============ UTILITY CLASSES ============ */

.text-muted {
    color: var(--text-secondary) !important;
}

.bg-light-red {
    background-color: color-mix(in srgb, var(--club-primary) 10%, transparent);
}

.border-red {
    border-color: var(--club-primary) !important;
}

.border-top-red {
    border-top-color: var(--club-primary) !important;
}

/* ============ SECTION HEADERS / BANNERS ============ */
/* Any element that acts as a banner or section header uses primary bg + secondary text */

.section-header,
.page-header-club,
.card-club-header,
.bg-club-gradient {
    background: var(--club-primary) !important;
    color: var(--club-secondary) !important;
}

.section-header *,
.page-header-club *,
.card-club-header * {
    color: inherit !important;
}

/* ============ ANIMATIONS ============ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
    :root {
        font-size: 15px;
    }
}
