/* --- Global Styles & Variables --- */
:root {
    --primary-purple: #6F42C1;
    --primary-gradient: linear-gradient(90deg, #8c52ff, #5c1fff); 
    --bg-light: #F7F8FC;
    --text-dark: #0D1C46;
    --text-light: #5A6482;
    --white: #ffffff;
    --border-light: #EAEBFF;
    --bg-dark: #121212;
    --card-bg: rgba(38, 38, 38, 0.5);
    --card-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--white);
    color: var(--text-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--bg-light);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}
nav.container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
nav ul li a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.3s ease; }
nav ul li a:hover { color: var(--primary-purple); }
.nav-buttons { display: flex; gap: 15px; }
.btn { padding: 10px 24px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; cursor: pointer; }
.btn-primary { background: var(--primary-gradient); color: var(--white); border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(111, 66, 193, 0.4); }
.btn-secondary { background-color: var(--white); color: var(--primary-purple); border: 1px solid var(--border-light); }
.btn-secondary:hover { background-color: #fdfdff; }

/* --- Hero Section Wrapper --- */
#hero-wrapper {
    background-color: var(--bg-light);
    padding-top: 60px;
}
#hero {
    display: flex;
    align-items: center;
    gap: 40px;
    min-height: 70vh;
}
.hero-content { flex: 1.2; }
.hero-title { font-size: 3.5rem; font-weight: 700; color: var(--text-dark); line-height: 1.2; margin-bottom: 20px; }
.hero-description { font-size: 1.1rem; line-height: 1.7; margin-bottom: 30px; max-width: 500px; }
.hero-actions { display: flex; align-items: center; gap: 20px; }
.learn-more { display: flex; align-items: center; gap: 8px; color: var(--text-dark); text-decoration: none; font-weight: 500; }
.learn-more:hover { color: var(--primary-purple); }
.learn-more svg { color: var(--primary-purple); }
.hero-image-container { flex: 1; position: relative; display: flex; justify-content: center; align-items: center; }
.hero-image { max-width: 100%; height: auto; z-index: 1; }
.stat-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}
.stat-card p { margin: 0; font-weight: 500; color: var(--text-dark); }
.stat-card strong { color: var(--primary-purple); }
.card-1 { top: 15%; left: -15%; }
.card-2 { bottom: 15%; right: -10%; animation-delay: -3s; }
.card-3 { bottom: 45%; left: -20%; animation-delay: -1.5s; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- Logo Bar --- */
#logo-bar {
    background: #fff; /* Simplified background */
    padding: 40px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.logo-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}
/* --- UPDATED --- Bigger and more visible logos */
.logo-container img {
    max-height: 40px; /* Increased size */
    opacity: 0.8; /* Increased visibility */
    filter: grayscale(100%);
    transition: opacity 0.3s, filter 0.3s;
}
.logo-container img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* --- Tutors Section --- */
#tutors {
    padding: 100px 0;
    background-color: var(--bg-dark);
    text-align: center;
}
#tutors h2 { font-size: 2.5rem; color: var(--white); margin-bottom: 10px; }
.section-subtitle { font-size: 1.1rem; color: #a0a0a0; margin-bottom: 60px; }
.tutor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    justify-content: center;
}

/* --- UPDATED --- Tutor Card Redesign */
.tutor-card {
    position: relative; /* New context for absolute positioning */
    width: 100%;
    max-width: 340px;
    height: 480px; /* Give cards a fixed height */
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to the bottom */
    cursor: pointer;
    background-color: #222; /* Fallback color */
}
.tutor-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.tutor-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Media is the background layer */
}
.tutor-media img,
.tutor-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
}
.tutor-media video { opacity: 0; }
.tutor-card:hover .tutor-media video { opacity: 1; }
.tutor-info {
    position: relative; /* Sits on top of the media */
    z-index: 2;
    padding: 24px;
    text-align: left;
    /* The gradient overlay for text readability */
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 20%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0) 100%);
}
.tutor-name {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.verified-icon { width: 22px; height: 22px; color: #3B82F6; }
.tutor-specialty {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 45px;
}
.tutor-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
}
.stat svg { width: 20px; height: 20px; color: #a0a0a0; }
.profile-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--bg-dark);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s, color 0.3s;
}
.profile-btn:hover { background-color: var(--white); }

