/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
    color: #333;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background-color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.8em;
    color: #0088ff;
    text-decoration: none;
}

/* Header Section */
.header-section {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-section h1 {
    font-size: 2.5em;
    color: #0088ff;
    margin-bottom: 10px;
}

.header-section .subtitle {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 20px;
}

.header-section .note {
    background-color: #fffbe6;
    border: 1px solid #ffeb3b;
    border-radius: 8px;
    padding: 15px;
    display: inline-block;
    max-width: 600px;
    margin-bottom: 25px;
    color: #666;
}

.header-cta-button {
    display: inline-block;
    background-color: #0088ff;
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(0, 136, 255, 0.25);
}

.header-cta-button:hover {
    background-color: #0077e6;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 136, 255, 0.35);
}

/* Main Content */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.filter-controls input,
.filter-controls select,
.filter-controls button {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.filter-controls input {
    flex: 2;
    min-width: 200px;
}

.filter-controls select {
    flex: 1;
    min-width: 150px;
}

.filter-controls button {
    background-color: #0088ff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.filter-controls button:hover {
    background-color: #0077e6;
}


/* Teachers Grid Section */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.teacher-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center; /* This will center the content */
    max-width: 300px;
    margin: 0 auto;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.teacher-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0088ff;
    margin-bottom: 15px;
}

.teacher-card h3 {
    margin: 10px 0 5px;
    font-size: 1.3em;
    color: #333;
}

.teacher-card .subject-city {
    color: #777;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.teacher-card .description {
    font-size: 0.95em;
    color: #555;
    min-height: 60px;
    flex-grow: 1;
    margin-bottom: 15px;
}

.teacher-card .contact-button {
    display: inline-block;
    margin-top: auto;
    padding: 10px 25px;
    background-color: #ffb703;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}
.teacher-card .button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
}

.teacher-card .contact-button,
.teacher-card .review-button {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}

.teacher-card .contact-button {
    background-color: #ffb703;
    color: #333;
}

.teacher-card .review-button {
    background-color: #0088ff;
    color: white;
}

.teacher-card .contact-button:hover {
    background-color: #fca311;
    transform: scale(1.05);
}

.teacher-card .review-button:hover {
    background-color: #0077e6;
    transform: scale(1.05);
}

.teacher-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #0088ff;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f0f8ff;
    color: #0056b3;
    font-weight: bold;
    text-align: center;
    font-size: 1em;
}

.teacher-avatar-placeholder span {
    line-height: 1.2;
}

.teacher-card .contact-button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.no-results-message {
    text-align: center;
    font-size: 1.2em;
    color: #888;
    padding: 40px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #888;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0088ff;
}

/* Star Rating */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin-bottom: 20px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 2.5em;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffb703;
}

.modal-content textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1em;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.modal-content button[type="submit"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #0088ff;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-content button[type="submit"]:hover {
    background-color: #0077e6;
}

.thank-you-message {
    text-align: center;
    font-size: 1.3em;
    color: #28a745;
    padding: 20px;
}

.thank-you-message.hidden {
    display: none;
}

/* Contact Modal Styles */
.contact-info {
    margin: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #5BC2E7;
}

.contact-icon {
    font-size: 1.5em;
    margin-right: 15px;
    min-width: 30px;
}

.contact-details {
    flex-grow: 1;
}

.contact-label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.contact-value {
    display: block;
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
    word-break: break-all;
}

.contact-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.copy-button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #5BC2E7;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.copy-button:hover {
    background-color: #4a9bc4;
    transform: translateY(-2px);
}

.copy-button:active {
    transform: translateY(0);
}

.copy-button.copied {
    background-color: #28a745;
}

.copy-button.copied::after {
    content: " ✓";
}

/* Teacher Join Section */
.teacher-join-section {
    text-align: center;
    padding: 60px 20px;
    margin-top: 40px;
    background-color: #eaf6ff;
    border-radius: 16px;
    border: 1px solid #cce7ff;
}

.join-header h2 {
    font-size: 2.2em;
    color: #0088ff;
    margin-bottom: 15px;
}

.join-header p {
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.1em;
}

.teacher-join-section .pricing-table {
    margin-bottom: 40px;
}

.teacher-join-section .pricing-tier {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    border: 1px solid #ddd;
}

.teacher-join-section .pricing-tier.featured {
    border: 2px solid #0088ff;
    position: relative;
    overflow: hidden;
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background-color: #ffb703;
    color: #333;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-size: 0.9em;
    font-weight: bold;
}

.join-footer .cta-button {
    padding: 15px 40px;
    font-size: 1.2em;
    transform: scale(1.05);
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 50px 20px;
    margin-top: 40px;
    background-color: #eaf6ff;
    border-radius: 12px;
}

.cta-section h2 {
    font-size: 2em;
    color: #0088ff;
    margin-bottom: 15px;
}

.cta-section p {
    max-width: 600px;
    margin: 0 auto 25px;
}

.cta-button {
    display: inline-block;
    padding: 15px 35px;
    background-color: #0088ff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: #0077e6;
    transform: scale(1.05);
}

/* Pricing Section */
.pricing-section {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
}

.pricing-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
}

.pricing-table {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pricing-tier {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 30px;
    width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.pricing-tier:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.pricing-tier.featured {
    border: 2px solid #ffb703;
    transform: scale(1.05);
}

.pricing-tier h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
    flex-grow: 1; /* This will push the price down */
}

.features-list li {
    margin-bottom: 12px;
    color: #444;
    font-size: 0.95em;
}

.pricing-tier .price {
    font-size: 1.8em;
    font-weight: bold;
    color: #0088ff;
    margin-top: auto; /* Changed from 20px to auto */
}


/* Responsive Layout */
@media (max-width: 768px) {
    .header-section h1 {
        font-size: 2em;
    }

    .filter-controls {
        flex-direction: column;
    }
    
    .teachers-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    main {
        padding: 10px;
    }
    .teachers-grid {
        grid-template-columns: 1fr;
    }
}
