/* 89th Parallel LMS - Modern Design System */

:root {
    --deep-purple: #2E2157;
    --crimson-red: #C7364F;
    --teal-blue: #2F5473;
    --lavender: #A99DC5;
    --off-white: #F6F2EE;
    --light-lavender: #E8E4F0;
    --dark-purple: #1A1535;
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --error-red: #dc3545;
    --pure-white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif', serif;
    background-color: var(--light-gray);
    color: var(--deep-purple);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Header Styles */
header {
    background: var(--pure-white);
    color: var(--deep-purple);
    padding: 0 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: space-between;
}
/* Hide header on scroll class */
.header-hide {
    transform: translateY(-100%);
    transition: transform 0.25s ease-in-out;
}

.logo-image {
    height: 100px;
    width: auto;
    margin: 0;
    display: block;
    /* Removed the filter to show the logo in its original colors */
}

header .logo h1 {
    margin: 0;
    font-size: 2.5rem;
    color: var(--deep-purple);
}

header .logo .tagline {
    margin: 0;
    font-size: 0.9rem;
    color: var(--teal-blue);
    font-family: 'Recoleta', sans-serif;
    font-weight: 600;
}

header nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Mobile menu toggle button (hidden on desktop) */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--deep-purple);
}

/* Full-screen mobile overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--pure-white);
    z-index: 2000;
    display: none;
    padding: 2rem;
}

.mobile-menu-overlay.open { display: flex; flex-direction: column; }

.mobile-menu-close {
    align-self: flex-end;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--deep-purple);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1.5rem;
}

.mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.mobile-menu-list a {
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
}

header nav ul li a {
    color: var(--deep-purple);
    padding: 0.25rem 0.9rem;
    line-height: 1;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

header nav ul li a:hover {
    background-color: rgba(46, 33, 87, 0.1);
    color: var(--crimson-red);
}

header nav ul li a.register-btn {
    background: linear-gradient(135deg, var(--crimson-red) 0%, #d6455f 100%);
    color: var(--off-white);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-family: 'Recoleta', sans-serif;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(199, 54, 79, 0.4);
}

header nav ul li a.register-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(199, 54, 79, 0.6);
}

/* Header layout: logo block on the left, nav on the right */
header .logo {
    order: 0;
    margin-left: 0;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center; /* center tagline directly under logo */
    text-align: center;
}

header nav {
    order: 0;
    margin-left: auto;
}

/* Messages */
.messages {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

.message {
    background: var(--pure-white);
    border-left: 4px solid var(--teal-blue);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

.message-success {
    border-left-color: var(--success-green);
}

.message-error {
    border-left-color: var(--error-red);
}

.message-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    color: var(--deep-purple);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem;
    background-color: transparent;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--deep-purple);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--teal-blue);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    background: var(--pure-white);
    color: var(--deep-purple);
    text-align: center;
    padding: 8rem 2rem;
    min-height: 80vh;
    border-radius: 12px;
    margin-bottom: 3rem;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.52);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

.hero-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.hero-logo-image {
    height: 180px;
    width: auto;
    margin: 0 auto;
    display: block;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: var(--deep-purple);
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--teal-blue);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-register {
    background: linear-gradient(135deg, var(--crimson-red) 0%, #d6455f 100%);
    color: var(--pure-white);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-family: 'Recoleta', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(199, 54, 79, 0.4);
    transition: all 0.3s ease;
}

.hero-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(199, 54, 79, 0.6);
}

.secondary-btn {
    background: transparent;
    color: var(--deep-purple);
    padding: 1rem 2rem;
    border: 2px solid var(--deep-purple);
    border-radius: 30px;
    font-family: 'Recoleta', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--deep-purple);
    color: var(--pure-white);
    transform: translateY(-3px);
}

/* Ensure secondary button is visible on dark CTA background */
.about-cta .secondary-btn {
    color: var(--pure-white);
    border-color: var(--pure-white);
}

.about-cta .secondary-btn:hover {
    background: var(--pure-white);
    color: var(--deep-purple);
}