/* --- Courses Section (Unchanged) --- */
#courses { padding: 100px 0; background: linear-gradient(135deg, #e8e2ff 0%, #d1c4e9 100%); }
.section-header { text-align: center; max-width: 800px; margin: 0 auto 60px auto; }
.section-header h2 { font-size: 2.5rem; color: var(--text-dark); margin-bottom: 15px; }
.section-header p { font-size: 1.1rem; color: var(--text-light); line-height: 1.7; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px; justify-content: center; }
.course-card { background: var(--white); border-radius: 24px; box-shadow: 0 10px 30px rgba(45, 30, 90, 0.08); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.course-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(45, 30, 90, 0.12); }
.course-image img { width: 100%; height: 220px; object-fit: cover; display: block; }
.course-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.course-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.course-category { background-color: #EAEBFF; color: var(--primary-purple); font-size: 0.8rem; font-weight: 600; padding: 6px 12px; border-radius: 15px; }
.course-rating .star-filled { color: #FFC107; }
.course-rating .star-empty { color: #d1d1d1; }
.course-title { font-size: 1.4rem; font-weight: 600; color: var(--text-dark); margin: 0 0 15px 0; flex-grow: 1; }
.course-stats { display: flex; gap: 20px; margin-bottom: 20px; color: var(--text-light); font-size: 0.9rem; }
.stat-item { display: flex; align-items: center; gap: 8px; }
.stat-item svg { width: 18px; height: 18px; color: var(--primary-purple); }
.course-divider { border-top: 1px dotted var(--border-light); margin-bottom: 20px; }
.course-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.course-price .price-main { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); }
.course-price .price-period { font-size: 1rem; color: var(--text-light); margin-left: 4px; }
.course-price .price-details { display: block; font-size: 0.8rem; color: #888; margin-top: 2px; }
.course-tutor { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; color: var(--text-light); }
.course-tutor img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 0 10px rgba(0,0,0,0.1); }

/* --- Become Teacher Section (Unchanged) --- */
#become-teacher { background-color: var(--bg-light); padding: 100px 0; overflow: hidden; }
.cta-container { display: flex; align-items: center; gap: 60px; }
.cta-content { flex: 1; }
.cta-title { font-size: 2.8rem; font-weight: 700; color: var(--text-dark); margin: 0 0 15px 0; line-height: 1.2; }
.cta-title span { color: var(--primary-purple); }
.cta-description { font-size: 1.05rem; line-height: 1.7; margin-bottom: 30px; max-width: 550px; }
.cta-content h3 { font-size: 1.4rem; font-weight: 600; color: var(--text-dark); margin-bottom: 20px; }
.cta-benefits { list-style: none; padding: 0; margin: 0 0 40px 0; column-count: 2; column-gap: 20px; }
.cta-benefits li { color: var(--text-light); margin-bottom: 12px; display: flex; align-items: baseline; font-weight: 500; }
.plus-icon { color: var(--primary-purple); font-weight: 700; font-size: 1.2rem; margin-right: 10px; }
.cta-button { padding: 15px 35px; font-size: 1rem; }
.cta-image-wrapper { flex: 0 0 450px; position: relative; display: flex; align-items: center; justify-content: center; height: 500px; }
.cta-image-wrapper img { max-width: 80%; height: auto; border-radius: 15px; position: relative; z-index: 2; }
.cta-image-wrapper::before { content: ''; position: absolute; width: 100%; height: 100%; background-color: #EAEBFF; border-radius: 999px 999px 40px 40px; transform: rotate(10deg); z-index: 1; }
.cta-image-wrapper::after { content: ''; position: absolute; width: 105%; height: 105%; border: 2px dashed var(--primary-purple); opacity: 0.5; border-radius: 999px 999px 50px 50px; transform: rotate(10deg); z-index: 0; }

/* --- UPDATED --- Testimonial Slider for Centering */
#testimonials {
    padding: 100px 0;
    background: linear-gradient(145deg, #e0d7ff 0%, #c8baff 100%);
    overflow: hidden;
}
.testimonial-slider-wrapper {
    position: relative;
    width: 100%;
}
.testimonial-track {
    display: flex;
    align-items: center;
    gap: 30px;
    /* The track itself will be positioned by JS */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.testimonial-card {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 30px;
    width: 350px;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transform: scale(0.9);
    opacity: 0.7;
    transition: transform 0.5s ease, opacity 0.5s ease;
    cursor: pointer;
}
.testimonial-card.active {
    transform: scale(1);
    opacity: 1;
    background-color: var(--white);
    box-shadow: 0 15px 40px rgba(45, 30, 90, 0.1);
}
.testimonial-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.student-image { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 3px solid var(--white); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.student-name { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--text-dark); }
.student-course { margin: 2px 0 5px 0; font-size: 0.9rem; color: var(--text-light); }
.student-quote { font-size: 0.95rem; line-height: 1.7; color: var(--text-light); margin: 0; font-style: italic; }
.testimonial-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(13, 28, 70, 0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}
.dot.active {
    background-color: var(--primary-purple);
    transform: scale(1.4);
}

/* --- NEW --- Redesigned Footer Section */
#page-footer {
    background-color: var(--bg-light);
    padding: 80px 0 0 0;
}
.subscribe-section {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 60px;
    border-radius: 30px;
    text-align: center;
    margin-bottom: 80px;
    box-shadow: 0 20px 40px rgba(111, 66, 193, 0.2);
}
.subscribe-section h3 {
    font-size: 2rem;
    margin: 0 0 15px 0;
}
.subscribe-section p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.7;
}
.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
}
.subscribe-form input {
    flex-grow: 1;
    border: none;
    background: none;
    padding: 10px 15px;
    font-size: 1rem;
    outline: none;
    color: var(--white);
}
.subscribe-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.subscribe-form button {
    flex-shrink: 0;
    padding: 12px 25px;
    background: var(--white);
    color: var(--primary-purple);
    border: none;
}
.subscribe-form button:hover {
    background: #f0f0f0;
}
.footer-links-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col .logo { margin-bottom: 15px; display: inline-block; }
.brand-col p { color: var(--text-light); line-height: 1.6; padding-right: 20px; }
.footer-col h4 { color: var(--text-dark); font-size: 1.1rem; margin: 0 0 15px 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text-light); text-decoration: none; transition: color 0.3s ease; }
.footer-col ul a:hover { color: var(--primary-purple); }
.footer-legal {
    border-top: 1px solid var(--border-light);
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
}
.social-icons { display: flex; gap: 15px; }
.social-icons a { color: var(--text-light); }
.social-icons a svg { width: 24px; height: 24px; fill: currentColor; transition: color 0.3s ease; }
.social-icons a:hover { color: var(--primary-purple); }

