/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General styles */ 
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #11284D 0%, #0A1C36 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(174,138,47,0.1)"/></svg>');
    background-size: cover;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* User Navigation */
.user-nav {
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #AE8A2F;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text {
    font-weight: 600;
    color: #11284D;
}

.user-nav a {
    color: #AE8A2F;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.user-nav a:hover {
    background: #AE8A2F;
    color: white;
    transform: translateY(-2px);
}

/* Search Section */
.search-section { 
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-left: 4px solid #11284D;
}

.search-section h2 {
    text-align: center;
    color: #11284D;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

/* Alphabet links styles */ 
.alphabet-links { 
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
} 

.alphabet-links a { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    border: 2px solid #11284D;
    border-radius: 8px;
    background-color: #FFFFFF; 
    color: #11284D; 
    font-weight: 600;
    transition: all 0.3s ease;
} 

.alphabet-links a:hover { 
    background-color: #11284D; 
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(17, 40, 77, 0.3);
}

.alphabet-links a.active {
    background-color: #AE8A2F;
    color: #FFFFFF;
    border-color: #AE8A2F;
}

/* Search Form */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.search-form label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #11284D;
    font-size: 0.9rem;
}

.search-form input[type="text"],
.search-form select {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #11284D;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-form input[type="text"]:focus,
.search-form select:focus {
    outline: none;
    border-color: #AE8A2F;
    box-shadow: 0 0 0 3px rgba(174, 138, 47, 0.1);
    transform: translateY(-1px);
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #11284D 0%, #0A1C36 100%);
    color: #FFFFFF;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(17, 40, 77, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Employee Grid */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Employee profile styles */ 
.employee-profile { 
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Different border colors for each staff card */
.employee-profile:nth-child(4n+1) {
    border-left: 4px solid #11284D;
}

.employee-profile:nth-child(4n+2) {
    border-left: 4px solid #AE8A2F;
}

.employee-profile:nth-child(4n+3) {
    border-left: 4px solid #C6C8CA;
}

.employee-profile:nth-child(4n+4) {
    border-left: 4px solid #0A1C36;
}

.employee-profile:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.profile-picture { 
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #AE8A2F;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
} 

.profile-basic {
    flex: 1;
}

.profile-basic h2 {
    color: #11284D;
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.department {
    color: #AE8A2F;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.college {
    color: #6c757d;
    font-size: 0.85rem;
}

.profile-details {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.detail-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.detail-item strong {
    color: #11284D;
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item strong i {
    color: #AE8A2F;
    width: 16px;
}

.detail-content {
    color: #495057;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Clickable links */
.clickable-link {
    color: #11284D;
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.3s ease;
}

.clickable-link:hover {
    color: #AE8A2F;
    text-decoration: none;
}

/* Read More/Less styles */
.read-more-content {
    display: none;
}

.read-more-toggle {
    color: #AE8A2F;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: 5px;
}

.read-more-toggle:hover {
    color: #8C6D1F;
    text-decoration: underline;
}

/* Update button */
.update-btn-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-update {
    background: linear-gradient(135deg, #AE8A2F 0%, #8C6D1F 100%);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(174, 138, 47, 0.4);
    color: white;
}

/* Pagination styles */ 
.pagination { 
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
} 

.pagination a { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    text-decoration: none;
    border: 2px solid #11284D;
    border-radius: 8px;
    background-color: #FFFFFF; 
    color: #11284D; 
    font-weight: 600;
    min-width: 45px;
    transition: all 0.3s ease;
} 

.pagination a.active { 
    background: linear-gradient(135deg, #AE8A2F 0%, #8C6D1F 100%);
    color: #FFFFFF; 
    border-color: #AE8A2F;
} 

.pagination a:hover:not(.active) {
    background-color: #11284D;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-left: 4px solid #AE8A2F;
}

.no-results i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #11284D;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-results p {
    color: #6c757d;
    font-size: 1rem;
}

/* Messages */
.message {
    background: linear-gradient(135deg, #AE8A2F 0%, #8C6D1F 100%);
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(174, 138, 47, 0.3);
    font-weight: 600;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .employee-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .alphabet-links {
        gap: 5px;
    }
    
    .alphabet-links a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 0;
    }
    
    .header h1 {
        font-size: 1.7rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .employee-profile {
        padding: 20px;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.employee-profile {
    animation: fadeInUp 0.6s ease-out;
}