/* Global register button (crimson red) */
.register-btn {
    background: linear-gradient(135deg, var(--crimson-red) 0%, #d6455f 100%);
    color: var(--pure-white);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-family: 'Recoleta', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(199, 54, 79, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid var(--crimson-red);
}

.register-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(199, 54, 79, 0.6);
}

/* Who We Are Video Section */
.who-we-are-section {
    margin-bottom: 5rem;
    padding: 3rem 0;
}

.video-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.video-container {
    text-align: center;
    position: relative;
}
/* Loader overlay */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--pure-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    transition: opacity 400ms ease, visibility 400ms ease;
}
.loader-overlay.hide { opacity: 0; visibility: hidden; }
.loader-logo { height: 128px; width: auto; animation: pulseFade 1.6s ease-in-out infinite; }
@keyframes pulseFade {
    0% { opacity: 0.2; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.2; transform: scale(0.98); }
}

/* Minimal reveal-on-scroll animations */
.reveal-on-scroll { opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal-on-scroll.in-view { opacity: 1; transform: translateY(0); }

.video-unmute-overlay {
    position: absolute;
    inset: auto 16px 16px auto;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Recoleta', sans-serif;
    cursor: pointer;
}

.video-caption { display: none; }

.about-video {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-placeholder {
    width: 100%;
    max-width: 480px;
    height: 260px;
    background: var(--light-lavender);
    border: 2px dashed var(--teal-blue);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--teal-blue);
    margin: 0 auto;
}

.video-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--crimson-red);
}

.video-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--deep-purple);
}

.video-placeholder small {
    color: var(--teal-blue);
    text-align: center;
}

.video-content h3 {
    color: var(--deep-purple);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.video-content p {
    color: var(--teal-blue);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Teaching Section */
.teaching-section {
    margin-bottom: 5rem;
    padding: 3rem 0;
}

.teaching-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.teaching-image {
    text-align: center;
}

.teaching-photo {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.teaching-placeholder {
    width: 100%;
    max-width: 500px;
    height: 300px;
    background: var(--light-lavender);
    border: 2px dashed var(--teal-blue);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--teal-blue);
    margin: 0 auto;
}

.teaching-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--crimson-red);
}

.teaching-placeholder p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--deep-purple);
}

.teaching-placeholder small {
    color: var(--teal-blue);
    text-align: center;
}

