/* Custom Properties (from your theme) */
:root {
    --primary-color: #6BD4E1;
    --primary-dark: #4BB5C1;
    --primary-light: #8CE3ED;
    --primary-extra-light: #C2F1F7;
    --secondary-color: #F6AD55;
    --dark-color: #2D3748;
    --light-color: #F7FAFC;
    --gray-color: #A0AEC0;
    --success-color: #48BB78;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;

    /* Zenchers specific colors, if different from primary/secondary */
    --zencher-blue: #007bff; /* Example, adjust as needed */
    --zencher-green: #28a745; /* Example, adjust as needed */
    --zencher-orange: var(--secondary-color);
    --zencher-gray: var(--gray-color);
    --zencher-dark: var(--dark-color);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Accessibility helper for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Header --- */
.main-header {
    background-color: white;
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px; /* Adjust logo size */
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* --- Teachers Header Section --- */
.teachers-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 60px 20px 40px; /* Increased bottom padding for search bar */
    position: relative; /* For search container positioning */
    overflow: hidden;
    box-shadow: inset 0 -5px 15px rgba(0,0,0,0.1);
}

.teachers-header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: white;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.teachers-header p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

/* Search Container */
.search-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px 30px;
    max-width: 1000px;
    margin: -60px auto 0; /* Pulls it up into the header section */
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    gap: 15px; /* Space between search inputs */
    z-index: 10;
    position: relative; /* To make it above other content */
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.search-input-group {
    flex: 1; /* Allows inputs to grow */
    min-width: 200px; /* Minimum width for inputs before wrapping */
}

.search-container select,
.search-container input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    color: var(--dark-color);
    background-color: var(--light-color);
    transition: all 0.3s ease;
    -webkit-appearance: none; /* Remove default select arrow */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
}

.search-container select:focus,
.search-container input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-extra-light);
    outline: none;
}

.search-button {
    background-color: var(--primary-dark);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0; /* Prevent button from shrinking */
}

.search-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Main Content Layout --- */
.teachers-container {
    display: flex;
    gap: 30px;
    max-width: 1300px;
    margin: 50px auto 80px; /* Adjust margin to pull content up if search bar is higher */
    padding: 0 20px;
    align-items: flex-start; /* Align sidebar to top */
}

/* Filter Sidebar */
.filter-sidebar {
    flex: 0 0 280px; /* Fixed width sidebar */
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: sticky; /* Sticky sidebar */
    top: 100px; /* Adjust based on header height */
    align-self: flex-start; /* Ensure it sticks to the top */
}

.filter-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    font-weight: 600;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.filter-option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color); /* The checked color of the checkbox */
    cursor: pointer;
}

.filter-option label {
    font-size: 0.95rem;
    color: var(--dark-color);
    cursor: pointer;
}

.reset-button {
    background-color: var(--gray-color);
}

.reset-button:hover {
    background-color: var(--dark-color);
}

/* Teachers List */
.teachers-list {
    flex: 1; /* Takes up remaining space */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.no-results {
    grid-column: 1 / -1; /* Span across all columns */
    text-align: center;
    padding: 50px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    color: var(--gray-color);
}

.no-results h3 {
    color: var(--dark-color);
    margin-top: 1rem;
    font-size: 1.8rem;
}

.no-results p {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

/* Teacher Card */
.teacher-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: var(--transition);
    overflow: hidden; /* For badge */
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.teacher-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.teacher-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.teacher-info {
    width: 100%;
}

.teacher-name {
    font-size: 1.7rem;
    margin-bottom: 5px;
    color: var(--dark-color);
    font-weight: 700;
}

.teacher-subject {
    font-size: 1rem;
    color: var(--primary-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.teacher-location {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 10px;
}

.teacher-location i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.teacher-qualification {
    font-size: 0.95rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    min-height: 40px; /* Ensure consistent height for qualifications */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-rating {
    font-size: 0.95rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teacher-rating .stars {
    color: var(--secondary-color); /* Yellow color for stars */
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-right: 8px;
}

.teacher-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.teacher-classes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.class-tag {
    background-color: var(--primary-extra-light);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.teacher-actions {
    display: flex;
    gap: 10px;
    width: 100%; /* Ensure buttons span full width */
}

.profile-button,
.message-button {
    flex: 1; /* Distribute space evenly */
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.profile-button {
    background-color: var(--primary-color);
    color: white;
}

.profile-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.message-button {
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--gray-color);
}

.message-button:hover {
    background-color: var(--primary-extra-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    grid-column: 1 / -1; /* Span across all columns */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-button {
    background-color: white;
    color: var(--dark-color);
    border: 1px solid var(--primary-light);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.page-button:hover:not(.active) {
    background-color: var(--primary-extra-light);
    color: var(--primary-dark);
}

.page-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    cursor: default;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 20px 20px;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
    height: 60px;
    margin-bottom: 15px;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-light);
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.social-links a {
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 0.9rem;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .teachers-container {
        flex-direction: column;
        align-items: center;
    }

    .filter-sidebar {
        position: static; /* Remove sticky behavior on small screens */
        width: 100%;
        max-width: 600px; /* Constrain sidebar width */
        margin-bottom: 30px;
    }

    .teachers-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        width: 100%;
    }

    .search-container {
        flex-direction: column;
        padding: 20px;
        margin-top: -40px; /* Adjust pull-up margin for smaller screens */
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input-group {
        width: 100%;
        min-width: unset; /* Remove min-width */
    }

    .search-button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-header .nav-links {
        display: none; /* Hide by default */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        background-color: white;
        box-shadow: var(--box-shadow);
        padding: 15px 0;
        border-top: 1px solid #eee;
    }

    .main-header .nav-links.show {
        display: flex; /* Show when 'show' class is present */
    }

    .nav-links ul {
        flex-direction: column;
        align-items: center;
    }

    .nav-links li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        padding: 10px 20px;
        display: block;
    }

    .mobile-menu-btn {
        display: block; /* Show hamburger icon */
    }

    .teachers-header h1 {
        font-size: 2rem;
    }

    .teachers-header p {
        font-size: 1rem;
    }

    .teacher-card {
        padding: 1rem;
    }

    .teacher-name {
        font-size: 1.5rem;
    }

    .teacher-subject {
        font-size: 0.9rem;
    }

    .footer-container {
        grid-template-columns: 1fr; /* Stack columns on very small screens */
        text-align: center;
    }

    .footer-about,
    .footer-links,
    .footer-contact {
        align-items: center;
        text-align: center;
    }

    .footer-contact p {
        justify-content: center; /* Center icons and text */
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-form {
        width: 90%;
        margin: 15px auto 0; /* Center form */
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 15px;
    }
    .search-container select,
    .search-container input[type="text"] {
        font-size: 0.9rem;
    }
    .search-button {
        font-size: 0.9rem;
    }
    .teacher-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    .teacher-avatar {
        width: 100px;
        height: 100px;
    }
    .teacher-name {
        font-size: 1.3rem;
    }
    .teacher-price {
        font-size: 1rem;
    }
    .class-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    .profile-button,
    .message-button {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background: white;
  margin: 10% auto;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.close-popup {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input, 
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

button {
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}