/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Bottom Navigation */
.bottom-nav {
    background: #2E7D32;
    padding: 1rem 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.bottom-nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    text-align: center;
}

.bottom-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.bottom-nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bottom-nav-link i {
    font-size: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.school-logo {
    max-height: 80px;
    max-width: 200px;
    height: auto;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.school-logo:hover {
    transform: scale(1.05);
}

.school-logo:not([src]) {
    display: none;
}

.logo-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-fallback i {
    font-size: 2rem;
    color: #A5D6A7;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.main-title i {
    color: #A5D6A7;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link i {
    font-size: 1rem;
}

/* Summary Section */
.summary-section {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.total-card::before {
    background: #4CAF50;
}

.specialized-card::before {
    background: #2196F3;
}

.expert-card::before {
    background: #FF9800;
}

.teacher-assistant-card::before {
    background: #9C27B0;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.card-info {
    width: 100%;
}

.card-title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.total-card .card-number {
    color: #4CAF50;
}

.specialized-card .card-number {
    color: #2196F3;
}

.expert-card .card-number {
    color: #FF9800;
}

.teacher-assistant-card .card-number {
    color: #9C27B0;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.total-card .card-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.specialized-card .card-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.expert-card .card-icon {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.teacher-assistant-card .card-icon {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

/* Search Section */
.search-section {
    background: white;
    padding: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Sarabun', sans-serif;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #1B5E20;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.filter-container {
    min-width: 200px;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Sarabun', sans-serif;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #1B5E20;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

/* Teachers Section */
.teachers-section {
    margin-bottom: 3rem;
}

.teachers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.8rem;
    color: #1B5E20;
    font-weight: 600;
}

.results-info {
    color: #666;
    font-size: 0.9rem;
}

/* Category Sections */
.category-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-count {
    background: #f5f5f5;
    color: #666;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Category specific colors */
.specialized-category .category-icon {
    background: #2196F3;
}

.specialized-category .category-header {
    border-bottom-color: rgba(33, 150, 243, 0.2);
}

.expert-category .category-icon {
    background: #FF9800;
}

.expert-category .category-header {
    border-bottom-color: rgba(255, 152, 0, 0.2);
}

.teacher-category .category-icon {
    background: #9C27B0;
}

.teacher-category .category-header {
    border-bottom-color: rgba(156, 39, 176, 0.2);
}

.assistant-category .category-icon {
    background: #4CAF50;
}

.assistant-category .category-header {
    border-bottom-color: rgba(76, 175, 80, 0.2);
}

.teacher-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.teacher-image-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid #1B5E20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.teacher-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.teacher-image-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

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

.teacher-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1B5E20;
    margin-bottom: 0.5rem;
}

.teacher-title {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border-radius: 6px;
    display: inline-block;
}

.view-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.95rem;
}

.view-report-btn:hover {
    background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
}

.view-report-btn i {
    font-size: 0.9rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: #1B5E20;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.developer-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1B5E20;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-section {
        margin-bottom: 1rem;
    }
    
    .school-logo {
        max-height: 60px;
        max-width: 150px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .bottom-nav-content {
        gap: 1rem;
    }
    
    .bottom-nav-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .card-number {
        font-size: 2rem;
    }
    
    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .teachers-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .teachers-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .teacher-card {
        padding: 1.25rem;
    }
    
    .teacher-image-container {
        width: 70px;
        height: 70px;
    }
    
    .teacher-image-fallback {
        font-size: 1.5rem;
    }
    
    .category-section {
        padding: 1rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .main-title {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .school-logo {
        max-height: 50px;
        max-width: 120px;
    }
    
    .subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    .bottom-nav-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .bottom-nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        justify-content: center;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .summary-card {
        padding: 0.75rem;
    }
    
    .card-number {
        font-size: 1.8rem;
    }
    
    .card-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .teachers-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .teacher-card {
        padding: 1rem;
    }
    
    .teacher-image-container {
        width: 60px;
        height: 60px;
    }
    
    .teacher-image-fallback {
        font-size: 1.2rem;
    }
    
    .teacher-name {
        font-size: 1.1rem;
    }
    
    .teacher-title {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .view-report-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .category-section {
        padding: 0.75rem;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .main-title {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .teacher-card {
        padding: 0.75rem;
    }
    
    .teacher-name {
        font-size: 1rem;
    }
    
    .view-report-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Print Styles */
@media print {
    .search-section,
    .footer {
        display: none;
    }
    
    .school-logo {
        filter: none;
        background: none;
        padding: 0;
    }
    
    .teacher-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}