.teaching-text h3 {
    color: var(--deep-purple);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.teaching-text p {
    color: var(--teal-blue);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Featured Sections */
.featured-section {
    margin-bottom: 5rem;
    padding: 2rem 0;
}

/* Testimonials Section */
.testimonials-section {
    margin-bottom: 5rem;
    padding: 3rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    color: var(--crimson-red);
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: serif;
}

.testimonial-content p {
    font-style: italic;
    color: var(--deep-purple);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

.testimonial-card:nth-child(odd) {
    transform: rotate(-1deg);
}

.testimonial-card:nth-child(even) {
    transform: rotate(1deg);
}

.testimonial-card:hover {
    transform: rotate(0deg) scale(1.02);
    transition: all 0.3s ease;
}

.testimonial-author {
    border-top: 1px solid var(--light-lavender);
    padding-top: 1rem;
}

.testimonial-author strong {
    color: var(--teal-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.testimonial-date {
    color: var(--lavender);
    font-size: 0.9rem;
}

/* Success Stories */
.success-stories {
    margin-bottom: 5rem;
    padding: 3rem 0;
}

.stories-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.story-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--pure-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.story-icon {
    font-size: 2.5rem;
    color: var(--crimson-red);
    margin-top: 0.5rem;
}

.story-text h3 {
    color: var(--deep-purple);
    margin-bottom: 1rem;
}

.story-text p {
    color: var(--teal-blue);
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 5rem;
    padding: 3rem 0;
}

.faq-content {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.faq-item h3 {
    color: var(--deep-purple);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.faq-item p {
    color: var(--teal-blue);
    line-height: 1.7;
}

/* Team Section */
.team-section {
    margin-bottom: 5rem;
    padding: 3rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.member-info h3 {
    color: var(--deep-purple);
    margin-bottom: 0.5rem;
}

.member-role {
    color: var(--crimson-red);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.member-story {
    color: var(--teal-blue);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-style: italic;
}

.member-fact {
    color: var(--lavender);
    font-size: 0.9rem;
    padding: 1rem;
    background: var(--light-lavender);
    border-radius: 8px;
}

/* Values Section */
.values-section {
    margin-bottom: 5rem;
    padding: 3rem 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-item {
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    text-align: center;
}

.value-item h3 {
    color: var(--deep-purple);
    margin-bottom: 1rem;
}

.value-item p {
    color: var(--teal-blue);
    line-height: 1.6;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--deep-purple);
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--crimson-red), var(--teal-blue));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--teal-blue);
    max-width: 500px;
    margin: 0 auto;
}

/* Teacher Cards */
.teacher-grid, .teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* slightly narrower cards */
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Break up perfect symmetry */
.teacher-grid .teacher-card:nth-child(odd) {
    transform: translateY(-10px);
}

.teacher-grid .teacher-card:nth-child(even) {
    transform: translateY(10px);
}

.course-grid .course-card:nth-child(odd) {
    transform: translateX(-15px);
}

.course-grid .course-card:nth-child(even) {
    transform: translateX(15px);
}

.teacher-card {
    background: var(--pure-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid var(--border-color);
    width: 92%; /* make card a bit narrower than its column */
    margin: 0 auto;
}

.teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 40px rgba(46, 33, 87, 0.16);
}

.course-card:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 0 15px 35px rgba(46, 33, 87, 0.2);
}

.teacher-header {
    display: flex;
    flex-direction: row; /* image left, name right */
    align-items: center;
    justify-content: flex-start; /* shift content slightly left */
    gap: 60px; /* spacing between image and text */
    padding: 16px;
    padding-left: 28px; /* extra left padding for visual alignment */
    background: linear-gradient(135deg, var(--teal-blue), var(--deep-purple));
}

@media (max-width: 480px) {
    .teacher-header {
        justify-content: center; /* keep centered on very small screens */
        padding-left: 16px;
        gap: 24px;
    }
}

.teacher-avatar-sq { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; background: var(--pure-white); border-radius: 12px; box-shadow: 0 6px 14px rgba(0,0,0,0.15); }
.teacher-avatar-sq .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.teacher-avatar-sq .avatar-fallback { color: var(--teal-blue); font-size: 2rem; }

.teacher-meta { color: var(--pure-white); text-align: left; }
.teacher-name { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; letter-spacing: 0.5px; font-weight: 400; margin: 0; }

.teacher-body { padding: 16px; }

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teacher-card:hover .teacher-image img {
    transform: scale(1.05);
}

/* Compact blue card inside teacher-image */
.teacher-card-compact { position: absolute; inset: 8px; display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 12px; padding: 12px; background: linear-gradient(135deg, var(--teal-blue), var(--deep-purple)); border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,0.18); }

.teacher-card-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.teacher-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 4px solid var(--pure-white); /* crisp white ring */
    border-radius: 50%; /* circular avatar */
    background: var(--pure-white);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.teacher-thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--teal-blue); }

.teacher-card-right { display: flex; align-items: center; justify-content: flex-start; padding: 0 8px; }
.teacher-card-name { color: var(--pure-white); font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.6px; font-weight: 400; font-size: 1.5rem; text-align: left; }

.teacher-placeholder {
    background: linear-gradient(135deg, var(--lavender) 0%, var(--light-lavender) 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--deep-purple);
}

.featured-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--crimson-red);
    color: var(--pure-white);
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 1rem;
}

.teacher-info {
    padding: 1.5rem;
}

.teacher-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--deep-purple);
}

.teacher-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-lavender);
}

.teacher-details p {
    margin-bottom: 0.75rem;
    color: var(--teal-blue);
    font-size: 0.95rem;
    line-height: 1.5;
}

.teacher-details i {
    color: var(--crimson-red);
    margin-right: 0.5rem;
    width: 16px;
}

.teacher-description {
    color: var(--teal-blue);
    line-height: 1.6;
}

