/* ========================================
   STUDENT COUNCIL PRESIDENTS FRONTEND STYLES
======================================== */

/* Section */
.student-presidents {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 70vh;
}

/* Section Title */
.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

.section-title p {
    font-size: 1.1rem;
    color: color-mix(in srgb, var(--default-color), transparent 40%);
    margin-top: 0.5rem;
}

/* Filter Box */
.filter-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filter-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.filter-box label {
    color: var(--heading-color);
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-box label i {
    color: #6c2c91;
    font-size: 1.2rem;
}

.filter-box .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-box .form-select:focus {
    border-color: #6c2c91;
    box-shadow: 0 0 0 0.2rem rgba(108, 44, 145, 0.25);
}

/* Presidents Table */
.presidents-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

.presidents-table thead {
    background: #6c2c91;
    background: linear-gradient(135deg, #6c2c91 0%, #5a2478 100%);
}

.presidents-table thead th {

    font-weight: 700;
    padding: 20px;
    border: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
    vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.presidents-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.presidents-table tbody tr:last-child {
    border-bottom: none;
}

.presidents-table tbody tr:hover {
    background: linear-gradient(90deg, 
        rgba(108, 44, 145, 0.05) 0%, 
        white 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.presidents-table tbody tr.hidden {
    display: none;
}

.presidents-table tbody td {
    padding: 20px;
    vertical-align: middle;
    border: none;
}

/* President Photo */
.president-photo {
    width: 50px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.president-photo-placeholder {
    font-size: 2.5rem;
    color: #ccc;
}

/* Year Badge */
.year-badge {
    display: inline-block;
    padding: 8px 20px;
    background: #6c2c91;
    background: linear-gradient(135deg, #6c2c91 0%, #5a2478 100%);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(108, 44, 145, 0.3);
    transition: transform 0.3s ease;
}

.presidents-table tbody tr:hover .year-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(108, 44, 145, 0.4);
}

/* President Name */
.president-name {
    font-size: 1.15rem;
    color: var(--heading-color);
    font-weight: 600;
}

/* Results Info */
.results-info {
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.results-info span {
    font-weight: 600;
    color: #6c2c91;
}

/* Empty State */
.student-presidents .bi-inbox {
    font-size: 4rem;
    opacity: 0.3;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .student-presidents {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .presidents-table {
        font-size: 0.95rem;
    }
    
    .presidents-table thead th {
        padding: 15px 12px;
        font-size: 0.9rem;
    }
    
    .presidents-table tbody td {
        padding: 15px 12px;
    }
}

@media (max-width: 768px) {
    .student-presidents {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .filter-box {
        padding: 20px;
    }
    
    .presidents-table {
        font-size: 0.9rem;
    }
    
    .presidents-table thead th {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    .presidents-table tbody td {
        padding: 12px 10px;
    }
    
    .president-name {
        font-size: 1.05rem;
    }
    
    .year-badge {
        padding: 6px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    /* Stack table on mobile */
    .presidents-table thead {
        display: none;
    }
    
    .presidents-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 2px solid #e9ecef;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    }
    
    .presidents-table tbody tr:hover {
        transform: none;
    }
    
    .presidents-table tbody td {
        display: block;
        text-align: left !important;
        padding: 15px 20px;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .presidents-table tbody td:last-child {
        border-bottom: none;
    }
    
    .presidents-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        display: block;
        color: #6c2c91;
        margin-bottom: 8px;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .presidents-table tbody td:nth-child(1) {
        background: #6c2c91;
        background: linear-gradient(135deg, #6c2c91 0%, #5a2478 100%);
        color: white;
        text-align: center !important;
        font-size: 1.2rem;
        font-weight: 700;
        padding: 12px;
    }
    
    .presidents-table tbody td:nth-child(1)::before {
        display: none;
    }
    
    .presidents-table tbody td:nth-child(2) {
        text-align: center !important;
    }
    
    .presidents-table tbody td:nth-child(2)::before {
        content: "ปีการศึกษา";
    }
    
    .presidents-table tbody td:nth-child(3)::before {
        content: "ชื่อ-นามสกุล";
    }
    
    .year-badge {
        display: inline-block;
    }
    
    .president-name {
        font-size: 1rem;
    }
}

/* Loading animation */
.filter-box::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-color), color-mix(in srgb, var(--accent-color), white 50%));
    border-radius: 14px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.filter-box {
    position: relative;
}