/* style.css - Custom styles */

/* ── PHHS Purple & Gold Theme ─────────────────────────────────────────── */
:root {
    --phhs-purple:       #5C1E8A;
    --phhs-purple-dark:  #3E1262;
    --phhs-purple-light: #7B3AAA;
    --phhs-gold:         #C9A227;
    --phhs-gold-light:   #E8C14A;
    --phhs-gold-dark:    #A87E1B;

    /* Override Bootstrap primary → purple */
    --bs-primary:        #5C1E8A;
    --bs-primary-rgb:    92, 30, 138;
    --bs-link-color:     #5C1E8A;
    --bs-link-hover-color: #3E1262;
}

/* Navbar */
.navbar.bg-primary {
    background-color: var(--phhs-purple) !important;
    border-bottom: 3px solid var(--phhs-gold);
}

/* Buttons */
.btn-primary {
    --bs-btn-bg:               var(--phhs-purple);
    --bs-btn-border-color:     var(--phhs-purple);
    --bs-btn-hover-bg:         var(--phhs-purple-dark);
    --bs-btn-hover-border-color: var(--phhs-purple-dark);
    --bs-btn-active-bg:        var(--phhs-purple-dark);
    --bs-btn-active-border-color: var(--phhs-purple-dark);
    --bs-btn-disabled-bg:      var(--phhs-purple-light);
    --bs-btn-disabled-border-color: var(--phhs-purple-light);
}

.btn-outline-primary {
    --bs-btn-color:             var(--phhs-purple);
    --bs-btn-border-color:      var(--phhs-purple);
    --bs-btn-hover-bg:          var(--phhs-purple);
    --bs-btn-hover-border-color:var(--phhs-purple);
    --bs-btn-active-bg:         var(--phhs-purple-dark);
}

/* Footer */
.site-footer {
    background-color: var(--phhs-purple-dark) !important;
    color: #ddd !important;
    border-top: 4px solid var(--phhs-gold);
}

.site-footer a {
    color: var(--phhs-gold);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--phhs-gold-light);
    text-decoration: underline;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Hero Section */
.hero-section {
    background-image: linear-gradient(rgba(62,18,98,0.65), rgba(92,30,138,0.35)), url('images/Coach_Leslie_trophies.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

/* Statistics Cards */
.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Profile Cards */
.profile-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.profile-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(92, 30, 138, 0.2);
    border-color: var(--phhs-purple);
}

/* Search Results Highlight */
.search-highlight {
    background-color: #f5e8a3;
    color: #3E1262;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Profile Page */
.profile-photo-main {
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-gallery img {
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-gallery img:hover {
    transform: scale(1.05);
}

/* Admin Tables */
.admin-table {
    font-size: 0.9rem;
}

.admin-table th {
    background-color: var(--phhs-purple-dark);
    color: #fff;
    font-weight: 600;
}

/* Event List */
.event-item {
    border-left: 4px solid var(--phhs-gold);
    transition: border-color 0.2s;
}

.event-item:hover {
    border-left-color: var(--phhs-gold-dark);
}

/* Print Styles */
@media print {
    .navbar, .btn, footer, .no-print {
        display: none !important;
    }
    
    .profile-card {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Badge Styles */
.badge-wrestler {
    background-color: var(--phhs-purple);
}

.badge-coach {
    background-color: var(--phhs-purple-dark);
}

.badge-state-champ {
    background-color: var(--phhs-gold);
    color: #1a1a1a;
}

.badge-gold {
    background-color: #C9A227 !important;
    color: #1a1a1a !important;
}

.badge-contributor {
    background-color: #1A6B3C !important;
    color: #fff !important;
}

.badge-team {
    background-color: #B45309 !important;
    color: #fff !important;
}

.badge-4x-qualifier {
    background-color: #0369A1 !important;
    color: #fff !important;
}

.badge-4x-placer {
    background-color: #6D28D9 !important;
    color: #fff !important;
}

.badge-undefeated {
    background-color: #7C2D12 !important;
    color: #FDE68A !important;
    font-weight: 700 !important;
}

.badge-team-champ {
    background-color: #14532D !important;
    color: #FDE68A !important;
    font-weight: 700 !important;
}

.stat-explore-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.stat-explore-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

/* Record Display */
.record-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
}

.win-percentage {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--phhs-gold);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

/* Form Enhancements */
.form-label {
    font-weight: 500;
    color: #495057;
}

.required::after {
    content: ' *';
    color: #dc3545;
}

/* Success/Error Messages */
.alert-fixed {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.photo-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Profile Photo Carousel Arrows */
#photoCarousel .carousel-control-prev,
#photoCarousel .carousel-control-next {
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(92, 30, 138, 0.80);
    border-radius: 50%;
    opacity: 1;
}

#photoCarousel .carousel-control-prev {
    left: 10px;
}

#photoCarousel .carousel-control-next {
    right: 10px;
}

#photoCarousel .carousel-control-prev:hover,
#photoCarousel .carousel-control-next:hover {
    background-color: rgba(62, 18, 98, 0.95);
}

#photoCarousel .carousel-control-prev-icon,
#photoCarousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}