/* --- Modal Styles (Unchanged) --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(18, 18, 18, 0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal-content { background-color: #2a2a2e; color: #e0e0e0; padding: 30px; border-radius: 20px; width: 90%; max-width: 900px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); transform: scale(0.95); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; color: #a0a0a0; font-size: 2.5rem; cursor: pointer; line-height: 1; transition: color 0.3s ease; }
.modal-close:hover { color: var(--white); }
.modal-body { display: flex; gap: 30px; }
.modal-video-container { flex: 1; min-width: 300px; }
#modal-video { width: 100%; border-radius: 12px; }
.modal-info-container { flex: 2; }
#modal-tutor-name { font-size: 2.2rem; font-weight: 700; color: var(--white); margin: 0 0 10px 0; }
#modal-tutor-specialty { font-size: 1.1rem; color: #c5c5c5; margin-bottom: 25px; line-height: 1.6; }
.info-section { margin-bottom: 20px; }
.info-section h4 { font-size: 1.1rem; font-weight: 600; color: #a0a0a0; border-bottom: 1px solid #444; padding-bottom: 8px; margin: 0 0 15px 0; }
.info-section ul { list-style-type: none; padding-left: 0; margin: 0; }
.info-section li { padding-left: 20px; position: relative; margin-bottom: 8px; color: #e0e0e0; }
.info-section li::before { content: '✓'; position: absolute; left: 0; color: var(--primary-purple); font-weight: bold; }
.subjects-list { display: flex; flex-wrap: wrap; gap: 10px; }
.subject-tag { background-color: #3f3f46; color: #e0e0e0; padding: 5px 12px; border-radius: 15px; font-size: 0.9rem; }
#modal-resume-btn { margin-top: 20px; display: inline-block; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    #hero { flex-direction: column; text-align: center; }
    .hero-actions, .hero-description { justify-content: center; margin-left: auto; margin-right: auto; }
    .stat-card { display: none; }
    .cta-container { flex-direction: column; text-align: center; }
    .cta-content { order: 2; }
    .cta-image-wrapper { order: 1; margin-bottom: 40px; flex-basis: auto; height: 400px; width: 100%; }
    .cta-description { margin-left: auto; margin-right: auto; }
    .cta-benefits { text-align: left; max-width: 500px; margin-left: auto; margin-right: auto; }
    .footer-links-grid { grid-template-columns: 1fr 1fr; }
    .brand-col { grid-column: 1 / -1; text-align: center; padding-right: 0;}
}

@media (max-width: 768px) {
    header { position: static; }
    nav.container { flex-direction: column; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 15px 25px; }
    .hero-title { font-size: 2.5rem; }
    .modal-body { flex-direction: column; }
    .modal-content { padding: 20px; }
    #modal-tutor-name { font-size: 1.8rem; }
    .testimonial-card { width: 300px; }
    .subscribe-section { padding: 40px 20px; }
    .subscribe-form { flex-direction: column; gap: 10px; background: none; }
    .subscribe-form input { background: rgba(255,255,255,0.2); border-radius: 12px; padding: 15px; text-align: center; }
    .footer-legal { flex-direction: column; gap: 15px; }
}

@media (max-width: 576px) {
    .cta-benefits { column-count: 1; }
    .cta-title { font-size: 2.2rem; }
    .footer-links-grid { grid-template-columns: 1fr; text-align: center; }
}
/* --- NEW --- Course Modal Styles --- */
.course-card {
    cursor: pointer;
}

