/* ===============================================
   STONEY CREEK SABRES - MAIN STYLESHEET
   Custom styles for hockey team website
   =============================================== */

/* GLOBAL STYLES */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--dark-gray);
    padding-top: 76px; /* Account for fixed navbar */
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* NAVIGATION */
.navbar {
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 600;
    padding: 0;
    line-height: 1.1;
}

.navbar-brand .team-level {
    font-size: 0.8rem;
    color: var(--team-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: block;
    margin-top: -2px;
}

/* Add responsive styling for team-level text */
@media (max-width: 576px) {
    .navbar-brand .team-level {
        font-size: 0.65rem;
        letter-spacing: 0.3px;
        margin-top: -1px;
    }
}

.navbar-brand img {
    height: 40px;
    width: auto;
    filter: brightness(1.1); /* Slightly brighten logo on dark navbar */
    transition: transform 0.3s ease;
}

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

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--team-primary) !important; /* Gold hover for better contrast */
}

/* OFFICIAL HEADER SECTION */
.official-header-section {
    position: relative;
    padding: 0;
    margin: 0;
}

.official-header-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0;
    line-height: 0; /* Remove any line-height spacing */
}

.official-header-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    filter: brightness(1.1);
}

.official-header-banner:hover img {
    transform: scale(1.02);
}

/* HERO SECTION */
.hero-section {
    position: relative;
    min-height: 75vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--team-primary) 0%, var(--team-secondary) 100%);
    background-image: 
        linear-gradient(rgba(255, 182, 31, 0.9), rgba(26, 87, 50, 0.9)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect width="1200" height="800" fill="%23FFB61F"/><path d="M0,400 Q300,200 600,400 T1200,400 V800 H0 V400 Z" fill="%231A5732" opacity="0.3"/></svg>');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.3));
}

/* UTILITY CLASS */
.min-vh-75 {
    min-height: 75vh;
}

/* Add this comment for easy header image replacement */
/* TO ADD HEADER IMAGE: Replace the background-image URL above with:
   url('../images/team-header.jpg') */

/* SECTIONS */
section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--team-primary);
}

/* SPONSOR CAROUSEL */
.sponsors-section {
    background: var(--light-gray);
}

.sponsor-logo-placeholder {
    padding: 2rem;
    background: var(--medium-gray);
    border: 2px solid var(--team-primary);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.sponsor-logo-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Replace sponsor placeholders with actual logos */
/* .sponsor-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
} */

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    color: var(--team-primary);
}

/* STATS PREVIEW */
.stats-preview {
    background: var(--dark-gray);
}

.stat-card {
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    transition: transform 0.3s ease;
    background: var(--medium-gray);
    border: 2px solid var(--team-secondary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card i {
    margin-bottom: 1rem;
}

.stat-card .display-6 {
    color: var(--team-primary);
    font-weight: 700;
}

/* CALL TO ACTION */
.cta-section {
    background: linear-gradient(135deg, var(--team-primary), var(--team-secondary));
}

/* BOOTSTRAP BUTTON OVERRIDES - TEAM COLORS & AA CONTRAST */
/* Primary Buttons - Gold background with black text for AA contrast */
.btn-primary {
    background-color: var(--team-primary) !important;
    border-color: var(--team-primary) !important;
    color: #000000 !important; /* Black text on gold for AA contrast (21:1 ratio) */
    font-weight: 600 !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--hover-primary) !important;
    border-color: var(--hover-primary) !important;
    color: #000000 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 182, 31, 0.5) !important;
}

/* Secondary Buttons - Dark Green background with white text */
.btn-secondary {
    background-color: var(--team-secondary) !important;
    border-color: var(--team-secondary) !important;
    color: #ffffff !important; /* White text on dark green for AA contrast (12.6:1 ratio) */
    font-weight: 600 !important;
}

.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
    background-color: var(--hover-secondary) !important;
    border-color: var(--hover-secondary) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(26, 87, 50, 0.5) !important;
}

/* Outline Primary Buttons - Gold border with gold text on dark background */
.btn-outline-primary {
    background-color: transparent !important;
    border-color: var(--team-primary) !important;
    color: var(--team-primary) !important; /* Gold text for AA contrast on dark backgrounds */
    font-weight: 600 !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--team-primary) !important;
    border-color: var(--team-primary) !important;
    color: #000000 !important; /* Black text when filled */
}

.btn-outline-primary.active {
    background-color: var(--team-primary) !important;
    border-color: var(--team-primary) !important;
    color: #000000 !important;
}