.featured-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--crimson-red) 0%, #d6455f 100%);
    color: var(--pure-white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Course Cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.course-card {
    background: var(--pure-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(46, 33, 87, 0.2);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.course-header h3 {
    font-size: 1.5rem;
    color: var(--deep-purple);
}

.course-details p {
    margin-bottom: 0.75rem;
    color: var(--teal-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-lavender);
    color: var(--deep-purple);
    font-style: italic;
}

.course-highlights {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-lavender);
}

.course-highlights p {
    margin-bottom: 0.75rem;
    color: var(--teal-blue);
    font-size: 0.95rem;
    line-height: 1.5;
}

.course-highlights i {
    color: var(--crimson-red);
    margin-right: 0.5rem;
    width: 16px;
}

/* Courses Table */
.courses-container {
    background: var(--pure-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.courses-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.courses-table th {
    background: linear-gradient(135deg, var(--teal-blue) 0%, var(--deep-purple) 100%);
    color: var(--pure-white);
    padding: 0.9rem 1rem;
    text-align: left;
    font-weight: 700;
    border-radius: 6px;
}

.courses-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-lavender);
    vertical-align: top;
}

/* Improve desktop courses table readability */
.courses-table thead th { position: sticky; top: 0; z-index: 1; }
.courses-table thead th + th { border-left: 1px solid rgba(255,255,255,0.25); }
.courses-table tbody tr:nth-child(odd) { background: rgba(46, 33, 87, 0.02); }
.courses-table tbody tr:hover { background: rgba(46, 33, 87, 0.06); }
.courses-table-wrapper { overflow-x: auto; }

/* Combine header boxes visually by rounding ends only */
.courses-table thead tr th:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.courses-table thead tr th:not(:first-child):not(:last-child) { border-radius: 0; }
.courses-table thead tr th:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* Columns */
.col-teacher { font-weight: 600; }
.col-level { color: var(--teal-blue); }

.courses-table tr:hover {
    background-color: var(--light-lavender);
}

.featured-row {
    background-color: rgba(199, 54, 79, 0.05);
}

.course-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.course-level-beginner {
    background-color: var(--success-green);
    color: var(--pure-white);
}

.course-level-intermediate {
    background-color: var(--warning-orange);
    color: var(--deep-purple);
}

.course-level-advanced {
    background-color: var(--crimson-red);
    color: var(--pure-white);
}

.no-description {
    color: var(--lavender);
    font-style: italic;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--deep-purple);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-lavender);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal-blue);
    box-shadow: 0 0 0 3px rgba(47, 84, 115, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, var(--crimson-red) 0%, #d6455f 100%);
    color: var(--pure-white);
    padding: 1rem 2rem;
    border: 2px solid var(--crimson-red);
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Recoleta', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 54, 79, 0.4);
}

.error-message {
    color: var(--error-red);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info,
.register-info {
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.contact-form-container,
.register-form-container {
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.contact-info h2,
.contact-form-container h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--deep-purple);
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-lavender);
    border-radius: 10px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--teal-blue);
    margin-top: 0.25rem;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: var(--deep-purple);
}

.contact-item p {
    color: var(--teal-blue);
    line-height: 1.5;
}

/* Register Page */
.register-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.register-info h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--deep-purple);
}

.benefits-list {
    margin-bottom: 2rem;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--light-lavender);
    border-radius: 8px;
}

.benefits-list i {
    color: var(--success-green);
    font-size: 1.2rem;
}

.register-note {
    background: linear-gradient(135deg, var(--teal-blue) 0%, var(--deep-purple) 100%);
    color: var(--pure-white);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.register-note i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

/* About Page */
.about-content {
    margin-bottom: 3rem;
}

.about-section {
    display: grid;
    /* Default: Text is in the first (wide) column, image in the second (narrow) */
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--pure-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.about-section.reverse {
    /* Reverse: Image will be in the first (narrow) column, text in the second (wide) */
    grid-template-columns: 1fr 2fr;
}

.about-section.reverse .about-text {
    /* Explicitly place the text div in the second column */
    grid-column: 2;
}

.about-section.reverse .about-image {
    /* Explicitly place the image div in the first column and first row */
    grid-column: 1;
    grid-row: 1; /* Ensures it stays on the same line as the text */
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--deep-purple);
}

.about-text p {
    color: var(--teal-blue);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: var(--teal-blue);
}

.features-list i {
    color: var(--success-green);
}

.about-image {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Ensure image column is vertically centered even in reverse layout */
.about-section .about-image,
.about-section.reverse .about-image {
    align-self: center;
}

.about-photo {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.about-photo:hover {
    transform: scale(1.05);
}

.about-placeholder {
    width: 100%;
    max-width: 300px;
    height: 200px;
    background: var(--light-lavender);
    border: 2px dashed var(--teal-blue);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--teal-blue);
}

.about-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--crimson-red);
}

.about-placeholder p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--deep-purple);
}

.about-placeholder small {
    color: var(--teal-blue);
    text-align: center;
}

.about-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--deep-purple) 0%, var(--teal-blue) 100%);
    color: var(--pure-white);
    padding: 3rem;
    border-radius: 20px;
}

.about-cta h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--light-lavender);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* CTA Sections */
.cta-section {
    background: var(--pure-white);
    color: var(--deep-purple);
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--teal-blue);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-note {
    font-size: 1rem;
    color: var(--light-lavender);
    font-style: italic;
    max-width: 500px;
    margin: 0 auto;
}

