/* ==========================================================================
   EVENTS PAGE STYLES ( & MODALS )
   ========================================================================== */

/* --- LANDING SECTION --- */
.events-landing-section { padding: 80px 5%; background-color: #ffffff; scroll-margin-top: 80px; }
.events-subtitle { text-align: center; color: #666; margin-top: 0; margin-bottom: 60px; }
.events-split-container { display: flex; height: 450px; gap: 30px; max-width: 1200px; margin: 0 auto; }
.events-landing-section h2 { text-align: center;       /* Forces text to center */ font-size: 36px;  /* Large, bold font */ font-weight: 900; color: #051937;  /* Dark Blue */ margin-bottom: 25px; /* Space below the text */ position: relative; display: block; /* Ensures it fills the width */}

/* The Blue Line Underneath */
.events-landing-section h2::after { content: ''; display: block; width: 60px; /* Length of the line */ height: 4px;   /* Thickness of the line */ background: #00b4d8;      /* Light Blue Color */ margin: 15px auto 0 auto; /* 'auto' centers it horizontally */ border-radius: 2px;       /* Rounded edges */}
.event-hero-card { flex: 1; position: relative; background-size: cover; background-position: center; border-radius: 20px; overflow: hidden; cursor: pointer; box-shadow: 0 20px 40px rgba(0,0,0,0.2); transition: transform 0.3s ease; background-color: #051937; }
.event-hero-card:hover { transform: translateY(-5px); }
.event-card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; transition: opacity 0.3s; }
.gradient-fuego-bg { background: linear-gradient(to bottom, #051937, #ff6b6b); }
.event-hero-card:hover .event-card-overlay { opacity: 0.85; }
.gradient-blue-bg {background: linear-gradient(to bottom, #101011, #130a71);}
.event-card-content { position: absolute; bottom: 0; left: 0; padding: 40px; color: white; z-index: 2; width: 100%; }
.event-card-content h1 { font-size: 48px; margin: 0 0 10px 0; font-weight: 900; letter-spacing: 2px; }
.event-card-content h3 { font-size: 32px; margin: 0 0 10px 0; font-weight: 900; }
.event-card-content p { font-size: 16px; margin-bottom: 25px; opacity: 0.9; }
.white-btn { color: white; border: 2px solid white; padding: 10px 20px; text-decoration: none; font-weight: bold; border-radius: 30px; display: inline-block; }
.fuego-btn { background: white; color: #051937; border: none; padding: 12px 25px; font-weight: 900; border-radius: 30px; cursor: pointer; }

/* --- APL CARD BUTTONS --- */
.apl-btn-container {
    display: flex;
    width: 100%;
    margin-top: 15px;
    flex-direction: column; 
    gap: 15px; /* Gap between stacked buttons */
}

/* SHARED STYLES FOR BUTTONS */
.apl-btn-container button {
    cursor: pointer;
    font-size: 14px;
    padding: 12px 5px;
    text-align: center;
    width: 100%;
    justify-content: center;
    margin: 0; 
}

/* DESKTOP SETTINGS (Side-by-Side) */
@media (min-width: 768px) {
    .apl-btn-container {
        flex-direction: row; 
        gap: 10px; 
    }
    .apl-btn-container button {
        flex: 1; 
    }
}

/* --- DASHBOARD MODALS (Shared) --- */
.modal-overlay.full-screen { display: none; position: fixed; z-index: 2500; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); padding-top: 50px; padding-bottom: 50px; overflow-y: auto; align-items: center; justify-content: center; animation: fadeIn 0.4s ease-out; }
.modal-overlay.show { display: flex; }
.dashboard-container { width: 90%; max-width: 1000px; margin: 0 auto; border-radius: 25px; background: #ffffff; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4); display: flex; flex-direction: column; overflow: hidden; }
.dashboard-header { padding: 25px 40px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; background-color: #fff; }
.dash-title { margin: 0; font-size: 32px; font-weight: 900; color: #051937; letter-spacing: 1px; }
.close-modal { font-size: 32px; cursor: pointer; color: #333; line-height: 1; transition: 0.3s; }
.close-modal:hover { color: #ff6b6b; transform: rotate(90deg); }
.dashboard-content { padding: 40px; display: flex; flex-direction: row; align-items: flex-start; gap: 40px; }

/* Stats Panel & Chart */
.stats-panel { flex: 1; background: #ffffff; border-radius: 20px; padding: 30px 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; }
.box-title { margin: 0 0 20px 0; font-size: 16px; font-weight: 800; color: #051937; text-transform: uppercase; letter-spacing: 1px; background: #f4f4f4; padding: 8px 15px; border-radius: 20px; }
.doughnut-chart-container { position: relative !important; width: 260px; height: 260px; margin: 0 auto; display: flex; justify-content: center; align-items: center; }
.swirl-svg { transform: rotate(-90deg); width: 100%; height: 100%; overflow: visible; }
.chart-text-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.chart-text-overlay strong { text-shadow: none !important; color: WHITE !important; font-weight: 1000; font-size: 22px; }
.chart-text-overlay span { color: white; font-size: 14px; letter-spacing: 2px; margin-bottom: 5px; font-weight: 700; }
#slice-white { fill: #e6e6e6; stroke: #ffffff; stroke-width: 2px; }
.slice { transform-origin: 150px 150px; transform: rotate(-15deg); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.slice:hover { transform: scale(1.05) !important; cursor: pointer; filter: brightness(1.08)drop-shadow(0px 10px 10px rgba(0,0,0,0.2)); z-index: 100; }
.slice { transform-origin: 150px 150px; transform: scale(0) rotate(-45deg); opacity: 0; transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease-out; }
.slice.pop-in { transform: scale(1) rotate(0deg); opacity: 1; }
#slice-blue.pop-in { transition-delay: 0.1s; } #slice-red.pop-in { transition-delay: 0.2s; } #slice-white.pop-in { transition-delay: 0.3s; } #slice-green.pop-in { transition-delay: 0.4s; }

/* Results Panel */
.results-panel { flex: 1.5; display: flex; flex-direction: column; gap: 20px; padding-top: 0; }
/* =========================================
   PROFESSIONAL SEARCH BAR DESIGN
   ========================================= */

.search-wrapper { 
    position: relative; 
    width: 100%; 
    margin-top: 15px;
    margin-bottom: 15px;
}

/* The Input Field */
.search-wrapper input { 
    width: 100%; 
    padding: 15px 50px 15px 25px; /* Extra padding on right for the icon */
    
    /* Modern Look */
    background: #f4f6f8; 
    border: 2px solid #edf2f7; 
    border-radius: 50px; /* Pill Shape */
    
    /* Typography */
    color: #051937; 
    font-family: 'Montserrat', sans-serif;
    font-size: 14px; 
    font-weight: 600;
    
    /* Smooth Transition */
    transition: all 0.3s ease;
    outline: none;
}

/* Placeholder Text Color */
.search-wrapper input::placeholder {
    color: #a0aec0;
    font-weight: 500;
}

/* Hover State */
.search-wrapper input:hover {
    background: #ffffff;
    border-color: #cbd5e0;
}

/* Focus State (When typing) - The Glow Effect */
.search-wrapper input:focus { 
    background: #ffffff;
    border-color: #00b4d8; /* Theme Blue */
    box-shadow: 0 5px 20px rgba(0, 180, 216, 0.15); /* Soft Blue Glow */
    transform: translateY(-1px);
}

/* The Magnifying Glass Icon */
.search-icon { 
    position: absolute; 
    right: 20px; 
    top: 50%; 
    transform: translateY(-50%); 
    
    font-size: 18px; 
    color: #a0aec0; 
    pointer-events: none; /* Clicks pass through to the input */
    transition: color 0.3s ease;
}

/* Icon lights up when input is focused */
.search-wrapper input:focus + .search-icon {
    color: #00b4d8;
}.results-list { display: flex; flex-direction: column; gap: 15px; max-height: 350px; overflow-y: auto; padding-right: 5px; }
.result-card { background: white; padding: 15px 20px; border-radius: 12px; border: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.result-info h4 { margin: 0 0 5px 0; color: #051937; font-weight: 800; }
/* =========================================
   STUDENT PROFILE CARD (ARTS SEARCH)
   ========================================= */
.student-profile-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #eee;
    animation: fadeIn 0.3s ease;
}

.sp-header {
    background: #051937;
    color: white;
    padding: 20px;
    text-align: center;
}

.sp-name { font-size: 22px; font-weight: 900; margin: 0; text-transform: uppercase; }
.sp-class { font-size: 12px; opacity: 0.8; font-weight: 600; }

.sp-body {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-points-box {
    text-align: center;
    border-right: 1px solid #eee;
    padding-right: 20px;
    margin-right: 20px;
}
.sp-points-val { font-size: 36px; font-weight: 900; color: #fd746c; line-height: 1; }
.sp-points-lbl { font-size: 10px; font-weight: 700; color: #888; }

.sp-wins-list { flex: 1; }
.sp-win-item {
    font-size: 13px;
    color: #051937;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.rank-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    margin-right: 8px;
}
.rb-1 { background: #ffd700; }
.rb-2 { background: #c0c0c0; }
.rb-3 { background: #cd7f32; }

.not-found-msg {
    text-align: center; color: #888; font-weight: bold; padding: 20px; background: #f9f9f9; border-radius: 10px;
}
.badge { font-size: 10px; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; font-weight: bold; }
.badge.completed { background: #e0fdf4; color: #1dd1a1; }
.badge.pending { background: #fff3cd; color: #feca57; }

/* Podium / Winners */
.podium-container { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e0e0e0; }
.podium-row { display: flex; align-items: center; padding: 8px 12px; border-radius: 8px; background-color: #f9f9f9; transition: transform 0.2s ease; }
.podium-row:hover { transform: translateX(5px); }
.podium-row.rank-1 { background: linear-gradient(to right, #fffdf0, #ffffff); border-left: 4px solid #ffd700; box-shadow: 0 2px 6px rgba(255, 215, 0, 0.15); }
.podium-row.rank-2 { border-left: 4px solid #c0c0c0; }
.podium-row.rank-3 { border-left: 4px solid #cd7f32; }
.medal-icon { font-size: 18px; margin-right: 12px; }
.winner-details { display: flex; flex-direction: column; }
.winner-name { font-size: 14px; font-weight: 700; color: #051937; line-height: 1.2; }
.house-pill { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin-top: 2px; }

/* Mini Stats */
.mini-stats-container { display: flex; gap: 20px; margin-bottom: 20px; justify-content: space-between; }
.mini-stat-box { flex: 1; background: #ffffff; border-radius: 20px; padding: 25px 15px; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; transition: transform 0.3s ease; }
.mini-stat-box:hover { transform: translateY(-3px); border-color: #00b4d8; }
.mini-stat-box .counter { margin: 0 0 5px 0; font-size: 42px; font-weight: 900; color: #051937; line-height: 1; }
.mini-stat-box .stat-label { display: block; margin-top: 5px; font-size: 10px; font-weight: 700; color: #888; letter-spacing: 1px; text-transform: uppercase; }

/* History Popup */
.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two Equal Columns */
    gap: 20px;
    padding-bottom: 40px;
    width: 100%; /* Fix: Force full width */
}

/* Ensure cards inside history don't shrink */
.history-grid .result-card {
    width: 100%;
}#viewAllBtn:hover { background: #e0e0e0 !important; transform: translateY(-2px); }

/* Attendance Accordion */
.attendance-group { border: 1px solid #e0e0e0; margin-bottom: 10px; border-radius: 8px; overflow: hidden; }
.group-header { background-color: #f8f9fa; padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #051937; transition: background 0.2s; }
.group-header:hover { background-color: #e9ecef; }
.group-header::after { content: '▼'; font-size: 12px; transition: transform 0.3s; }
.attendance-group.active .group-header::after { transform: rotate(180deg); }
.group-content { display: none; padding: 0; border-top: 1px solid #e0e0e0; background: white; }
.attendance-group.active .group-content { display: block; }

/* --- PLAYER AUCTION POOL --- */
/* The Grid Container */
.auction-grid {
    display: grid;
    /* Default: Mobile 2 columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}
/* =========================================
   ARTS HISTORY SPLIT LAYOUT
   ========================================= */
.split-history-layout {
    display: flex;
    gap: 30px;
    width: 100%;
}

.history-column {
    flex: 1;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #eee;
}

.column-header {
    text-align: center;
    color: #051937;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 900;
    letter-spacing: 1px;
}

.history-grid-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Mobile: Stack them vertically */
@media (max-width: 992px) {
    .split-history-layout {
        flex-direction: column;
    }
}
/* Tablet (3 columns) */
@media (min-width: 600px) {
    .auction-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
}

/* Desktop (4 columns) */
@media (min-width: 992px) {
    .auction-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* Player Cards */
.player-card { position: relative; border-radius: 12px; overflow: hidden; transition: transform 0.2s; background: #fff; }
.player-card:hover { transform: scale(1.03); }
.player-card img { width: 100%; height: auto; display: block; border-radius: 8px; }

/* Pool Tabs */
.pool-tabs { display: flex; justify-content: space-around; background: #fff; border-bottom: 2px solid #ddd; padding: 10px 0; flex-wrap: wrap; }
.pool-tab { background: none; border: none; font-weight: 800; color: #888; cursor: pointer; padding: 10px 20px; font-size: 14px; transition: 0.3s; border-bottom: 3px solid transparent; }
.pool-tab:hover, .pool-tab.active { color: #051937; border-bottom: 3px solid #051937; }

/* Tiers */
.tier-NORMAL { border: 4px solid #F4D03F; box-shadow: 0 0 15px rgba(244, 208, 63, 0.4); }
.tier-NORMAL::after { content: "NORMAL"; position: absolute; top: 0; right: 0; background: #F4D03F; color: #051937; font-size: 10px; font-weight: bold; padding: 4px 8px; border-bottom-left-radius: 10px; }
.tier-ELITE { border: 4px solid #FF8C00; box-shadow: 0 0 20px rgba(255, 140, 0, 0.5); }
.tier-ELITE::after { content: "ELITE"; position: absolute; top: 0; right: 0; background: #FF8C00; color: white; font-size: 10px; font-weight: bold; padding: 4px 8px; border-bottom-left-radius: 10px; }
.tier-EPIC { border: 4px solid #00D26A; box-shadow: 0 0 25px rgba(0, 210, 106, 0.6); }
.tier-EPIC::after { content: "EPIC"; position: absolute; top: 0; right: 0; background: #00D26A; color: white; font-size: 10px; font-weight: bold; padding: 4px 8px; border-bottom-left-radius: 10px; }
/* =========================================
   DOWNLOAD BUTTON STYLES
   ========================================= */

/* Ensure the card can hold absolute positioned items */
.player-card {
    position: relative; 
    /* ... existing styles ... */
}

.card-download-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    
    background-color: white;
    color: #051937;
    border: 2px solid #051937;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.card-download-btn:hover {
    background-color: #051937;
    color: white;
    transform: scale(1.1);
}
/* --- EVENTS PAGE MOBILE ADJUSTMENTS --- */
@media (max-width: 992px) {
    /* 1. Stack Event Cards */
    .events-split-container { flex-direction: column !important; height: auto !important; gap: 30px; }
    .event-hero-card { width: 100% !important; height: 350px !important; min-height: 350px !important; }
    
    /* 2. Stack Dashboard (Chart Top, Search Bottom) */
    .dashboard-content { height: auto !important; display: flex !important; flex-direction: column !important; }
    .dashboard-container {
        height: auto !important;       /* Removes fixed height constraint */
        max-height: none !important;   /* Allows it to be taller than screen */
        overflow: visible !important;  /* Disables internal scroll, uses page scroll */
        margin-bottom: 50px !important; /* Space at bottom for scrolling */
    }
    .modal-overlay.full-screen {
        align-items: flex-start !important; /* Starts at the top */
        padding-top: 20px !important;       /* Small gap from top of screen */
        overflow-y: scroll !important;      /* Forces scrollbar */
        height: 100% !important;
    }
    .stats-panel, .results-panel { width: 100%; flex: none; }
    .stats-panel { order: 1; }
    .results-panel { order: 2; }
    
    /* 3. Typography & Grids */
    .dash-title { font-size: 24px; }
    .result-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .result-winner { width: 100%; text-align: left; border-top: 1px solid #eee; padding-top: 5px; margin-top: 5px; }
    .mini-stats-container { flex-direction: column; gap: 10px; }
    .mini-stat-box { width: 100%; padding: 20px 10px; }
    .mini-stat-box .counter { font-size: 36px; }
    .mini-stat-box .stat-label { font-size: 12px; }
    .history-grid { grid-template-columns: 1fr; }
    .pool-tabs {gap: 5px; justify-content: center;}
    .pool-tab {flex: 1 1 40%; text-align: center; font-size: 12px; padding: 8px 5px; }
    .card-download-btn { width: 40px; height: 40px; bottom: 8px; right: 8px;
    }
}




/* ==========================================================================
   5. PRINT STYLES
   ========================================================================== */
@media print {
    header, nav, main, footer, .header-main, .info-bar, .sticky-navbar { display: none !important; }
    body, html { height: auto !important; overflow: visible !important; background: white !important; }
    #attendanceModal { display: block !important; position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: auto !important; z-index: 9999 !important; background: white !important; visibility: visible !important; }
    .dashboard-container { width: 100% !important; max-width: none !important; box-shadow: none !important; border: none !important; margin: 0 !important; height: auto !important; }
    .dashboard-content { height: auto !important; overflow: visible !important; display: block !important; }
    .attendance-group .group-content { display: block !important; border-top: 1px solid #000; }
    .attendance-group { break-inside: avoid; border: none !important; margin-bottom: 20px; }
    .no-print, .close-attendance, button, .close-modal { display: none !important; }
    .group-header { background: none !important; border-bottom: 2px solid #000; color: black !important; padding-left: 0 !important; }
    .group-header::after { display: none !important; }
}