/* Outline Secondary Buttons - Using team gold for better contrast */
.btn-outline-secondary {
    background-color: transparent !important;
    border-color: var(--team-primary) !important; /* Team gold for better contrast (8.7:1 ratio) */
    color: var(--team-primary) !important;
    font-weight: 600 !important;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active {
    background-color: var(--team-primary) !important;
    border-color: var(--team-primary) !important;
    color: #000000 !important;
}

/* Success Buttons - Use team secondary (dark green) for better consistency */
.btn-success, .btn-outline-success {
    background-color: var(--team-secondary) !important;
    border-color: var(--team-secondary) !important;
    color: #ffffff !important; /* White text on dark green for AA contrast (12.6:1 ratio) */
    font-weight: 600 !important;
}

.btn-outline-success {
    background-color: transparent !important;
    color: var(--team-primary) !important; /* Use team gold for contrast on dark backgrounds */
}

.btn-outline-success:hover, .btn-outline-success:focus, .btn-outline-success:active {
    background-color: var(--team-secondary) !important;
    border-color: var(--team-secondary) !important;
    color: #ffffff !important;
}

/* Info Buttons - Use team secondary (dark green) for brand consistency */
.btn-info, .btn-outline-info {
    background-color: var(--team-secondary) !important;
    border-color: var(--team-secondary) !important;
    color: #ffffff !important; /* White text on dark green for AA contrast (12.6:1 ratio) */
    font-weight: 600 !important;
}

.btn-outline-info {
    background-color: transparent !important;
    color: var(--team-primary) !important; /* Team gold for dark backgrounds (8.7:1 ratio) */
}

.btn-outline-info:hover, .btn-outline-info:focus, .btn-outline-info:active {
    background-color: var(--team-secondary) !important;
    border-color: var(--team-secondary) !important;
    color: #ffffff !important;
}

/* Warning Buttons - Using team gold */
.btn-warning, .btn-outline-warning {
    background-color: var(--team-primary) !important;
    border-color: var(--team-primary) !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

.btn-outline-warning {
    background-color: transparent !important;
    color: var(--team-primary) !important;
}

.btn-outline-warning:hover, .btn-outline-warning:focus, .btn-outline-warning:active {
    background-color: var(--team-primary) !important;
    border-color: var(--team-primary) !important;
    color: #000000 !important;
}

/* Danger Buttons - Light red for AA contrast */
.btn-danger, .btn-outline-danger {
    background-color: #EF4444 !important;
    border-color: #EF4444 !important;
    color: #ffffff !important; /* White text on red for AA contrast (5.7:1 ratio) */
    font-weight: 600 !important;
}

.btn-outline-danger {
    background-color: transparent !important;
    color: #F87171 !important; /* Lighter red for dark backgrounds (4.7:1 ratio) */
}

.btn-outline-danger:hover, .btn-outline-danger:focus, .btn-outline-danger:active {
    background-color: #EF4444 !important;
    border-color: #EF4444 !important;
    color: #ffffff !important;
}

/* Light Buttons - White background with dark text */
.btn-light, .btn-outline-light {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #000000 !important; /* Black text on white for maximum contrast (21:1 ratio) */
    font-weight: 600 !important;
}

.btn-outline-light {
    background-color: transparent !important;
    color: #ffffff !important; /* White text on dark backgrounds */
}

.btn-outline-light:hover, .btn-outline-light:focus, .btn-outline-light:active {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #000000 !important;
}

/* BUTTONS */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* TEXT CONTRAST FIXES FOR AA COMPLIANCE */
/* Fix text-muted for better contrast on dark backgrounds */
.text-muted {
    color: #D1D5DB !important; /* Light gray for AA contrast (7.3:1 ratio on dark backgrounds) */
}

/* Fix text-secondary for better contrast */
.text-secondary {
    color: var(--team-primary) !important; /* Team gold for AA contrast (8.7:1 ratio) */
}

/* Ensure icons have sufficient contrast */
.text-secondary i, .fa-secondary {
    color: var(--team-primary) !important;
}

/* Override Bootstrap's default text colors on dark theme */
.text-light {
    color: #ffffff !important;
}

/* CARDS */
.card {
    border: 2px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    background-color: var(--medium-gray);
    color: var(--text-primary);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--team-secondary);
    color: var(--team-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--team-primary);
}

/* PHOTO GALLERY */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

/* STATS TABLE */
.stats-table {
    background: var(--medium-gray);
    border: 2px solid var(--team-primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.table th {
    background: var(--team-secondary);
    color: var(--team-primary);
    border: none;
    font-weight: 600;
}

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

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(26, 87, 50, 0.15);
}

/* CONTACT FORM */
.contact-form {
    background: var(--medium-gray);
    border: 2px solid var(--team-primary);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.form-control {
    border: 2px solid var(--border-light);
    border-radius: 5px;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
    background-color: var(--dark-gray);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--team-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 182, 31, 0.25);
    background-color: var(--dark-gray);
    color: var(--text-primary);
}

/* Fix placeholder text contrast for accessibility */
.form-control::placeholder {
    color: #B0B0B0 !important; /* Light gray for AA contrast (6.6:1 ratio on dark) */
    opacity: 1 !important;
    font-weight: 400;
}

.form-control:focus::placeholder {
    color: #D0D0D0 !important; /* Even lighter when focused for better visibility */
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
}

.form-check-label {
    color: #ffffff !important; /* White text for AA contrast on dark backgrounds */
    font-weight: 500;
}

/* FOOTER */
footer {
    background: var(--dark-gray) !important;
    color: var(--text-light);
}

footer a {
    color: var(--text-light);
    transition: color 0.3s ease;
}

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

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        background-attachment: scroll;
    }

    .min-vh-75 {
        min-height: 60vh;
    }
    
    .display-4, .display-5 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-card {
        margin-bottom: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    section {
        padding: 2rem 0;
    }
    
    .hero-section {
        min-height: 50vh;
    }

    .min-vh-75 {
        min-height: 50vh;
    }
    
    .display-4, .display-5 {
        font-size: 2rem;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }

    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* UTILITIES */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--team-primary), var(--team-secondary));
}