.courses-cta {
    text-align: center;
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Mobile-only courses accordion */
.courses-mobile { display: none; }

.course-accordion {
    background: var(--pure-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 1rem;
    overflow: hidden;
}

.course-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
}

.course-accordion summary::-webkit-details-marker { display: none; }

.course-accordion .summary-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.course-accordion .summary-teacher { font-weight: 700; }
.course-accordion .summary-level { color: var(--teal-blue); }

.course-accordion .accordion-body {
    padding: 0 1.25rem 1rem;
}

.course-accordion .meta { color: var(--teal-blue); margin-bottom: 0.5rem; }

@media (max-width: 768px) {
    /* Hide table, show accordion on mobile */
    .courses-table-wrapper { display: none; }
    .courses-mobile { display: block; }
    
    /* Navbar enhancements for mobile */
    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
        background: var(--pure-white);
        padding: 0.75rem 1rem;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    header nav ul li a {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
}

.courses-cta h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--deep-purple);
}

.courses-cta p {
    color: var(--teal-blue);
    margin-bottom: 2rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--lavender);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--deep-purple);
}

/* Footer */
footer {
    background: var(--pure-white);
    color: var(--deep-purple);
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--deep-purple);
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
    /* Removed filter to show logo in original colors */
}

.footer-section p {
    color: var(--teal-blue);
    line-height: 1.6;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--teal-blue);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--crimson-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--lavender);
    color: var(--teal-blue);
}

/* Admin customizations (applied via extra static include in admin templates if desired) */
.admin-brand { font-size: 1.1rem; color: var(--pure-white); }

/* Responsive Design */
@media (max-width: 768px) {
    /* Keep header in a single row on mobile */
    header { flex-direction: row; align-items: center; text-align: left; }
    /* Show hamburger on mobile at the far right */
    .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
    /* Hide inline nav entirely on mobile; use overlay menu instead */
    header nav { display: none; }
    /* Logo aligns left with tagline under it */
    header .logo { order: 0; margin-left: 0; margin-right: 0; text-align: left; align-items: flex-start; }
    /* Hide only navbar tagline on phones (keep hero subtitle visible) */
    header .logo .tagline { display: none; }
    
    .logo-image {
        height: 70px;
    }
    
    .hero-logo-image {
        height: 120px;
    }
    
    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 4rem;
        text-align: center;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 2rem;
    }
    
    /* Mobile hero section improvements */
    .hero {
        padding: 3rem 1rem;
        min-height: 60vh;
    }
    
    .hero-content {
        justify-content: center;
        min-height: 100%;
        padding: 2rem 0;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .teaching-content { grid-template-columns: 1fr; text-align: center; }
    /* Fix Who We Are layout on mobile: stack vertically with spacing */
    .video-card { grid-template-columns: 1fr; align-items: center; gap: 1.5rem; }
    .video-container, .video-content { width: 100%; }
    
    .about-video,
    .video-placeholder {
        max-width: 100%;
        height: auto;
    }
    
    .contact-container,
    .register-container {
        grid-template-columns: 1fr;
    }
    
    .about-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Make reverse layout behave exactly like normal on mobile */
    .about-section.reverse { grid-template-columns: 1fr; }
    .about-section.reverse .about-text,
    .about-section.reverse .about-image {
        grid-column: 1;
        grid-row: auto;
    }
    
    .about-photo,
    .about-placeholder {
        max-width: 250px;
        height: 150px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .teacher-grid,
    .teachers-grid,
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-table {
        font-size: 0.9rem;
    }
    
    .courses-table th,
    .courses-table td {
        padding: 0.5rem;
    }
}

/* Scroll-to-top button (mobile) */
.scroll-top-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    height: 44px;
    width: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--deep-purple), var(--teal-blue));
    color: var(--pure-white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}
.scroll-top-btn i { pointer-events: none; }
@media (max-width: 768px) { .scroll-top-btn.show { display: inline-flex; } }

@media (max-width: 480px) {
    main {
    padding: 1rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-logo-image {
        height: 80px;
    }
    
    .teaching-content {
        gap: 2rem;
    }
    
    .teaching-photo,
    .teaching-placeholder,
    .about-video,
    .video-placeholder {
        max-width: 100%;
        height: 200px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}