.modal-content.course-modal-content {
    background-color: var(--white);
    color: var(--text-dark);
    max-width: 850px;
    padding: 0; /* Remove padding to allow image to be flush */
}

.course-modal-content .modal-body {
    gap: 0;
    align-items: stretch;
}

.modal-course-image-container {
    flex: 1;
    position: relative;
    min-width: 300px;
}

#modal-course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 0 0 20px;
}

#modal-course-category {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.9rem;
}

.course-modal-content .modal-info-container {
    flex: 1.2;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}

#modal-course-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.modal-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-tutor-info,
.modal-price-info {
    margin-bottom: 25px;
}

.modal-tutor-info h4,
.modal-price-info h4 {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    margin: 0 0 10px 0;
}

#modal-course-tutor img {
    border: 3px solid var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.modal-actions {
    margin-top: auto; /* Pushes buttons to the bottom */
    display: flex;
    gap: 15px;
}

.modal-actions .btn {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-size: 1rem;
}

/* Responsive Course Modal */
@media (max-width: 768px) {
    .course-modal-content .modal-body {
        flex-direction: column;
    }
    #modal-course-image {
        border-radius: 20px 20px 0 0;
        max-height: 250px;
    }
    .course-modal-content .modal-info-container {
        padding: 25px;
    }
    #modal-course-title {
        font-size: 1.6rem;
    }
    .modal-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
