/* Common Styles */
.institute-loading,
.institute-error,
.institute-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 20px 0;
}

.institute-error {
    background: #ffeaea;
    border-color: #ff6b6b;
    color: #d63031;
}

.retry-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.retry-btn:hover {
    background: #005a87;
}

/* Courses Styles */
.institute-courses {
    margin: 20px 0;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

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

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-content {
    padding: 20px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-timetable {
    margin-bottom: 12px;
}

.timetable-entries {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.timetable-entry {
    background: #f0f0f0;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timetable-date {
    font-weight: 500;
    color: #333;
}

.timetable-time {
    color: #666;
}

.timetable-more {
    color: #0073aa;
    font-size: 12px;
    font-weight: 500;
}

.course-teachers {
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.teacher-names {
    font-weight: 500;
    color: #333;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.course-price {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.price-free {
    color: #28a745;
}

.price-module {
    color: #dc3545;
}

.price-paid {
    color: #0073aa;
}

.course-details-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.course-details-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

/* Teachers Styles */
.institute-teachers {
    margin: 20px 0;
}

.teachers-search {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.teachers-count, .courses-count {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.courses-search {
    margin-bottom: 20px;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.teacher-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

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

.teacher-image {
    position: relative;
    height: 208px; /* h-52 equivalent */
    width: 100%;
    overflow: hidden;
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teacher-content {
    padding: 16px;
}

.teacher-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1f2937; /* text-gray-800 */
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.teacher-qualifications {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.qualification-text {
    font-size: 14px;
    color: #4b5563; /* text-gray-600 */
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.teacher-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.teacher-description {
    font-size: 14px;
    color: #4b5563; /* text-gray-600 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-right: 12px;
}

.view-profile-btn {
    background: #0073aa; /* Using WordPress primary color instead of primary */
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-profile-btn:hover {
    background: #005a87; /* Darker shade for hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    .courses-grid,
    .teachers-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 10px 0;
    }
    
    .course-card,
    .teacher-card {
        margin: 0 10px;
    }
    
    .search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .course-footer {
        gap: 12px;
    }
    
    .course-details-btn {
        padding: 12px;
    }
    
    .teacher-footer {
        gap: 8px;
    }
    
    .teacher-description {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .view-profile-btn {
        width: 100%;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .course-content,
    .teacher-content {
        padding: 16px;
    }
    
    .course-image,
    .teacher-image {
        height: 160px;
    }
    
    .institute-loading,
    .institute-error,
    .institute-empty {
        margin: 10px;
        padding: 30px 15px;
    }
    
    .teacher-footer {
        gap: 12px;
    }
}