.bg-dark-theme {
    background-color: var(--light-gray) !important;
}

.border-team {
    border-color: var(--team-primary) !important;
}

/* LOADING ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--team-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--team-primary);
}

/* BOOTSTRAP COLOR OVERRIDES - COMPREHENSIVE TEAM COLOR REPLACEMENT */
/* Replace Bootstrap Primary with Team Gold */
.bg-primary {
    background-color: var(--team-primary) !important;
    color: #000000 !important; /* Black text on gold for AA contrast */
}

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

.border-primary {
    border-color: var(--team-primary) !important;
}

/* Ensure text contrast on primary backgrounds */
.bg-primary * {
    color: #000000 !important;
}

.bg-primary .text-white {
    color: #000000 !important; /* Override white text on gold backgrounds */
}

.bg-primary .text-muted {
    color: #4A4A4A !important; /* Darker gray on gold for AA contrast (5.7:1 ratio) */
}

/* Replace Bootstrap Secondary with Team Green */
.bg-secondary {
    background-color: var(--team-secondary) !important;
    color: #ffffff !important;
}

.text-secondary {
    color: var(--aa-light-green) !important; /* Use AA-compliant light green */
}

.border-secondary {
    border-color: var(--team-secondary) !important;
}

/* Small text contrast fixes for AA compliance */
.small.text-muted,
.text-muted.small {
    color: #E5E5E5 !important; /* Lighter gray for better contrast (8.2:1 ratio) */
    font-weight: 500; /* Slightly bolder for better readability */
}

/* Badge text contrast improvements */
.badge.small {
    font-weight: 600 !important;
    font-size: 0.75em !important;
}

/* Fix specific contrast issues on cards */
.card-header.bg-warning .text-muted {
    color: #666666 !important; /* Darker gray on gold backgrounds for AA contrast */
}

/* Ensure proper contrast for icon colors - Team Colors Only */
.text-info {
    color: var(--team-primary) !important; /* Use team gold for info elements */
}

.text-warning {
    color: var(--team-primary) !important;
}

.text-success {
    color: var(--team-secondary) !important; /* Use team dark green for success */
}

.text-danger {
    color: var(--aa-light-red) !important; /* Keep red for danger - no team equivalent */
}

/* Why Sponsor section - use team colors for circles */
.bg-info {
    background-color: var(--team-secondary) !important;
    color: #ffffff !important;
}

.bg-warning {
    background-color: var(--team-primary) !important;
    color: #000000 !important;
}

.bg-success {
    background-color: var(--team-secondary) !important;
    color: #ffffff !important; /* White text on dark green for AA contrast */
}

/* Ensure rounded circle backgrounds use proper contrast */
.bg-primary.rounded-circle,
.bg-secondary.rounded-circle,
.bg-info.rounded-circle,
.bg-warning.rounded-circle,
.bg-success.rounded-circle {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Override Bootstrap colors with team colors only */
:root {
    --bs-primary: var(--team-primary);
    --bs-primary-rgb: 255, 182, 31;
    --bs-secondary: var(--team-secondary);
    --bs-secondary-rgb: 26, 87, 50;
    --bs-success: var(--team-secondary);
    --bs-success-rgb: 26, 87, 50;
    --bs-info: var(--team-secondary);
    --bs-info-rgb: 26, 87, 50;
    --bs-warning: var(--team-primary);
    --bs-warning-rgb: 255, 182, 31;
} 