/* --- NEW --- Video Modal Styles --- */
.modal-content.video-modal-content {
    background: none;
    width: 90%;
    max-width: 1100px;
    box-shadow: none;
    padding: 0;
}
.video-modal-content .modal-close {
    color: var(--white);
    opacity: 0.8;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    font-size: 3rem;
    top: -10px;
    right: -10px;
}
.video-modal-content video {
    width: 100%;
    border-radius: 15px;
    display: block;
}

/* --- NEW --- Enroll Form Modal Styles --- */
.modal-content.enroll-modal-content {
    background-color: var(--white);
    color: var(--text-dark);
    max-width: 750px;
    padding: 40px;
}
.enroll-header {
    text-align: center;
    margin-bottom: 30px;
}
.enroll-header h3 {
    font-size: 1.8rem;
    margin: 0 0 10px 0;
}
.enroll-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 10px;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.2);
}

.subject-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
}
.subject-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}
.subject-checkbox:hover {
    background-color: #e8e2ff;
}
.subject-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-purple);
}

.btn-full-width {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 15px;
}
.form-footer-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 20px;
}

/* Responsive Enroll Form */
@media (max-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
/* =================================================================== */
/* --- TUTORS PAGE & PROFILE MODAL STYLES (CONSOLIDATED) --- */
/* =================================================================== */

/* --- Main Page Layout --- */
#tutor-browser-page {
    background-color: var(--bg-light);
    padding: 60px 0 80px 0;
}

.page-title-in-nav {
    font-size: 1.8rem;
}

/* --- Filter Controls --- */
.tutor-filters {
    background-color: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(45, 30, 90, 0.05);
    margin-bottom: 40px;
}
.tutor-filters h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0 0 25px 0;
}
.filter-group {
    margin-bottom: 20px;
}
.filter-group:last-child {
    margin-bottom: 0;
}
.filter-group h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    margin: 0 0 15px 0;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.filter-buttons button {
    background-color: #f0f2f5;
    color: var(--text-light);
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: 8px; /* Rectangular look */
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-buttons button:hover {
    background-color: #e8e2ff;
    color: var(--primary-purple);
}
.filter-buttons button.active {
    background-color: var(--primary-purple);
    color: var(--white);
    border-color: var(--primary-purple);
}

/* --- Tutor Tile Grid on tutors.php --- */
.tutor-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}
.tutor-tile {
    position: relative;
    aspect-ratio: 1 / 1.25; /* Slightly taller than square */
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block; /* For the filter logic */
}
.tutor-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(45, 30, 90, 0.15);
}
.tutor-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.tutor-tile:hover img {
    transform: scale(1.05);
}
.tile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 15px;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    text-align: left;
}
.tile-overlay h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}
.tile-overlay p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

/* --- REVISED Tutor Profile Modal (Image Version) --- */
.tutor-profile-modal-content {
    background-color: var(--white);
    color: var(--text-dark);
    max-width: 900px;
    width: 90%;
    padding: 0; /* No padding on the main content block */
}
.tutor-profile-modal-content .modal-body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    width: 100%;
}

/* Left Panel (Image) */
.modal-media-panel {
    flex: 0 0 40%;
    background-color: #f0f2f5;
}
#profile-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px 0 0 20px;
}

/* Right Panel (Details) */
.modal-details-panel {
    flex-grow: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Prevents modal from being too tall */
    overflow-y: auto;
}
.details-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}
.details-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}
.details-body {
    flex-grow: 1;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border-light);
}
.details-body .info-section {
    margin-bottom: 25px;
}
.details-body .info-section h4 {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 15px;
}
.details-body .subjects-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.details-body .subjects-tags-list .subject-tag {
    background-color: #e8e2ff;
    color: var(--primary-purple);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
}
.details-body .info-section ul {
    list-style-type: none;
    padding-left: 0;
}
.details-body .info-section li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
}
.details-body .info-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-purple);
}

.details-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

/* Responsive for the Tutor Profile Modal */
@media (max-width: 800px) {
    .tutor-profile-modal-content .modal-body {
        flex-direction: column;
    }
    #profile-modal-image {
        max-height: 300px;
        border-radius: 20px 20px 0 0;
    }
    .modal-details-panel {
        padding: 1.5rem;
        max-height: none;
    }
}
/* =================================================================== */
/* --- OFFERS PAGE STYLES (REDESIGNED) --- */
/* =================================================================== */
.offers-page-header {
    background: linear-gradient(135deg, #e8e2ff 0%, #d1c4e9 100%);
    padding: 80px 0;
    text-align: center;
}
.offers-page-header h1 {
    font-size: 2.8rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}
.offers-page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}
#offers-page-content {
    padding: 80px 0;
    background-color: var(--bg-light);
}

/* --- Hero Offer --- */
.offer-hero-card {
    display: flex;
    background-color: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(45, 30, 90, 0.1);
    margin-bottom: 60px;
    min-height: 400px;
}
.offer-hero-img-container {
    flex: 1 1 55%;
}
.offer-hero-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.offer-hero-content {
    flex: 1 1 45%;
    padding: 40px;
    display: flex;
    flex-direction: column;
}
.hero-badge {
    background-color: var(--primary-purple);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
    align-self: flex-start;
}
.offer-hero-content h2 {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}
.offer-hero-content p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.05rem;
    flex-grow: 1;
}
.hero-offer-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}
.hero-offer-footer .btn {
    padding: 15px 35px;
}

/* --- Regular Offers Grid --- */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}
.offer-card {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(45, 30, 90, 0.05);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.offer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(45, 30, 90, 0.1);
}
.offer-card-img-container {
    position: relative;
    height: 200px;
}
.offer-card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.offer-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(5px);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}
.offer-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.offer-card-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}
.offer-card-content > p {
    color: var(--text-light);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 25px;
}
.offer-progress {
    margin-bottom: 25px;
}
.progress-bar-container {
    height: 8px;
    background-color: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}
.progress-text {
    font-size: 0.85rem;
    color: var(--text-light);
}
.progress-text strong {
    color: var(--text-dark);
}
.offer-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}
.offer-expiry {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}
.offer-expiry svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}
.no-offers-found {
    font-size: 1.2rem;
    color: var(--text-light);
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px 0;
}

/* Responsive Offers */
@media (max-width: 992px) {
    .offer-hero-card {
        flex-direction: column;
        min-height: auto;
    }
    .offer-hero-img-container {
        height: 300px;
    }
}
@media (max-width: 576px) {
    .hero-offer-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
/* =================================================================== */
/* --- CONTACT PAGE STYLES --- */
/* =================================================================== */
.contact-page-header {
    background: var(--bg-light);
    padding: 80px 0;
    text-align: center;
}
.contact-page-header h1 {
    font-size: 2.8rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}
.contact-page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}
#contact-page-content {
    padding: 80px 0;
    background-color: var(--white);
}
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 40px rgba(45, 30, 90, 0.05);
}
.form-label-main {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 25px;
}
.contact-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}
.contact-type-selector input[type="radio"] {
    display: none; /* Hide the default radio button */
}
.contact-type-card {
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.contact-type-card svg {
    width: 48px;
    height: 48px;
    color: var(--primary-purple);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}
.contact-type-card span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}
.contact-type-selector input[type="radio"]:hover + .contact-type-card {
    border-color: var(--primary-purple);
    transform: translateY(-5px);
}
.contact-type-selector input[type="radio"]:checked + .contact-type-card {
    border-color: var(--primary-purple);
    background-color: #f8f7ff;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.2);
    transform: translateY(-5px);
}
.contact-type-selector input[type="radio"]:checked + .contact-type-card svg {
    transform: scale(1.1);
}
#institution-name-group {
    grid-column: 1 / -1; /* Make it full width by default */
}
/* =================================================================== */
/* --- COURSES PAGE STYLES --- */
/* =================================================================== */
.courses-page-header {
    background: var(--bg-light);
    padding: 80px 0;
    text-align: center;
}
.courses-page-header h1 {
    font-size: 2.8rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}
.courses-page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}
#courses-page-content {
    padding: 80px 0;
    background-color: #fcfdff;
}

/* --- Filter Bar Styles --- */
.course-filters {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}
.course-filters .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background-color: var(--white);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: 0 5px 15px rgba(45, 30, 90, 0.03);
}
.course-filters .filter-buttons button {
    background-color: transparent;
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.course-filters .filter-buttons button:hover {
    color: var(--primary-purple);
}
.course-filters .filter-buttons button.active {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.2);
}

/* --- Course Card Grid --- */
.course-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}
.no-courses-found {
    font-size: 1.2rem;
    color: var(--text-light);
    text-align: center;
    padding: 40px 0;
    grid-column: 1 / -1;
}

/* --- Re-styling the .course-card for this page specifically --- */
.course-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(45, 30, 90, 0.05);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(45, 30, 90, 0.1);
}
.course-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.course-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* This is key for equal height cards */
}
.course-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.course-card-category {
    background-color: #EAEBFF;
    color: var(--primary-purple);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 15px;
}
.course-card-rating .star-filled {
    color: #FFC107;
}
.course-card-rating .star-empty {
    color: #d1d1d1;
}
.course-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    line-height: 1.3;
    flex-grow: 1; /* Pushes footer down */
}
.course-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}
.course-card-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.course-card-stats .stat-item svg {
    width: 18px;
    height: 18px;
    color: var(--primary-purple);
}
.course-card-divider {
    border-top: 1px dashed var(--border-light);
    margin-bottom: 20px;
}
.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.course-price .price-main {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}
.course-price .price-period {
    font-size: 1rem;
    color: var(--text-light);
    margin-left: 4px;
}
.course-tutor {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}
.course-tutor img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* --- Course Detail Modal Styles --- */
.course-card {
    cursor: pointer;
}
.course-detail-modal-content {
    background-color: var(--white);
    color: var(--text-dark);
    max-width: 850px;
    padding: 0; /* Remove padding to allow image to be flush */
}
.course-detail-modal-content .modal-body {
    display: flex;
    gap: 0;
    align-items: stretch;
}
.modal-course-image-container {
    flex: 1;
    position: relative;
    min-width: 300px;
    background-color: var(--bg-light);
}
#modal-course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 0 0 20px;
}
#modal-course-category {
    position: absolute;
    top: 20px;
    left: 20px;
}
.modal-course-info-container {
    flex: 1.2;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}
#modal-course-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}
.modal-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}
.modal-info-section {
    margin-bottom: 25px;
}
.modal-info-section h4 {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    margin: 0 0 10px 0;
}
#modal-course-description {
    line-height: 1.7;
}
.modal-actions {
    margin-top: auto; /* Pushes buttons to the bottom */
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.modal-actions .btn {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 1rem;
}

/* Responsive Course Modal */
@media (max-width: 768px) {
    .course-detail-modal-content .modal-body {
        flex-direction: column;
    }
    #modal-course-image {
        border-radius: 20px 20px 0 0;
        max-height: 250px;
    }
    .modal-course-info-container {
        padding: 25px;
    }
    #modal-course-title {
        font-size: 1.6rem;
    }
    .modal-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
